summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-04-13 18:15:01 +0000
committerRichard M. Stallman <rms@gnu.org>1995-04-13 18:15:01 +0000
commit2f01fc1bd2d1ccb0b7ac211c5057158044a234f6 (patch)
tree10d061b45b98318fc405b557c3db94c5f991e087
parent7132eac7d0ffe9fbcd69e9d112c7d370b3a6b1d1 (diff)
downloademacs-2f01fc1bd2d1ccb0b7ac211c5057158044a234f6.tar.gz
(print-help-return-message): Check same-window-buffer-names
and same-window-regexps.
-rw-r--r--lisp/help.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 3b14a3a2fe9..9637c2f4b7a 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -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."