aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/ehelp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ehelp.el')
-rw-r--r--lisp/ehelp.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index abb897f73f6..281148d9cf6 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -193,7 +193,9 @@ BUFFER is put back into its original major mode."
193 (replace-buffer-in-windows buffer) 193 (replace-buffer-in-windows buffer)
194 ;; must do this outside of save-window-excursion 194 ;; must do this outside of save-window-excursion
195 (bury-buffer buffer)) 195 (bury-buffer buffer))
196 (eval electric-help-form-to-execute)))) 196 (if (functionp electric-help-form-to-execute)
197 (funcall electric-help-form-to-execute)
198 (eval electric-help-form-to-execute)))))
197 199
198(defun electric-help-command-loop () 200(defun electric-help-command-loop ()
199 (catch 'exit 201 (catch 'exit
@@ -349,14 +351,19 @@ will select it.)"
349;; continues with execute-extended-command. 351;; continues with execute-extended-command.
350(defun electric-help-execute-extended (_prefixarg) 352(defun electric-help-execute-extended (_prefixarg)
351 (interactive "p") 353 (interactive "p")
352 (setq electric-help-form-to-execute '(execute-extended-command nil)) 354 (setq electric-help-form-to-execute
355 (lambda () (execute-extended-command nil)))
353 (electric-help-retain)) 356 (electric-help-retain))
354 357
355;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then 358;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then
356;; continues with ctrl-x prefix. 359;; continues with ctrl-x prefix.
357(defun electric-help-ctrl-x-prefix (_prefixarg) 360(defun electric-help-ctrl-x-prefix (_prefixarg)
358 (interactive "p") 361 (interactive "p")
359 (setq electric-help-form-to-execute '(progn (message nil) (setq unread-command-char ?\C-x))) 362 (setq electric-help-form-to-execute
363 (lambda ()
364 (message nil)
365 (setq unread-command-events
366 (append unread-command-events '(?\C-x)))))
360 (electric-help-retain)) 367 (electric-help-retain))
361 368
362 369