From 01a513bf0beb9478e2ef801ca28ebc992455fe3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 11 Apr 2021 12:38:37 +0200 Subject: [PATCH] Fix typo in cconv * lisp/emacs-lisp/cconv.el (cconv-convert): Typo. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case. --- lisp/emacs-lisp/cconv.el | 2 +- test/lisp/emacs-lisp/bytecomp-tests.el | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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." (let* ((class (and var (cconv--var-classification (list var) form))) (newenv (cond ((eq class :captured+mutated) - (cons `(,var . (car-save ,var)) env)) + (cons `(,var . (car-safe ,var)) env)) ((assq var env) (cons `(,var) env)) (t env))) (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 @@ (/ 1 0) (arith-error x)))) (list x y)) + + (funcall + (condition-case x + (/ 1 0) + (arith-error (prog1 (lambda (y) (+ y x)) + (setq x 10)))) + 4) ) "List of expressions for cross-testing interpreted and compiled code.") -- 2.39.2