From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Chen Newsgroups: gmane.emacs.devel Subject: help-go-back Date: Sat, 08 May 2004 13:44:11 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: Reply-To: Karl Chen NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084049203 10947 80.91.224.253 (8 May 2004 20:46:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 20:46:43 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 08 22:46:34 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMYiQ-0002Jf-00 for ; Sat, 08 May 2004 22:46:34 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMYiP-0004JI-00 for ; Sat, 08 May 2004 22:46:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMYh0-0003A6-VU for emacs-devel@quimby.gnus.org; Sat, 08 May 2004 16:45:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMYgg-00039I-UJ for emacs-devel@gnu.org; Sat, 08 May 2004 16:44:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMYgA-00036j-29 for emacs-devel@gnu.org; Sat, 08 May 2004 16:44:45 -0400 Original-Received: from [128.32.47.228] (helo=hkn.eecs.berkeley.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.33) id 1BMYg9-00036R-OE for emacs-devel@gnu.org; Sat, 08 May 2004 16:44:13 -0400 Original-Received: from quarl by hkn.eecs.berkeley.edu with local id 1BMYg7-0005Yo-00 for ; Sat, 08 May 2004 13:44:11 -0700 Original-Received: by hkn.eecs.berkeley.edu (tmda-sendmail, from uid 606); Sat, 08 May 2004 13:44:11 -0700 (PDT) Original-To: Emacs Developement List X-Quack-Archive: 1 X-Delivery-Agent: TMDA/1.0.2 (Bold Forbes) X-Primary-Address: quarl@quarl.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22939 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22939 `Help-go-back' hasn't been working. Here are two possible fixes. I think `help-go-back' was kludgey before (that's why it broke) so patch #2 is better. It would also be nice if there were a `help-go-forward' (opposite of `help-go-back'). I can write this if there is interest. --- /home/quarl/local/Node-Linux-i686/stow/emacs-cvs/share/emacs/21.3.50/lisp/help-mode.el Sat May 8 13:24:44 2004 +++ /tmp/buffer-content-33160vh Sat May 8 13:24:58 2004 @@ -579,7 +579,7 @@ (defun help-go-back () "Invoke the [back] button (if any) in the Help mode buffer." (interactive) - (let ((back-button (button-at (1- (point-max))))) + (let ((back-button (button-at (- (point-max) 2)))) (if back-button (button-activate back-button) (error "No [back] button")))) --- /home/quarl/local/Node-Linux-i686/stow/emacs-cvs/share/emacs/21.3.50/lisp/.backup/help-mode.el.~1~ Thu Apr 29 11:43:32 2004 +++ /home/quarl/local/Node-Linux-i686/stow/emacs-cvs/share/emacs/21.3.50/lisp/help-mode.el Sat May 8 13:35:05 2004 @@ -577,12 +577,11 @@ (goto-char position))))) (defun help-go-back () - "Invoke the [back] button (if any) in the Help mode buffer." + "Go back to previous help buffer." (interactive) - (let ((back-button (button-at (1- (point-max))))) - (if back-button - (button-activate back-button) - (error "No [back] button")))) + (if help-xref-stack + (help-xref-go-back (current-buffer)) + (error "No previous help buffer."))) (defun help-do-xref (pos function args) "Call the help cross-reference function FUNCTION with args ARGS. -- Karl 2004-05-08 13:26