comparison lisp/help.el @ 3980:bf2d4294a1dd

(describe-prefix-bindings): New command. (prefix-help-command): Set it.
author Richard M. Stallman <rms@gnu.org>
date Sun, 04 Jul 1993 18:53:24 +0000
parents 6cd314c2ddde
children e50f7b531c7f
comparison
equal deleted inserted replaced
3979:d8c9bc546c87 3980:bf2d4294a1dd
157 (defun describe-mode (&optional minor) 157 (defun describe-mode (&optional minor)
158 "Display documentation of current major mode. 158 "Display documentation of current major mode.
159 If optional MINOR is non-nil (or prefix argument is given if interactive), 159 If optional MINOR is non-nil (or prefix argument is given if interactive),
160 display documentation of active minor modes as well. 160 display documentation of active minor modes as well.
161 For this to work correctly for a minor mode, the mode's indicator variable 161 For this to work correctly for a minor mode, the mode's indicator variable
162 (listed in `minor-mode-alist') must also be a function whose documentation 162 \(listed in `minor-mode-alist') must also be a function whose documentation
163 describes the minor mode." 163 describes the minor mode."
164 (interactive) 164 (interactive)
165 (with-output-to-temp-buffer "*Help*" 165 (with-output-to-temp-buffer "*Help*"
166 (princ mode-name) 166 (princ mode-name)
167 (princ " Mode:\n") 167 (princ " Mode:\n")
206 (interactive) 206 (interactive)
207 (describe-copying) 207 (describe-copying)
208 (let (case-fold-search) 208 (let (case-fold-search)
209 (search-forward "NO WARRANTY") 209 (search-forward "NO WARRANTY")
210 (recenter 0))) 210 (recenter 0)))
211
212 (defun describe-prefix-bindings ()
213 (interactive)
214 (let* ((key (this-command-keys))
215 (prefix (make-vector (1- (length key)) nil))
216 i)
217 (setq i 0)
218 (while (< i (length prefix))
219 (aset prefix i (aref key i))
220 (setq i (1+ i)))
221 (describe-bindings prefix)))
222 (setq prefix-help-command 'describe-prefix-bindings)
211 223
212 (defun view-emacs-news () 224 (defun view-emacs-news ()
213 "Display info on recent changes to Emacs." 225 "Display info on recent changes to Emacs."
214 (interactive) 226 (interactive)
215 (find-file-read-only (expand-file-name "NEWS" data-directory))) 227 (find-file-read-only (expand-file-name "NEWS" data-directory)))