;;; Emacs CCRMA startup file ;;; nando, July 18 1997 (if (not (fboundp 'setf)) (defmacro setf (place value) (list 'setq place value))) ;;; how old is this emacs? (setf old-emacs (not (fboundp 'member))) ;;; figure out which flavor we are running (defvar xemacs-flavor (string-match "XEmacs" emacs-version)) ;;; figure out which OS we're running (setq ostype-next (eq system-type 'next-mach)) (setq ostype-irix (eq system-type 'irix)) (setq ostype-linux (or (eq system-type 'gnu/linux) (eq system-type 'linux))) ;;; get lisp image name and lisp-emacs connection location (if ostype-next (setq acl-home nil)) (if ostype-irix (if xemacs-flavor (setq acl-home "/usr/ccrma/lisp/dist/acl4.3-irix/home/emacs/fi-xemacs") (setq acl-home "/usr/ccrma/lisp/dist/acl4.3-irix/home/emacs/fi"))) (if ostype-linux (if xemacs-flavor (setq acl-home "/usr/ccrma/lisp/dist/acl4.3-linux/home/emacs/fi-xemacs") (setq acl-home "/usr/ccrma/lisp/dist/acl4.3-linux/home/emacs/fi"))) (setq acl-image "/usr/ccrma/lbin/cm") ;;; personal preferences (setq bell-volume 0) (set-variable 'inhibit-startup-message 't) (put 'eval-expression 'disabled nil) (put 'downcase-region 'disabled nil) ;;; add CLM/CM/CMN extensions to the lisp-mode list (setq auto-mode-alist (append '( ;; clm and cm extensions ("\\.clm$" . lisp-mode) ("\\.cm$" . lisp-mode) ("\\.cmn$" . lisp-mode) ("\\.ins$" . lisp-mode) ("\\.cl$" . lisp-mode) ("\\.lisp$" . lisp-mode) ("\\.c$" . c-mode) ("\\.h$" . c-mode) ("\\.m$" . objc-mode) ("\\.html$" . text-mode) ) auto-mode-alist)) ;;; include common sound-related cases in the completions-ignored list (setq completion-ignored-extensions (append (list ".snd" ".aiff" ".wav" ".lib" ".fas" ".au" ".so" ".o" ".hqx" ".gz" ".tar" ".fusl" ".fisl") completion-ignored-extensions)) (if acl-home (setq load-path (cons acl-home load-path))) (if ostype-next (load "fi/site-init.el")) (if ostype-irix (load "fi-site-init.el")) (if ostype-linux (load "fi-site-init.el")) (setq fi:common-lisp-image-name acl-image) (setq fi:common-lisp-host (system-name)) (setq fi:common-lisp-buffer-name "*common-lisp*") (setq fi:common-lisp-directory nil) (defun run-common-lisp () (interactive) (fi:common-lisp fi:common-lisp-buffer-name fi:common-lisp-directory fi:common-lisp-image-name fi:common-lisp-image-arguments fi:common-lisp-host)) ;;; change some key bindings (global-set-key "\C-c\C-r" 'fi:lisp-eval-region) (global-set-key "\C-c\C-s" 'fi:lisp-eval-last-sexp) (global-set-key "\C-c\C-e" 'fi:lisp-eval-defun) (global-set-key "\C-c\C-m" 'fi:lisp-macroexpand) (global-set-key "\C-c\C-b" 'fi:lisp-eval-current-buffer) (global-set-key "\C-xw" 'what-line) (setq display-time-day-and-date t) (display-time) ;;; ---------------- ;;; NeXT emacs: (if ostype-next (progn (set-variable 'meta-flag 't) (setq explicit-shell-file-name "/bin/csh") (define-key esc-map "?" 'describe-key-briefly) (set-variable 'fi:inferior-common-lisp-mode-super-key-map '(keymap (28 . fi:subprocess-quit) (4 . fi:subprocess-send-eof) (3 . fi:subprocess-interrupt) (23 . fi:subprocess-backward-kill-word) (22 . fi:subprocess-show-output) (19 . fi:re-search-forward-input) (18 . fi:re-search-backward-input) (16 . fi:pop-input) (15 . fi:subprocess-send-flush) (14 . fi:push-input) (13 . fi:subprocess-input-region) (12 . fi:list-input-ring) (11 . fi:subprocess-kill-output) (1 . fi:subprocess-beginning-of-line))) (setq-default fi:subprocess-enable-superkeys nil) (setq fi:common-lisp-image-arguments '("+ipc")) (load-library "server") (server-start) (if (not old-emacs) (require 'lisp-mode)) (global-set-key "\C-x\l" 'fi:common-lisp) (put 'if 'lisp-indent-function 0) (put 'unless 'lisp-indent-function 1) (put 'dolist 'lisp-indent-function 1) (put 'dotimes 'lisp-indent-function 1) (put 'when 'lisp-indent-function 1) (put 'case 'lisp-indent-function 1) (put 'multiple-value-bind 'lisp-indent-function 2) (put 'do 'lisp-indent-function 2) (put 'do* 'lisp-indent-function 2) (put 'defgeneric 'fi:lisp-indent-hook (get 'defun 'fi:lisp-indent-hook)) (put 'defclass 'fi:lisp-indent-hook (get 'defun 'fi:lisp-indent-hook)) (put 'make-instance 'fi:lisp-indent-hook (get 'defun 'fi:lisp-indent-hook)) )) ;;; ------------------- ;;; SGI xemacs or emacs (if ostype-irix (progn (fmakunbound 'c-mode) (makunbound 'c-mode-map) (makunbound 'c-style-alist) (autoload 'c-mode "cc-mode" "C Editing Mode" t) (setq fi:common-lisp-image-arguments nil) (setq fi:check-unbalanced-parentheses-when-saving nil) (global-set-key "\C-x\l" 'run-common-lisp) (global-set-key "\C-c\C-i" 'fi:subprocess-interrupt) (put 'if 'fi:lisp-indent-hook 2) (put 'loop 'fi:lisp-indent-hook 'tagbody) )) ;;; --------------------- ;;; Linux xemacs or emacs (if ostype-linux (progn (setq fi:common-lisp-image-arguments nil) (setq fi:check-unbalanced-parentheses-when-saving nil) (global-set-key "\C-x\l" 'run-common-lisp) (global-set-key "\C-c\C-i" 'fi:subprocess-interrupt) (put 'if 'fi:lisp-indent-hook 2) (put 'loop 'fi:lisp-indent-hook 'tagbody) )) ;;; Japanese input on xemacs 20 (when (featurep 'wnn) (require 'egg-wnn) (setq egg-default-startup-file "eggrc-wnn") (require 'egg)) (setenv "JSERVER" "localhost")