]> git.eshelyaron.com Git - emacs.git/commitdiff
(print-help-return-message): Check same-window-buffer-names
authorRichard M. Stallman <rms@gnu.org>
Thu, 13 Apr 1995 18:15:01 +0000 (18:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 13 Apr 1995 18:15:01 +0000 (18:15 +0000)
and same-window-regexps.

lisp/help.el

index 3b14a3a2fe9fcb2911f4edfc2a6e3d57fed969dd..9637c2f4b7a952bf4158bb1b8e004a2e5a3d57cb 100644 (file)
@@ -190,8 +190,15 @@ If FUNCTION is nil, applies `message' to it, thus printing it."
                       (substitute-command-keys first-message)
                     "")
                   (if first-message "  " "")
-                  (substitute-command-keys
-                   "\\[scroll-other-window] to scroll the help."))))))
+                  (if (or (member (buffer-name standard-output)
+                                  same-window-buffer-names)
+                          (memq t (mapcar '(lambda (elt)
+                                             (string-match elt (buffer-name standard-output)))
+                                          same-window-regexps)))
+                      (substitute-command-keys
+                       "\\[scroll-up] to scroll the help.")
+                    (substitute-command-keys
+                     "\\[scroll-other-window] to scroll the help.")))))))
 
 (defun describe-key (key)
   "Display documentation of the function invoked by KEY.  KEY is a string."