summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-04-08 11:37:15 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-04-08 11:37:15 -0400
commitcbb59342310c395a04b5dc85454938167793dd96 (patch)
tree833ee203c2b09cd9f826cc25081811d38e15a484 /lisp/help.el
parente3971c4440fc828326aaeec79d1a53638d67ed0f (diff)
downloademacs-cbb59342310c395a04b5dc85454938167793dd96.tar.gz
Remove internal_with_output_to_temp_buffer, replacing sole user with Lisp.
* lisp/help.el (help-form-show): New function, to be called from C. Put help-form output in a buffer named differently than *Help*. * src/keyboard.c (read_char): Call Lisp function help-form-show, instead of using internal_with_output_to_temp_buffer. (Qhelp_form_show): New var. * src/lisp.h (internal_with_output_to_temp_buffer): Remove prototype. * src/print.c (internal_with_output_to_temp_buffer): Function deleted.
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)