all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Refreshing Info nodes
Date: Wed, 16 Jun 2010 23:35:51 +0300	[thread overview]
Message-ID: <87d3vqwxyk.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvtyp5gmfn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 14 Jun 2010 20:38:25 -0400")

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



  reply	other threads:[~2010-06-16 20:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-13 17:51 Refreshing Info nodes Wojciech Meyer
2010-06-13 17:56 ` Deniz Dogan
2010-06-14 15:38   ` Juri Linkov
2010-06-14 18:34     ` Wojciech Meyer
2010-06-14 19:08     ` Stefan Monnier
2010-06-14 20:49       ` joakim
2010-06-14 21:59         ` Juri Linkov
2010-06-14 22:58           ` joakim
2010-06-15 21:35             ` Juri Linkov
2010-06-15 23:38               ` Wojciech Meyer
2010-06-16 13:39                 ` Stefan Monnier
2010-06-16 20:43                   ` Juri Linkov
2010-06-17  0:46                     ` Stefan Monnier
2010-06-17  8:29                       ` Juri Linkov
2010-08-28 20:38                   ` Wojciech Meyer
2010-08-28 20:50                     ` Eli Zaretskii
2010-08-28 22:17                       ` Wojciech Meyer
2010-08-29 15:18                         ` Wojciech Meyer
2010-09-11 13:19                           ` Stefan Monnier
2010-09-11 14:00                             ` Wojciech Meyer
2010-09-13  1:34                             ` Wojciech Meyer
2010-09-13 10:11                               ` Stefan Monnier
2010-09-13 10:22                                 ` Wojciech Meyer
2010-06-17  8:00                 ` Richard Stallman
2010-06-17  8:52                   ` Wojciech Meyer
2010-06-15  0:38           ` Stefan Monnier
2010-06-16 20:35             ` Juri Linkov [this message]
2010-06-17  0:49               ` Stefan Monnier
2010-06-15  3:00           ` Eli Zaretskii
2010-06-15  3:18             ` Drew Adams
2010-06-14 21:57       ` Juri Linkov
2010-06-15  0:42         ` Stefan Monnier
2010-06-16 20:33           ` Juri Linkov
2010-06-17  0:50             ` Stefan Monnier
2010-06-17 20:34               ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3vqwxyk.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.