From 9d5973a022c5673469f340ee1cc9517e440cbdbc Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 23 Mar 2013 20:57:13 +0100 Subject: [PATCH] Simplify usage of call-command --- lisp/clark.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/clark.lisp b/lisp/clark.lisp index 2a63b26..4fb3bc2 100644 --- a/lisp/clark.lisp +++ b/lisp/clark.lisp @@ -35,7 +35,7 @@ (defmacro call-command (name &rest args) (let ((command-name (make-command-name (symbol-name name)))) - `(,command-name ,@args))) + `(,command-name ',args))) (defmacro defcommand (name (&key (min-args 0) (max-args nil)) sdoc ldoc &body body) @@ -52,11 +52,11 @@ ((< num-args min-args) (format t "Too few arguments, need at least ~D, got ~D~%" min-args num-args) - (call-command help '(,sname))) + (call-command help ,sname)) ((and max-args (> num-args max-args)) (format t "Too many arguments, need at most ~D, got ~D~%" max-args num-args) - (call-command help '(,sname))) + (call-command help ,sname)) (t ,@body)))) (setf *help-messages* (nconc *help-messages* '((,sname ,sdoc ,ldoc))) @@ -172,7 +172,7 @@ The executable name should already have been removed." (funcall cmd-name (cdr args)) (progn (format t "Unknown command: ~A~%" (car args)) - (call-command help nil)))) + (call-command help)))) (map nil #'print-bookmark (get-bookmarks)))) (defun print-bookmark (bm) @@ -240,7 +240,7 @@ otherwise." ((null ldoc) (format t "Unkown command: ~A~%" (car args))) ((and (symbolp ldoc) (fboundp ldoc)) (funcall ldoc)) (t (format t "~A~%" ldoc)))) - (call-command help '("help")))) + (call-command help "help"))) (defcommand remove (:min-args 1 :max-args 1) "Remove a bookmark from the database."