;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/ide/slime-incal.el ;; ;; install quicklisp and cl-sdl2: ;; $ sudo apt-get --install-suggests install \*sbcl\* libsdl2-\* ;; ;; $ mkdir -p ~/common-lisp ;; $ cd ~/common-lisp ;; ;; $ wget 'https://beta.quicklisp.org/quicklisp.lisp' ;; ;; $ sbcl --load quicklisp.lisp ;; * (quicklisp-quickstart:install) ;; * (ql:add-to-init-file) ;; * (ql:quickload 'swank) ;; * (swank-loader:dump-image "sbcl.core-with-swank") ;; * (quit) ;; ;; CL-USER> (load "~/quicklisp/setup.lisp") ;; CL-USER> (ql:quickload "quicklisp-slime-helper") ;; CL-USER> (ql:update-dist "quicklisp") ;; CL-USER> (ql:update-client) ;; ;; CL-USER> (ql:quickload "cl-glut") ;; CL-USER> (ql:quickload "cl-opengl") ;; CL-USER> (ql:quickload "sdl2") (require 'slime) (require 'slime-autoloads) (require 'slime-banner) (require 'slime-repl) (require 'super) (load (expand-file-name "~/quicklisp/slime-helper.el")) (setq inferior-lisp-program "/bin/sbcl") (setq slime-lisp-implementations '((sbcl ("sbcl" "--core" "/home/incal/common-lisp/sbcl.core-with-swank") :init (lambda (port-file _) (format "(swank:start-server %S)\n" port-file) )))) (setq slime-startup-animation nil) (setq slime-words-of-encouragement nil) ;; sldb (defun sldb-mode-hook-f () (disable-super-global-keys sldb-mode-map) ) (add-hook 'sldb-mode-hook #'sldb-mode-hook-f) ;; slime (defun slime-mode-set-keys () (let ((kmap slime-mode-indirect-map)) (disable-super-global-keys kmap) (keymap-set kmap "C-h f" #'slime-describe-function) (keymap-set kmap "M-9" #'slime-eval-last-expression) (keymap-set kmap "M-n" #'slime-eval-buffer) )) (defun slime-mode-hook-f () (abbrev-mode) (slime-mode-set-keys) ) (add-hook 'slime-mode-hook #'slime-mode-hook-f) ;; slime repl (defun slime-repl-mode-set-keys () (let ((kmap slime-repl-mode-map)) (disable-super-global-keys kmap) (keymap-set kmap "C-M-n" #'slime-repl-next-input) (keymap-set kmap "C-M-p" #'slime-repl-previous-input) )) (defun slime-repl-mode-hook-f () (slime-repl-mode-set-keys) ) (add-hook 'slime-repl-mode-hook #'slime-repl-mode-hook-f) ;; (find-file "~/common-lisp/general-base/gb.lisp") ;; (find-file "~/quicklisp/dists/quicklisp/software/cl-sdl2-20201220-git/examples/basic.lisp") (provide 'slime-incal)