diff options
| -rw-r--r-- | lisp/help.el | 22 |
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. | ||
| 374 | We put that list in a buffer, and display the buffer. | ||
| 375 | |||
| 376 | The optional argument MENUS, if non-nil, says to mention menu bindings. | ||
| 377 | \(Ordinarily these are omitted from the output.) | ||
| 378 | The optional argument PREFIX, if non-nil, should be a key sequence; | ||
| 379 | then 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. |
| 373 | Argument is a command definition, usually a symbol with a function definition. | 388 | Argument 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)) |