aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/cconv.el2
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el7
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index afaa13a8695..b37cfebab31 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -498,7 +498,7 @@ places where they originally did not directly appear."
498 (let* ((class (and var (cconv--var-classification (list var) form))) 498 (let* ((class (and var (cconv--var-classification (list var) form)))
499 (newenv 499 (newenv
500 (cond ((eq class :captured+mutated) 500 (cond ((eq class :captured+mutated)
501 (cons `(,var . (car-save ,var)) env)) 501 (cons `(,var . (car-safe ,var)) env))
502 ((assq var env) (cons `(,var) env)) 502 ((assq var env) (cons `(,var) env))
503 (t env))) 503 (t env)))
504 (msg (when (eq class :unused) 504 (msg (when (eq class :unused)
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 94e33a7770e..a11832d805e 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -437,6 +437,13 @@
437 (/ 1 0) 437 (/ 1 0)
438 (arith-error x)))) 438 (arith-error x))))
439 (list x y)) 439 (list x y))
440
441 (funcall
442 (condition-case x
443 (/ 1 0)
444 (arith-error (prog1 (lambda (y) (+ y x))
445 (setq x 10))))
446 4)
440 ) 447 )
441 "List of expressions for cross-testing interpreted and compiled code.") 448 "List of expressions for cross-testing interpreted and compiled code.")
442 449