aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-03-23 20:57:13 +0100
committerGravatar Tom Willemsen2013-03-23 20:57:13 +0100
commit9d5973a022c5673469f340ee1cc9517e440cbdbc (patch)
tree61de23612d95615aa25a58a2bbc0f1495b03c5ac
parente41bb3a930fed58257ffcf1f0e82b10dedb1bbd4 (diff)
downloadclark-9d5973a022c5673469f340ee1cc9517e440cbdbc.tar.gz
clark-9d5973a022c5673469f340ee1cc9517e440cbdbc.zip
Simplify usage of call-command
-rw-r--r--lisp/clark.lisp10
1 files 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."