From: Richard M. Stallman Date: Sat, 12 Jan 2002 21:00:17 +0000 (+0000) Subject: (help-xref-go-back): Restore POSITION in proper buffer and proper window. X-Git-Tag: ttn-vms-21-2-B4~17199 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=77144ebceb04ff63f284f470382f9e5e8747e416;p=emacs.git (help-xref-go-back): Restore POSITION in proper buffer and proper window. --- diff --git a/lisp/help-mode.el b/lisp/help-mode.el index e041f2f03e8..d424ff4db77 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -560,8 +560,10 @@ help buffer." 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."