emacs-devel
[Top][All Lists]
Advanced

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

help-go-back


From: Karl Chen
Subject: help-go-back
Date: Sat, 08 May 2004 13:44:11 -0700

`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




reply via email to

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