]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-mode-finish): Set help-return-alist first
authorRichard M. Stallman <rms@gnu.org>
Tue, 20 Apr 2004 20:53:01 +0000 (20:53 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 20 Apr 2004 20:53:01 +0000 (20:53 +0000)
thing, setting only the entry for the selected window.

lisp/help-mode.el

index 149eebb3d360313365169b82787eb31bf9145480..4499f5c48cb2295e9a8ed605d09a17bc117473d5 100644 (file)
@@ -195,14 +195,17 @@ Commands:
 
 ;;;###autoload
 (defun help-mode-finish ()
+  (let ((entry (assq (selected-window) view-return-to-alist)))
+       (if entry (setcdr entry (cons (selected-window)
+                                     help-return-method))
+         (setq view-return-to-alist
+               (cons (cons (selected-window) help-return-method)
+                     view-return-to-alist))))
   (when (eq major-mode 'help-mode)
     ;; View mode's read-only status of existing *Help* buffer is lost
     ;; by with-output-to-temp-buffer.
     (toggle-read-only 1)
-    (help-make-xrefs (current-buffer)))
-  (setq view-return-to-alist
-       (list (cons (selected-window) help-return-method))))
-
+    (help-make-xrefs (current-buffer))))
 \f
 ;; Grokking cross-reference information in doc strings and
 ;; hyperlinking it.