changelog shortlog graph tags branches files raw help

Mercurial > core / changeset: lisp fixes

changeset 682: 5e8b1855f866
parent 681: 77cd10dfa212
child 683: c5fe76568de0
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 28 Sep 2024 16:42:55 -0400
files: emacs/init.el lisp/bin/bin.asd lisp/bin/skc.lisp lisp/bin/skel.lisp lisp/lib/cli/clap/cli.lisp lisp/lib/rdb/err.lisp lisp/std/condition.lisp
description: lisp fixes
     1.1--- a/emacs/init.el	Fri Sep 27 20:42:20 2024 -0400
     1.2+++ b/emacs/init.el	Sat Sep 28 16:42:55 2024 -0400
     1.3@@ -6,9 +6,9 @@
     1.4 (add-to-list 'load-path (expand-file-name "lib" user-emacs-directory))
     1.5 
     1.6 (dolist (x '("util.el" "default.el" "keys.el"))
     1.7-  (let ((y (concat user-emacs-directory x))
     1.8-        (byte-compile-warnings nil)
     1.9-        (native-comp-async-warnings-errors-kind nil))
    1.10+  (let ((y (concat user-emacs-directory x)))
    1.11+    (setf byte-compile-warnings nil
    1.12+          native-comp-async-warnings-errors-kind nil)
    1.13     (if (and (native-comp-available-p) (not (eq system-type 'darwin)))
    1.14          (native-compile y)
    1.15          (byte-compile-file y))
     2.1--- a/lisp/bin/bin.asd	Fri Sep 27 20:42:20 2024 -0400
     2.2+++ b/lisp/bin/bin.asd	Sat Sep 28 16:42:55 2024 -0400
     2.3@@ -35,7 +35,7 @@
     2.4   :build-pathname "skc"
     2.5   :entry-point "bin/skc::start-skc"
     2.6   :components ((:file "skc"))
     2.7-  :depends-on (:std :cli))
     2.8+  :depends-on (:std :cli :vc))
     2.9 
    2.10 (defsystem :bin/packy
    2.11   :build-operation program-op
     3.1--- a/lisp/bin/skc.lisp	Fri Sep 27 20:42:20 2024 -0400
     3.2+++ b/lisp/bin/skc.lisp	Sat Sep 28 16:42:55 2024 -0400
     3.3@@ -9,10 +9,11 @@
     3.4   (:nicknames :skc))
     3.5 (in-package :bin/skc)
     3.6 
     3.7-(define-cli *skc-cli*
     3.8+(cli:define-cli *skc-cli*
     3.9   :name "skc"
    3.10-  :version #.(format nil "0.1.1:~A" (read-line (sb-ext:process-output (vc:run-hg-command "id" '("-i") :stream)))))
    3.11+  :version #.(format nil "0.1.1:~A" (read-line (sb-ext:process-output (vc:run-hg-command "id" '("-i") :stream))))
    3.12+  :thunk 'cli:args)
    3.13 
    3.14-(defmain start-skc ()
    3.15-  (with-cli (*skc-cli* opts cmds) (cli:args)
    3.16-    (do-cmd *skc-cli*)))
    3.17+(cli:defmain start-skc ()
    3.18+  (cli:with-cli (*skc-cli* opts cmds) (cli:args)
    3.19+    (cli:do-cmd *skc-cli*)))
     4.1--- a/lisp/bin/skel.lisp	Fri Sep 27 20:42:20 2024 -0400
     4.2+++ b/lisp/bin/skel.lisp	Sat Sep 28 16:42:55 2024 -0400
     4.3@@ -14,7 +14,7 @@
     4.4 (in-readtable :shell)
     4.5 
     4.6 (defopt skc-help (print-help *cli*))
     4.7-(defopt skc-version (print-version *cli*))
     4.8+(defopt skc-version (print-version *cli* t))
     4.9 (defopt skc-level *log-level*
    4.10         (setq *log-level* (if *arg* (if (stringp *arg*)
    4.11                                         (sb-int:keywordicate (string-upcase *arg*))
    4.12@@ -242,8 +242,9 @@
    4.13 (define-cli *skel-cli*
    4.14   :name "skel"
    4.15   :version #.(format nil "0.1.1:~A" (read-line (sb-ext:process-output (vc:run-hg-command "id" '("-i") :stream))))
    4.16+  ;; :help t
    4.17   :description "A hacker's project compiler."
    4.18-  :thunk 'skc-show
    4.19+  :thunk skc-show
    4.20   :opts ((:name "help" :global t :description "print this message" 
    4.21 	   :thunk skc-help)
    4.22 	  (:name "version" :global t :description "print version" 
    4.23@@ -279,7 +280,7 @@
    4.24 	  :description "inspect the project skelfile"
    4.25 	  :opts ((:name "file" :description "path to skelfile" :kind file))
    4.26 	  :thunk skc-inspect)
    4.27-         #+tools
    4.28+         #+gui
    4.29          (:name view
    4.30           :description "view an object in a new GUI window"
    4.31           :thunk skc-view)
     5.1--- a/lisp/lib/cli/clap/cli.lisp	Fri Sep 27 20:42:20 2024 -0400
     5.2+++ b/lisp/lib/cli/clap/cli.lisp	Sat Sep 28 16:42:55 2024 -0400
     5.3@@ -14,7 +14,7 @@
     5.4     ((eql kind :cmd) (apply #'make-instance 'cli-cmd slots))
     5.5     (t (apply #'make-instance kind slots))))
     5.6 
     5.7-(defmacro define-cli (sym &key name version description thunk opts cmds)
     5.8+(defmacro define-cli (sym &key name version #+nil (help t) description thunk opts cmds)
     5.9   "Define a symbol NAME bound to a top-level CLI object."
    5.10   (with-gensyms (%name %class)
    5.11     (if (atom sym)
    5.12@@ -22,6 +22,7 @@
    5.13               %class :cli)
    5.14         (setq %name (car sym)
    5.15               %class (cdr sym)))
    5.16+    ;; (when help)
    5.17     `(,*default-cli-def* ,%name (make-cli ,%class :name ,name
    5.18                                                   :version ,version
    5.19                                                   :description ,description
     6.1--- a/lisp/lib/rdb/err.lisp	Fri Sep 27 20:42:20 2024 -0400
     6.2+++ b/lisp/lib/rdb/err.lisp	Sat Sep 28 16:42:55 2024 -0400
     6.3@@ -5,12 +5,11 @@
     6.4 ;;; Code:
     6.5 (in-package :rdb)
     6.6 
     6.7-(eval-always
     6.8- (deferror rdb-error ()
     6.9-   ((message :initarg :message
    6.10-             :reader rdb-error-message))
    6.11-   (:auto t)
    6.12-   (:documentation "Error signaled by the RDB system.")))
    6.13+(deferror rdb-error ()
    6.14+    ((message :initarg :message
    6.15+              :reader rdb-error-message))
    6.16+    (:auto t)
    6.17+    (:documentation "Error signaled by the RDB system."))
    6.18 
    6.19 (define-condition rocksdb-alien-error (rdb-error)
    6.20   ((db :initarg :db :reader rdb-error-db))
     7.1--- a/lisp/std/condition.lisp	Fri Sep 27 20:42:20 2024 -0400
     7.2+++ b/lisp/std/condition.lisp	Sat Sep 28 16:42:55 2024 -0400
     7.3@@ -39,12 +39,12 @@
     7.4   "Define an error condition."
     7.5   (let ((fun (member :auto options :test #'car-eql)))
     7.6     (when fun (setq options (remove (car fun) options)))
     7.7-    `(prog1
     7.8-         (define-condition ,name ,(or parent-types '(std-error)) ,slot-specs ,@options)
     7.9-       (when ',fun
    7.10-         (if (member 'simple-error ',parent-types)
    7.11-             (def-simple-error-reporter ,name)
    7.12-             (def-error-reporter ,name))))))
    7.13+    `(eval-when (:compile-toplevel :load-toplevel :execute) (prog1
    7.14+                      (define-condition ,name ,(or parent-types '(std-error)) ,slot-specs ,@options)
    7.15+                    (when ',fun
    7.16+                      (if (member 'simple-error ',parent-types)
    7.17+                          (def-simple-error-reporter ,name)
    7.18+                          (def-error-reporter ,name)))))))
    7.19 
    7.20 (defmacro def-error-reporter (err)
    7.21     `(defun ,err (&rest args)