;;; -*- Emacs-Lisp -*- ;;; lkb_fos/emacs/dot.emacs ;;; ;;; make sure this file is loaded from your personal `~/.emacs', e.g. put the ;;; following towards the end of `~/.emacs' (without the leading semicolons, of ;;; course): ;;; ;;; (let ((root (getenv "DELPHINHOME"))) ;;; (if (file-exists-p (format "%s/lkb_fos/emacs/dot.emacs" root)) ;;; (load (format "%s/lkb_fos/emacs/dot.emacs" root) nil t t))) ;;; ;;; You will also need to set the shell environment variable `DELPHINHOME' to ;;; the root directory of your installation tree (which is `~/delphin' for most ;;; people), then make sure to also export that variable (see the bash(1) or ;;; csh(1) on-line documentation), log out and back in (so that changes to the ;;; shell configuration take effect), and then launch emacs(1). ;;; ;;; please try not to make changes to _this_ file, so that on future upgrades ;;; you can safely move to a later version. ;;; (defconst delphin-home (or (getenv "DELPHINHOME") "~/delphin")) (defun configure-lkb-emacs-interface () (load "lkb" nil t) (load "tdl-mode" nil t) (setq auto-mode-alist (append '(("\\.tdl$" . tdl-mode) ("\\.mrs$" . sgml-mode) ("\\.rmrs$" . sgml-mode)) auto-mode-alist))) (defun lkb () (interactive) (let ((extension (cond ((string-match "darwin" system-configuration) "darwin_x86_64") ((string-match "linux" system-configuration) "linux_x86_64") (t (error "Unrecognised system configuration"))))) (setq inferior-lisp-program (format "%s/lkb_fos/lkb.%s" delphin-home extension)) (add-to-list 'load-path (format "%s/lkb_fos/emacs/" delphin-home)) (require 'slime) (setq slime-words-of-encouragement '("")) ; supplied phrases not relevant for grammarians (setq slime-contribs '()) ; slime-fancy etc not relevant for grammarians (configure-lkb-emacs-interface) ;; ... from LOGON system dot.emacs ;; make sure that emacs(1) will use the appropriate encoding on all buffers ;; connected to Lisp (aka the LKB), which for latest versions include more ;; than just the main `*common-lisp*' buffer. also, we need to force the ;; Lisp into using a locale with corresponding encoding. ;; (let ((encoding 'utf-8)) (set-language-environment 'utf-8) (setq default-buffer-file-coding-system encoding) (setq default-process-coding-system (cons encoding encoding))) (slime) (rename-buffer "LKB")))