summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/help.el b/lisp/help.el
index e148e5ef6ab..b7f46a02155 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1256,6 +1256,15 @@ Select help window if the actual value of the user option
;; Reset `help-window' to nil to avoid confusing future calls of
;; `help-mode-finish' with plain `with-output-to-temp-buffer'.
(setq help-window nil))))
+
+;; Called from C, on encountering `help-char' when reading a char.
+;; Don't print to *Help*; that would clobber Help history.
+(defun help-form-show ()
+ "Display the output of a non-nil `help-form'."
+ (let ((msg (eval help-form)))
+ (if (stringp msg)
+ (with-output-to-temp-buffer " *Char Help*"
+ (princ msg)))))
(provide 'help)