+2007-07-06 Andreas Schwab <schwab@suse.de>
+
+ * emacs-lisp/lisp-mode.el (eval-last-sexp): Avoid introducing any
+ dynamic bindings around the evaluation of the expression.
+ Reported by Jay Belanger <jay.p.belanger@gmail.com>.
+
2007-07-03 Dan Nicolaescu <dann@ics.uci.edu>
* progmodes/gud.el (auto-mode-alist): Match more valid gdb init
(interactive "P")
(if (null eval-expression-debug-on-error)
(eval-last-sexp-1 eval-last-sexp-arg-internal)
- (let ((old-value eval-last-sexp-fake-value) new-value value)
- (let ((debug-on-error old-value))
- (setq value (eval-last-sexp-1 eval-last-sexp-arg-internal))
- (setq new-value debug-on-error))
- (unless (eq old-value new-value)
- (setq debug-on-error new-value))
- value)))
+ (let ((value
+ (let ((debug-on-error eval-last-sexp-fake-value))
+ (cons (eval-last-sexp-1 eval-last-sexp-arg-internal)
+ debug-on-error))))
+ (unless (eq (cdr value) eval-last-sexp-fake-value)
+ (setq debug-on-error (cdr value)))
+ (car value))))
(defun eval-defun-1 (form)
"Treat some expressions specially.