aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2021-04-11 12:38:37 +0200
committerMattias EngdegÄrd2021-04-11 12:41:21 +0200
commit01a513bf0beb9478e2ef801ca28ebc992455fe3c (patch)
treed8a51e2abb3502b40460051206860b8e1b94f89f
parent0334fa0532e63f22486b5142fa399decf54b18c0 (diff)
downloademacs-01a513bf0beb9478e2ef801ca28ebc992455fe3c.tar.gz
emacs-01a513bf0beb9478e2ef801ca28ebc992455fe3c.zip
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.
-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