[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Refreshing Info nodes
From: |
Juri Linkov |
Subject: |
Re: Refreshing Info nodes |
Date: |
Wed, 16 Jun 2010 23:35:51 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) |
>>> I think it should work also in variable help buffers, etc.
>> `revert-buffer-function' is not implemented for Help buffers at all.
>
> Indeed and that's a bug.
This patch fixes it:
=== modified file 'lisp/help-mode.el'
--- lisp/help-mode.el 2010-05-20 23:54:55 +0000
+++ lisp/help-mode.el 2010-06-16 20:34:05 +0000
@@ -271,6 +272,8 @@ (defun help-mode ()
;; also removes BUFFER from the selected window.
(with-current-buffer buffer
(bury-buffer))))
+ (set (make-local-variable 'revert-buffer-function)
+ 'help-mode-revert-buffer)
(run-mode-hooks 'help-mode-hook))
@@ -783,6 +786,15 @@ (defun help-follow-symbol (&optional pos
(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))
+ (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
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: Refreshing Info nodes, (continued)
- Re: Refreshing Info nodes, joakim, 2010/06/14
- Re: Refreshing Info nodes, Juri Linkov, 2010/06/15
- Re: Refreshing Info nodes, Wojciech Meyer, 2010/06/15
- Re: Refreshing Info nodes, Stefan Monnier, 2010/06/16
- Re: Refreshing Info nodes, Juri Linkov, 2010/06/16
- Re: Refreshing Info nodes, Stefan Monnier, 2010/06/16
- Re: Refreshing Info nodes, Juri Linkov, 2010/06/17
- Re: Refreshing Info nodes, Richard Stallman, 2010/06/17
- Re: Refreshing Info nodes, Wojciech Meyer, 2010/06/17
- Re: Refreshing Info nodes, Stefan Monnier, 2010/06/14
- Re: Refreshing Info nodes,
Juri Linkov <=
- Re: Refreshing Info nodes, Stefan Monnier, 2010/06/16
- Re: Refreshing Info nodes, Eli Zaretskii, 2010/06/14
- RE: Refreshing Info nodes, Drew Adams, 2010/06/14
- Re: Refreshing Info nodes, Juri Linkov, 2010/06/14
- Re: Refreshing Info nodes, Stefan Monnier, 2010/06/14
- Re: Refreshing Info nodes, Juri Linkov, 2010/06/16
- Re: Refreshing Info nodes, Stefan Monnier, 2010/06/16
- Re: Refreshing Info nodes, Juri Linkov, 2010/06/17