aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2007-07-06 17:30:06 +0000
committerAndreas Schwab2007-07-06 17:30:06 +0000
commit01d4effe81aa809fdab0c483371bf15356cc4c43 (patch)
tree3c970a35566a563f1b819a8698b4047a17e9f477
parent325ba046131c3366eded009f5b472cbf5b594dd0 (diff)
downloademacs-01d4effe81aa809fdab0c483371bf15356cc4c43.tar.gz
emacs-01d4effe81aa809fdab0c483371bf15356cc4c43.zip
(eval-last-sexp): Avoid introducing any
dynamic bindings around the evaluation of the expression.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp-mode.el14
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c6e7ef04cee..adfef8ab290 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12007-07-06 Andreas Schwab <schwab@suse.de>
2
3 * emacs-lisp/lisp-mode.el (eval-last-sexp): Avoid introducing any
4 dynamic bindings around the evaluation of the expression.
5 Reported by Jay Belanger <jay.p.belanger@gmail.com>.
6
12007-07-03 Dan Nicolaescu <dann@ics.uci.edu> 72007-07-03 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * progmodes/gud.el (auto-mode-alist): Match more valid gdb init 9 * progmodes/gud.el (auto-mode-alist): Match more valid gdb init
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 164756dfdc3..73379a816d7 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -628,13 +628,13 @@ this command arranges for all errors to enter the debugger."
628 (interactive "P") 628 (interactive "P")
629 (if (null eval-expression-debug-on-error) 629 (if (null eval-expression-debug-on-error)
630 (eval-last-sexp-1 eval-last-sexp-arg-internal) 630 (eval-last-sexp-1 eval-last-sexp-arg-internal)
631 (let ((old-value eval-last-sexp-fake-value) new-value value) 631 (let ((value
632 (let ((debug-on-error old-value)) 632 (let ((debug-on-error eval-last-sexp-fake-value))
633 (setq value (eval-last-sexp-1 eval-last-sexp-arg-internal)) 633 (cons (eval-last-sexp-1 eval-last-sexp-arg-internal)
634 (setq new-value debug-on-error)) 634 debug-on-error))))
635 (unless (eq old-value new-value) 635 (unless (eq (cdr value) eval-last-sexp-fake-value)
636 (setq debug-on-error new-value)) 636 (setq debug-on-error (cdr value)))
637 value))) 637 (car value))))
638 638
639(defun eval-defun-1 (form) 639(defun eval-defun-1 (form)
640 "Treat some expressions specially. 640 "Treat some expressions specially.