]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/elisp-mode.el (eval-last-sexp, eval-defun): Fix thinko
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 24 Feb 2024 22:52:14 +0000 (17:52 -0500)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:52:20 +0000 (18:52 +0100)
(cherry picked from commit 9a801f0b4621a46149ccf650ed1dc27942157562)

lisp/progmodes/elisp-mode.el

index 1ff4410c1562460290711c8bb9e58facc770315e..1da1a9cddd72bd23bb37494c5030acbed99b1eab 100644 (file)
@@ -1629,7 +1629,8 @@ If `eval-expression-debug-on-error' is non-nil, which is the default,
 this command arranges for all errors to enter the debugger."
   (interactive "P")
   (values--store-value
-   (handler-bind ((error (if #'eval-expression--debug #'ignore)))
+   (handler-bind ((error (if eval-expression-debug-on-error
+                             #'eval-expression--debug #'ignore)))
      (elisp--eval-last-sexp eval-last-sexp-arg-internal))))
 
 (defun elisp--eval-defun-1 (form)
@@ -1768,7 +1769,8 @@ which see."
         (defvar edebug-all-defs)
         (eval-defun (not edebug-all-defs)))
        (t
-        (handler-bind ((error (if #'eval-expression--debug #'ignore)))
+        (handler-bind ((error (if eval-expression-debug-on-error
+                                  #'eval-expression--debug #'ignore)))
           (elisp--eval-defun)))))
 
 ;;; ElDoc Support