diff options
| author | Richard M. Stallman | 1998-05-07 05:37:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-07 05:37:59 +0000 |
| commit | 613a39b91b664b7b8a4c7982362769bfb961068f (patch) | |
| tree | f32bd0a7421cb14a1197ad4f09b613ac34d8c650 | |
| parent | 7dcf11272e666a6f1b9407998f234f3edaadf613 (diff) | |
| download | emacs-613a39b91b664b7b8a4c7982362769bfb961068f.tar.gz emacs-613a39b91b664b7b8a4c7982362769bfb961068f.zip | |
(view-lossage): Set help-xref-stack* in the help buffer.
(describe-bindings): Likewise.
(help-xref-go-back): New arg BUFFER.
(help-make-xrefs): Specify the help buffer as arg for
help-xref-go-back.
| -rw-r--r-- | lisp/help.el | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/lisp/help.el b/lisp/help.el index 8a10d194ef6..fdd5c278519 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -461,9 +461,9 @@ With numeric argument display information on correspondingly older changes." | |||
| 461 | (goto-char (point-min)) | 461 | (goto-char (point-min)) |
| 462 | (while (progn (move-to-column 50) (not (eobp))) | 462 | (while (progn (move-to-column 50) (not (eobp))) |
| 463 | (search-forward " " nil t) | 463 | (search-forward " " nil t) |
| 464 | (insert "\n"))) | 464 | (insert "\n")) |
| 465 | (setq help-xref-stack nil | 465 | (setq help-xref-stack nil |
| 466 | help-xref-stack-item nil) | 466 | help-xref-stack-item nil)) |
| 467 | (print-help-return-message))) | 467 | (print-help-return-message))) |
| 468 | 468 | ||
| 469 | (defalias 'help 'help-for-help) | 469 | (defalias 'help 'help-for-help) |
| @@ -747,9 +747,10 @@ We put that list in a buffer, and display the buffer. | |||
| 747 | The optional argument PREFIX, if non-nil, should be a key sequence; | 747 | The optional argument PREFIX, if non-nil, should be a key sequence; |
| 748 | then we display only bindings that start with that prefix." | 748 | then we display only bindings that start with that prefix." |
| 749 | (interactive "P") | 749 | (interactive "P") |
| 750 | (setq help-xref-stack nil | 750 | (describe-bindings-internal nil prefix) |
| 751 | help-xref-stack-item nil) | 751 | (with-current-buffer "*Help*" |
| 752 | (describe-bindings-internal nil prefix)) | 752 | (setq help-xref-stack nil |
| 753 | help-xref-stack-item nil))) | ||
| 753 | 754 | ||
| 754 | (defun where-is (definition &optional insert) | 755 | (defun where-is (definition &optional insert) |
| 755 | "Print message listing key sequences that invoke specified command. | 756 | "Print message listing key sequences that invoke specified command. |
| @@ -972,7 +973,7 @@ that." | |||
| 972 | (insert "\n\n" help-back-label)) | 973 | (insert "\n\n" help-back-label)) |
| 973 | ;; Just to provide the match data: | 974 | ;; Just to provide the match data: |
| 974 | (looking-at (concat "\n\n\\(" (regexp-quote help-back-label) "\\)")) | 975 | (looking-at (concat "\n\n\\(" (regexp-quote help-back-label) "\\)")) |
| 975 | (help-xref-button 1 #'help-xref-go-back nil))) | 976 | (help-xref-button 1 #'help-xref-go-back (current-buffer)))) |
| 976 | ;; View mode steals RET from us. | 977 | ;; View mode steals RET from us. |
| 977 | (set (make-local-variable 'minor-mode-overriding-map-alist) | 978 | (set (make-local-variable 'minor-mode-overriding-map-alist) |
| 978 | (list (cons 'view-mode | 979 | (list (cons 'view-mode |
| @@ -1035,18 +1036,20 @@ help buffer." | |||
| 1035 | (set-buffer (window-buffer window)) | 1036 | (set-buffer (window-buffer window)) |
| 1036 | (help-follow pos)))) | 1037 | (help-follow pos)))) |
| 1037 | 1038 | ||
| 1038 | (defun help-xref-go-back () | 1039 | (defun help-xref-go-back (buffer) |
| 1039 | "Go back to the previous help buffer using info on `help-xref-stack'." | 1040 | "Go back to the previous help buffer text using info on `help-xref-stack'." |
| 1040 | (interactive) | 1041 | (interactive) |
| 1041 | (when help-xref-stack | 1042 | (let (item method args) |
| 1042 | (setq help-xref-stack (cdr help-xref-stack)) ; due to help-follow | 1043 | (with-current-buffer buffer |
| 1043 | (let* ((item (car help-xref-stack)) | 1044 | (when help-xref-stack |
| 1044 | (method (car item)) | 1045 | (setq help-xref-stack (cdr help-xref-stack)) ; due to help-follow |
| 1045 | (args (cdr item))) | 1046 | (setq item (car help-xref-stack) |
| 1046 | (setq help-xref-stack (cdr help-xref-stack)) | 1047 | method (car item) |
| 1047 | (if (listp args) | 1048 | args (cdr item)) |
| 1048 | (apply method args) | 1049 | (setq help-xref-stack (cdr help-xref-stack)))) |
| 1049 | (funcall method args))))) | 1050 | (if (listp args) |
| 1051 | (apply method args) | ||
| 1052 | (funcall method args)))) | ||
| 1050 | 1053 | ||
| 1051 | (defun help-go-back () | 1054 | (defun help-go-back () |
| 1052 | (interactive) | 1055 | (interactive) |