aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2025-04-12 11:11:38 -0400
committerStefan Monnier2025-04-12 11:11:38 -0400
commit17418125353ce998580ba8f0928ffd2c47af7df3 (patch)
tree7128dc536a29a4b50c10cb474c7e4d28490c68d5
parentd3c39fb522df50e460940bac10ff489564211d0a (diff)
downloademacs-17418125353ce998580ba8f0928ffd2c47af7df3.tar.gz
emacs-17418125353ce998580ba8f0928ffd2c47af7df3.zip
lisp/help.el (help-form-show): Improve last change (bug#77118)
Fill the buffer from within the `with-output-to-temp-buffer`, as before.
-rw-r--r--lisp/help.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/help.el b/lisp/help.el
index a06679b31f5..5cd97897767 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -2262,13 +2262,11 @@ The `temp-buffer-window-setup-hook' hook is called."
2262 "Display the output of a non-nil `help-form'." 2262 "Display the output of a non-nil `help-form'."
2263 (let ((msg (eval help-form t))) 2263 (let ((msg (eval help-form t)))
2264 (if (stringp msg) 2264 (if (stringp msg)
2265 (let ((bufname " *Char Help*")) 2265 (with-output-to-temp-buffer " *Char Help*"
2266 (with-output-to-temp-buffer bufname)
2267 ;; Use `insert' instead of `princ' so that keys in `help-form' 2266 ;; Use `insert' instead of `princ' so that keys in `help-form'
2268 ;; are displayed with `help-key-binding' face (bug#77118). 2267 ;; are displayed with `help-key-binding' face (bug#77118).
2269 (with-current-buffer bufname 2268 (with-current-buffer standard-output
2270 (let (buffer-read-only) 2269 (insert msg))))))
2271 (insert msg)))))))
2272 2270
2273(defun help--append-keystrokes-help (str) 2271(defun help--append-keystrokes-help (str)
2274 (let* ((keys (this-single-command-keys)) 2272 (let* ((keys (this-single-command-keys))