diff lisp/help-mode.el @ 42680:3814cb15269e

(help-xref-go-back): Restore POSITION in proper buffer and proper window.
author Richard M. Stallman <rms@gnu.org>
date Sat, 12 Jan 2002 21:00:17 +0000
parents dbb64f2b3684
children 6499a200d5d5
line wrap: on
line diff
--- a/lisp/help-mode.el	Sat Jan 12 20:53:27 2002 +0000
+++ b/lisp/help-mode.el	Sat Jan 12 21:00:17 2002 +0000
@@ -560,8 +560,10 @@
 	      method (cadr item)
 	      args (cddr item))))
     (apply method args)
-    ;; FIXME: are we sure we're in the right buffer ?
-    (goto-char position)))
+    (with-current-buffer buffer
+      (if (get-buffer-window buffer)
+	  (set-window-point (get-buffer-window buffer) position)
+	(goto-char position)))))
 
 (defun help-go-back ()
   "Invoke the [back] button (if any) in the Help mode buffer."