1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-31 11:10:51 -07:00
emacs/test/lisp/progmodes/elisp-mode-resources
Eshel Yaron 551231bb53
elisp-scope.el: Add variable value specifications
We add a symbol property 'elisp-scope-variable-spec', which
holds a specification for the values of a variable with that
property.  For example, (put 'foo '(symbol . face)) says
that the value of variable 'foo' is a face name.
This allows elisp-scope.el to analyze forms such as
(setq foo 'bar) and (let ((foo 'bar)) ...) more accurately.
This is also used for analyzing macros that let-bind (one of)
their arguments to a specific special variable, such as
'with-connection-local-application-variables'.

We initially add this new property to some common variables.

* lisp/emacs-lisp/elisp-scope.el: Add
'elisp-scope-variable-spec' property to
'coding-system-for-read/write' and 'major-mode'.
(elisp-scope--variable-spec): New defsubst.
(elisp-scope--let-1, elisp-scope-let*, elisp-scope-setq):
Use it.
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test form.
2026-02-18 19:42:47 +01:00
..
elisp-indents.erts Add some defvar indent tests 2021-10-18 11:35:51 +02:00
flet.erts lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption. 2021-11-08 07:38:41 +01:00
semantic-highlighting.el elisp-scope.el: Add variable value specifications 2026-02-18 19:42:47 +01:00
simple-shorthand-test.el test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el: Lexbind 2021-10-08 18:36:29 -04:00