From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Refreshing Info nodes Date: Wed, 16 Jun 2010 23:35:51 +0300 Organization: JURTA Message-ID: <87d3vqwxyk.fsf@mail.jurta.org> References: <87631mkeic.fsf@gmail.com> <87hbl54oi0.fsf@mail.jurta.org> <87r5k9clxh.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276723022 29839 80.91.229.12 (16 Jun 2010 21:17:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Jun 2010 21:17:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 16 23:17:01 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OOzym-0002qj-D4 for ged-emacs-devel@m.gmane.org; Wed, 16 Jun 2010 23:17:00 +0200 Original-Received: from localhost ([127.0.0.1]:53858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOzyl-0000Os-Jb for ged-emacs-devel@m.gmane.org; Wed, 16 Jun 2010 17:16:59 -0400 Original-Received: from [140.186.70.92] (port=52836 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOzwy-0007gv-UP for emacs-devel@gnu.org; Wed, 16 Jun 2010 17:15:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOzwx-0000NG-JN for emacs-devel@gnu.org; Wed, 16 Jun 2010 17:15:08 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:46274 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOzwx-0000N3-AT for emacs-devel@gnu.org; Wed, 16 Jun 2010 17:15:07 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.53.142.cable.starman.ee [82.131.53.142]) by mx1.starman.ee (Postfix) with ESMTP id F381E3F40CF; Thu, 17 Jun 2010 00:15:03 +0300 (EEST) In-Reply-To: (Stefan Monnier's message of "Mon, 14 Jun 2010 20:38:25 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126031 Archived-At: >>> 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/