[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] [PATCH] Fixed describe-command; help when called with argume
From: |
Julian Stecklina |
Subject: |
Re: [STUMP] [PATCH] Fixed describe-command; help when called with argument runs describe-command. |
Date: |
Fri, 09 May 2008 13:13:05 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
"Scott Wolchok" <address@hidden> writes:
> +(defun get-command-structure-or-die (command)
> + "Return the command structure for COMMAND; throw an error if not
> +found."
> + (or (get-command-structure command)
> + (throw 'error (format nil "Command '~a' not found." command))))
I guess what you meant instead of (throw 'error ...) is
(error "Command '~a' not found." command)
> (defcommand commands () ()
> (let* ((screen (current-screen))
> @@ -1946,7 +1956,11 @@ command prints the command bound to the
> specified key sequence."
> (defcommand describe-command (com) ((:command "Describe Command: "))
> "Print the online help associated with the specified command."
> (message-no-timeout "Command \"~a\":~%~a" com
> - (documentation (get-command-structure com) 'function)))
> + (documentation (progn
> + ;is it really a command?
> + (get-command-structure-or-die com)
> + (get-command-symbol com))
> + 'function)))
The PROGN form is strange... I think it would be better to place an IF
outside of MESSAGE-NO-TIMEOUT, instead of generating an error when the
command does not exist, YMMV.
Regards,
--
Julian Stecklina
Well, take it from an old hand: the only reason it would be easier to
program in C is that you can't easily express complex problems in C,
so you don't. - Erik Naggum (in comp.lang.lisp)
(Spam-Experiment: http://cthulhu.c3d2.de/~astro/badpit.html )