summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/help.el9
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6dfcbdbcdc7..d17c98103a0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-08 Chong Yidong <cyd@stupidchicken.com>
+
+ * help.el (help-form-show): New function, to be called from C.
+ Put help-form output in a buffer named differently than *Help*.
+
2011-04-08 Eli Zaretskii <eliz@gnu.org>
* files.el (file-size-human-readable): New function.
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)