From 4309ced495464babcfb0c329e25bc0d9f0fdc849 Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Sun, 11 May 2008 15:39:36 -0700 Subject: [PATCH] fixed up describe-command --- user.lisp | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/user.lisp b/user.lisp index ce89eae..9e43942 100644 --- a/user.lisp +++ b/user.lisp @@ -1203,12 +1203,6 @@ is using the number, then the windows swap numbers. Defaults to current group." (mapcar 'print-key-seq (search-kmap kmap-var *top-map*)) (columnize data cols)))) -(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)))) - (defcommand help (&optional com) (:rest) "Display all the bindings in @var{*root-map*}." (if com @@ -1954,12 +1948,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." + ; Is it really a command, not just a function? + (if (get-command-structure com) (message-no-timeout "Command \"~a\":~%~a" com - (documentation (progn - ;is it really a command? - (get-command-structure-or-die com) - (get-command-symbol com)) - 'function))) + (documentation (get-command-symbol com) 'function)) + (message-no-timeout "Error: Command \"~a\" not found." com))) (defcommand where-is (cmd) ((:rest "Where is command: ")) "Print the key sequences bound to the specified command." -- 1.5.5.1