diff options
Diffstat (limited to 'lisp/help-mode.el')
| -rw-r--r-- | lisp/help-mode.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index f115e425325..c478bf6d16c 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -272,6 +272,9 @@ Commands: (with-current-buffer buffer (bury-buffer)))) + (set (make-local-variable 'revert-buffer-function) + 'help-mode-revert-buffer) + (run-mode-hooks 'help-mode-hook)) ;;;###autoload @@ -783,6 +786,17 @@ Show all docs for that symbol as either a variable, function or face." (fboundp sym) (facep sym)) (help-do-xref pos #'help-xref-interned (list sym))))) +(defun help-mode-revert-buffer (ignore-auto noconfirm) + (when (or noconfirm (yes-or-no-p "Revert help buffer? ")) + (let ((pos (point)) + (item help-xref-stack-item) + ;; Pretend there is no current item to add to the history. + (help-xref-stack-item nil) + ;; Use the current buffer. + (help-xref-following t)) + (apply (car item) (cdr item)) + (goto-char pos)))) + (defun help-insert-string (string) "Insert STRING to the help buffer and install xref info for it. This function can be used to restore the old contents of the help buffer |
