Install more sly' and sbcl' packages including `sbcli'

This commit is contained in:
Gerard Vermeulen 2023-03-19 20:41:33 +01:00
parent d73b75e076
commit 934ce0e0cb

View File

@ -4094,7 +4094,7 @@ Listing [[lst:sbcl-core-for-sly]] tangles to a script to dump such a [[http://ww
#+caption: Configure =sly=. #+caption: Configure =sly=.
#+name: lst:configure-sly #+name: lst:configure-sly
#+begin_src emacs-lisp -n :results silent #+begin_src emacs-lisp -n :results silent
(when (ensure-package-installation 'sly) (when (ensure-package-installation 'sly 'sly-named-readtables)
(with-eval-after-load 'sly (with-eval-after-load 'sly
;; Set `sly-default-lisp' instead of `inferior-lisp-program', ;; Set `sly-default-lisp' instead of `inferior-lisp-program',
;; because `sly' uses `inferior-lisp-program' only as a backwards ;; because `sly' uses `inferior-lisp-program' only as a backwards
@ -4504,18 +4504,31 @@ git clone git@github.com:ageldama/cl-state-machine.git
#+caption: Register and load local =quicklisp= projects with dependencies. #+caption: Register and load local =quicklisp= projects with dependencies.
#+name: lst:register-load-local-projects #+name: lst:register-load-local-projects
#+begin_src lisp -n :eval never-export :results none :tangle no #+begin_src lisp -n :eval never-export :results none :tangle no
;; SBCL on Darwin fails to run cl-cffi-gtk:
;; https://lisp-journey.gitlab.io/blog/gui-programming-in-common-lisp-part-3-of-5-gtk3/
;; https://www.crategus.com/books/cl-cffi-gtk/
;; https://www.crategus.com/books/cl-gtk/gtk-tutorial.html
(ql:register-local-projects) (ql:register-local-projects)
(ql:quickload "cs325") (ql:quickload "cs325")
(ql:quickload "cl-state-machine") (ql:quickload "named-readtables")
(ql:quickload "cl-state-machine-examples") (ql:quickload "nodgui") ;; requires https://www.tcl.tk/software/tklib/
(ql:quickload "cl-state-machine-graphing") (ql:quickload "rutils")
(ql:quickload "cl-state-machine-test") (ql:quickload "rutilsx")
(ql:quickload "try") ;; "try" is a "named-readtables/test" requirement.
(ql:quickload "ucons")
(when (some #'identity (mapcar (lambda (x)
(let ((*default-pathname-defaults* x))
(probe-file "cl-state-machine")))
ql:*local-project-directories*))
(ql:quickload "cl-state-machine")
(ql:quickload "cl-state-machine-examples")
(ql:quickload "cl-state-machine-graphing")
(ql:quickload "cl-state-machine-test"))
#+end_src #+end_src
#+caption[A =quicklisp= sbclrc file]:
#+caption: A =quicklisp= sbclrc file. #+caption: A =quicklisp= sbclrc file.
#+name: lst:quicklisp-sbclrc-file #+name: lst:quicklisp-sbclrc-file
#+begin_src lisp -n :eval never-export :tangle ~/.sbclrc #+begin_src lisp -n :eval never :tangle ~/.sbclrc
;;; Hey Emacs, this is my -*- lisp -*- .sbclrc file. ;;; Hey Emacs, this is my -*- lisp -*- .sbclrc file.
;;; The following lines added by ql:add-to-init-file: ;;; The following lines added by ql:add-to-init-file:
@ -4532,6 +4545,27 @@ git clone git@github.com:ageldama/cl-state-machine.git
;; (setq *package* (find-package :cs325-user))) ;; (setq *package* (find-package :cs325-user)))
#+end_src #+end_src
#+caption[Install =sbcli=]:
#+caption: Install =sbcli=.
#+name: lst:install-sbcli
#+begin_src emacs-lisp -n :eval never-export :lexical t :tangle no
(let ((url "https://raw.githubusercontent.com/hellerve/sbcli/master/repl.lisp")
(file "~/bin/sbcli"))
(url-copy-file url file 'ok-if-already-exists)
(set-file-modes file #o700))
#+end_src
#+caption[Tangle a =sbcli= resource file]:
#+caption: Tangle a =sbcli= resource file.
#+name: lst:write-sbslirc
#+begin_src lisp -n :eval never :tangle ~/.sbclirc
(setf *repl-name* "Gerard's custom REPL for SBCLI")
;; The style option fails:
;; (setf *pygmentize* (merge-pathnames ".pyenv/shims/pygmentize"
;; (user-homedir-pathname)))
;; (defvar *pygmentize-options* (list "-s" "-l" "lisp" "-O" "style=zenburn"))
#+end_src
** [[info:eintr#Top][Emacs Lisp Programming (info)]] ** [[info:eintr#Top][Emacs Lisp Programming (info)]]
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: sec:emacs-lisp-programming :CUSTOM_ID: sec:emacs-lisp-programming