emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refreshing Info nodes


From: Stefan Monnier
Subject: Re: Refreshing Info nodes
Date: Wed, 16 Jun 2010 20:49:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> === 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

Looks good, thanks.  Tho I think you'll need to bind help-xref-following
to make sure that in a *Help*<2> buffer you don't end up "reverting"
into a new *Help* buffer.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]