sbcl と slime、 w3m と HyperSpec を導入する。
gnupack と sbcl を連携させるには software:sbcl? を参照のこと。
以下の設定を ~/.emacs.d/init.el に追記する。
(setq inferior-lisp-program "sbcl")
実行バイナリを生成することがあるならば、以下の設定を追記しておくとよいだろう。
(defun sbcl-compiling-binary () (interactive) (shell-command (format "sbcl --noinform --no-sysinit --load %s &" (shell-quote-argument (buffer-file-name)))))
cd ~/ cvs -d :pserver:anonymous:anonymous@common-lisp.net:/project/slime/cvsroot co slime mv slime/ ./.emacs.d/
以下の設定を ~/.emacs.d/init.el に追記する。
(pushnew "~/.emacs.d/slime" load-path) (pushnew "~/.emacs.d/slime/contrib" load-path) (setq slime-net-coding-system 'utf-8-unix) (add-hook 'lisp-mode-hook (lambda () (slime-mode t) (setq indent-tabs-mode nil) (unless show-paren-mode (show-paren-mode)))) (require 'slime) (require 'slime-editing-commands) (slime-setup '(slime-repl)) ; C-: C-l で slimeを起動 (defun my-slime (&optional command coding-system) (interactive) (switch-to-buffer-other-window (get-buffer-create "*lisp*")) (slime command coding-system)) (global-set-key (kbd "C-: C-l") 'my-slime) ; slimeバッファを切換え (global-set-key (kbd "C-: s") 'slime-selector) (add-hook 'slime-mode-hook '(lambda () (define-key slime-mode-map (kbd "C-: C-j C-j") 'slime-close-all-parens-in-sexp) (define-key slime-mode-map (kbd "C-: C-j C-a") 'beginning-of-defun) (define-key slime-mode-map (kbd "C-: C-j C-e") 'end-of-defun) (define-key slime-mode-map (kbd "C-: C-j C-f") 'forward-sexp) (define-key slime-mode-map (kbd "C-: C-j C-b") 'backward-sexp) (define-key slime-mode-map (kbd "C-: C-j C-n") 'forward-list) (define-key slime-mode-map (kbd "C-: C-j C-p") 'backward-list) (define-key slime-mode-map (kbd "C-: C-j C-u") 'backward-up-list) (define-key slime-mode-map (kbd "C-: C-j C-d") 'down-list))) (add-hook 'slime-repl-mode-hook '(lambda () (define-key slime-repl-mode-map (kbd "C-: C-j C-j") 'slime-repl-closing-return) (define-key slime-repl-mode-map (kbd "C-: C-j C-p") 'slime-repl-previous-input) (define-key slime-repl-mode-map (kbd "C-: C-j C-n") 'slime-repl-next-input) (define-key slime-repl-mode-map (kbd "C-: C-j C-r") 'slime-repl-previous-matching-input) (define-key slime-repl-mode-map (kbd "C-: C-j C-s") 'slime-next-matching-input)))
;; モダンCommon Lisp第3回: SLIMEの使い方 基礎編 | ありえるえりあ ;; http://dev.ariel-networks.com/wp/archives/462 ;; popwin ;; Apropos (push '("*slime-apropos*") popwin:special-display-config) ;; Macroexpand (push '("*slime-macroexpansion*") popwin:special-display-config) ;; Help (push '("*slime-description*") popwin:special-display-config) ;; Compilation (push '("*slime-compilation*" :noselect t) popwin:special-display-config) ;; Cross-reference (push '("*slime-xref*") popwin:special-display-config) ;; Debugger (push '(sldb-mode :stick t) popwin:special-display-config) ;; REPL (push '(slime-repl-mode) popwin:special-display-config) ;; Connections (push '(slime-connection-list-mode) popwin:special-display-config) ;; ac-slime ;; auto-install ;; (auto-install-from-url "https://github.com/purcell/ac-slime/raw/master/ac-slime.el") (require 'ac-slime) (add-hook 'slime-mode-hook 'set-up-slime-ac) (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
apt-cyg install w3m
cd ~/ cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m cd emacs-w3m/ emacs -batch -q -no-site-file -l w3mhack.el NONE -f w3mhack-nonunix-install cd ../ mv emacs-w3m/ /app/emacs/site-lisp
以下の設定を ~/.emacs.d/init.el に追記する。
(require 'w3m-load)
cd ~/ wget ftp://ftp.lispworks.com/pub/software_tools/reference/HyperSpec-7-0.tar.gz tar zxvf HyperSpec-7-0.tar.gz mv HyperSpec ./.emacs.d/
以下の設定を ~/.emacs.d/init.el に追記する。
(require 'hyperspec) (setq common-lisp-hyperspec-root (expand-file-name "~/.emacs.d/HyperSpec/") common-lisp-hyperspec-symbol-table (expand-file-name "~/.emacs.d/HyperSpec/Data/MapSym.txt")) (defadvice common-lisp-hyperspec (around hyperspec-lookup-w3m () activate) (let* ((window-configuration (current-window-configuration)) (browse-url-browser-function `(lambda (url new-window) (w3m-browse-url url nil) (let ((hs-map (copy-keymap w3m-mode-map))) (define-key hs-map (kbd "q") (lambda () (interactive) (kill-buffer nil) (set-window-configuration ,window-configuration))) (use-local-map hs-map))))) ad-do-it)) (global-set-key (kbd "C-. h") 'hyperspec-lookup)