summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-09-22 14:15:56 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-09-22 14:54:15 +0200
commite4964de952a8246307faaf9875d2c278f42c53fc (patch)
treeabed0eca68ab4e72954e39d52bb791491d80519d /test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el
parente9f42b1cba08c3a20db86d8a98f7e9cfe22569d7 (diff)
downloademacs-e4964de952a8246307faaf9875d2c278f42c53fc.tar.gz
emacs-e4964de952a8246307faaf9875d2c278f42c53fc.tar.bz2
emacs-e4964de952a8246307faaf9875d2c278f42c53fc.zip
Don't rewrite `set` to `setq` of lexical variables
Only perform the rewrite (set 'VAR X) -> (setq VAR X) for dynamic variables, as `set` isn't supposed to affect lexical vars (and never does so when interpreted). * lisp/emacs-lisp/byte-opt.el (byte-optimize-set): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--xx): New. (bytecomp-tests--test-cases): Add test cases. * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el: Remove obsolete test.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el')
-rw-r--r--test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el3
1 files changed, 0 insertions, 3 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el b/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el
deleted file mode 100644
index 0c76c4d388b..00000000000
--- a/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el
+++ /dev/null
@@ -1,3 +0,0 @@
-;;; -*- lexical-binding: t -*-
-(defun foo ()
- (set '(a) nil))