[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
*com-documentation-alist* et al.
- To: BUG-ZWEI@OZ
- Subject: *com-documentation-alist* et al.
- From: Randy Parker <PARKER@OZ>
- Date: Thu ,27 Jun 85 12:49:00 EDT
In Symbolics 3600 ZWEI in Release 6.0, IP-TCP 29.0, AISite 9.4,
microcode TMC5-MIC 319, FEP 18, on Lisp Machine Apiary-4:
IWBNI this set of keys was consulted in COM-DOCUMENTATION,
instead of it being "hardwired", so that this documentation facility
could be extended easily by just pushing a new pair.
;;;; From sys:zwei;doc.lisp
(DEFVAR *COM-DOCUMENTATION-ALIST*
'((#/C . COM-SELF-DOCUMENT)
(#/L . COM-LAST-COMMANDS)
(#/D . COM-DESCRIBE-COMMAND)
(#/A . COM-APROPOS)
(#/U . COM-UNDO)
(#/V . COM-VARIABLE-APROPOS)
(#/W . COM-WHERE-IS)))
(DEFCOM COM-DOCUMENTATION
"Displays information about commands, performs other help functions.
It prompts in the minibuffer for a help option, which is a single character
for requesting more specific help.
A Displays all the commands whose names contain a certain substring. Type the string.
C Displays documentation for a command. Press the command key after the C.
D Displays documentation for an extended command. Type the command name.
L Displays the last 60 characters you typed.
U Offers to undo the last /"major/" operation (such as fill, sort).
V Displays all the Zmacs variables whose names contain a certain substring. Type it.
W Finds out whether an extended command is bound to a key. Type the command name.
Using SPACE repeats the most recent HELP command. " ()
(DO-NAMED TOP
((CHAR 0)
(*IN-COM-DOC-P* T)
(*REPEAT-DOC-P* NIL))
(NIL)
(TYPEIN-LINE " Help. Type one of A,C,D~:[~;,L~]~:[~;,U~],V,W,Space,Help,Abort: " ;;<------*****
(MEMQ ':PLAYBACK (FUNCALL STANDARD-INPUT ':WHICH-OPERATIONS))
(BOUNDP '*UNDO-START-BP*))
(TYPEIN-LINE-ACTIVATE
(SETQ CHAR (DO ((CHAR (CHAR-UPCASE (EDITOR-INPUT))
(CHAR-UPCASE (EDITOR-INPUT))))
((MEMQ CHAR '(#/A #/C #/D #/L #/U #/V #/W #\SP #/? #\HELP)) CHAR) ;; <<------******
(COND ((= CHAR #\c-G)
(FUNCALL *TYPEIN-WINDOW* ':CLEAR-WINDOW)
(BARF))
((OR (= CHAR #\ABORT)
(= CHAR #\RUBOUT))
(FUNCALL *TYPEIN-WINDOW* ':CLEAR-WINDOW)
(RETURN-FROM TOP DIS-NONE)))
(BEEP))))
(FUNCALL *TYPEIN-WINDOW* ':MAKE-COMPLETE)
(COND ((= CHAR #\SP)
(SETQ *REPEAT-DOC-P* T)
(SETQ CHAR *COM-DOC-LAST-CHAR*))
(T (SETQ *COM-DOC-LAST-CHAR* CHAR)))
(IF (MEMQ CHAR '(#\HELP #/?))
(FORMAT T "COM-DOCUMENTATION:~%~A~&"
(GET 'COM-DOCUMENTATION 'DOCUMENTATION))
(LET ((FUNCTION (CDR (ASSQ CHAR *COM-DOCUMENTATION-ALIST*))))
(WHEN FUNCTION
;; This kludge fudges the minibuffer history so that if this command uses
;; the minibuffer and is repeated, we will go straight to it instead of
;; coming back here and asking again for a character to dispatch on.
(SETQ *CURRENT-COMMAND* FUNCTION)
(RETURN (FUNCALL FUNCTION)))))))