aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/help.el
diff options
context:
space:
mode:
authorStefan Monnier2001-10-11 22:31:20 +0000
committerStefan Monnier2001-10-11 22:31:20 +0000
commit94ea540bda316cd73e2d8d69e8cb4114508dd4b3 (patch)
tree5d81ac70c2931a0059034b39e854e53e8617a301 /lisp/help.el
parentf059e1229b2bdfc48212fd37d0f7807d50a343af (diff)
downloademacs-94ea540bda316cd73e2d8d69e8cb4114508dd4b3.tar.gz
emacs-94ea540bda316cd73e2d8d69e8cb4114508dd4b3.zip
(describe-bindings-internal): New fun moved from keymap.c.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el22
1 files changed, 18 insertions, 4 deletions
diff --git a/lisp/help.el b/lisp/help.el
index b00ef78b468..c067214f992 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -319,7 +319,7 @@ With numeric argument, display information on correspondingly older changes."
319(defun view-emacs-FAQ () 319(defun view-emacs-FAQ ()
320 "Display the Emacs Frequently Asked Questions (FAQ) file." 320 "Display the Emacs Frequently Asked Questions (FAQ) file."
321 (interactive) 321 (interactive)
322;;; (find-file-read-only (expand-file-name "FAQ" data-directory)) 322 ;; (find-file-read-only (expand-file-name "FAQ" data-directory))
323 (info "(efaq)")) 323 (info "(efaq)"))
324 324
325(defun view-emacs-problems () 325(defun view-emacs-problems ()
@@ -368,6 +368,21 @@ to display (default, the current buffer)."
368 (help-setup-xref (list #'describe-bindings prefix buffer) 368 (help-setup-xref (list #'describe-bindings prefix buffer)
369 (interactive-p)))) 369 (interactive-p))))
370 370
371;; This function used to be in keymap.c.
372(defun describe-bindings-internal (&optional menus prefix)
373 "Show a list of all defined keys, and their definitions.
374We put that list in a buffer, and display the buffer.
375
376The optional argument MENUS, if non-nil, says to mention menu bindings.
377\(Ordinarily these are omitted from the output.)
378The optional argument PREFIX, if non-nil, should be a key sequence;
379then we display only bindings that start with that prefix."
380 (interactive)
381 (let ((buf (current-buffer)))
382 (with-output-to-temp-buffer "*Help*"
383 (with-current-buffer standard-output
384 (describe-buffer-bindings buf prefix menus)))))
385
371(defun where-is (definition &optional insert) 386(defun where-is (definition &optional insert)
372 "Print message listing key sequences that invoke the command DEFINITION. 387 "Print message listing key sequences that invoke the command DEFINITION.
373Argument is a command definition, usually a symbol with a function definition. 388Argument is a command definition, usually a symbol with a function definition.
@@ -463,10 +478,9 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
463 (memq 'drag modifiers)) 478 (memq 'drag modifiers))
464 (setq window (posn-window (event-start (aref key 0))) 479 (setq window (posn-window (event-start (aref key 0)))
465 position (posn-point (event-start (aref key 0))))) 480 position (posn-point (event-start (aref key 0)))))
466 (if (windowp window) 481 (when (windowp window)
467 (progn
468 (set-buffer (window-buffer window)) 482 (set-buffer (window-buffer window))
469 (goto-char position))) 483 (goto-char position))
470 (let ((defn (or (string-key-binding key) (key-binding key)))) 484 (let ((defn (or (string-key-binding key) (key-binding key))))
471 (if (or (null defn) (integerp defn)) 485 (if (or (null defn) (integerp defn))
472 (message "%s is undefined" (key-description key)) 486 (message "%s is undefined" (key-description key))