aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 3ef700a6058..9baa1b7c884 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1291,6 +1291,9 @@ display the result of expression evaluation."
1291 (format " (#o%o, #x%x, %s)" value value char-string) 1291 (format " (#o%o, #x%x, %s)" value value char-string)
1292 (format " (#o%o, #x%x)" value value))))) 1292 (format " (#o%o, #x%x)" value value)))))
1293 1293
1294(defvar eval-expression-minibuffer-setup-hook nil
1295 "Hook run by `eval-expression' when entering the minibuffer.")
1296
1294;; We define this, rather than making `eval' interactive, 1297;; We define this, rather than making `eval' interactive,
1295;; for the sake of completion of names like eval-region, eval-buffer. 1298;; for the sake of completion of names like eval-region, eval-buffer.
1296(defun eval-expression (exp &optional insert-value) 1299(defun eval-expression (exp &optional insert-value)
@@ -1308,9 +1311,11 @@ If `eval-expression-debug-on-error' is non-nil, which is the default,
1308this command arranges for all errors to enter the debugger." 1311this command arranges for all errors to enter the debugger."
1309 (interactive 1312 (interactive
1310 (list (let ((minibuffer-completing-symbol t)) 1313 (list (let ((minibuffer-completing-symbol t))
1311 (read-from-minibuffer "Eval: " 1314 (minibuffer-with-setup-hook
1312 nil read-expression-map t 1315 (lambda () (run-hooks 'eval-expression-minibuffer-setup-hook))
1313 'read-expression-history)) 1316 (read-from-minibuffer "Eval: "
1317 nil read-expression-map t
1318 'read-expression-history)))
1314 current-prefix-arg)) 1319 current-prefix-arg))
1315 1320
1316 (if (null eval-expression-debug-on-error) 1321 (if (null eval-expression-debug-on-error)