<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/test/lisp/progmodes/elisp-mode-resources, branch scratch/string-common-prefix</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>; elisp-scope.el: Improve face specification handling.</title>
<updated>2025-10-29T16:20:03+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-29T16:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=330aa07f00b24971c0b91352e94b93e00e9680ac'/>
<id>330aa07f00b24971c0b91352e94b93e00e9680ac</id>
<content type='text'>
Replace the use of 'elisp-scope-face(-1)' for analyzing face
specifications with 'elisp-scope-1' calls with an
appropriate OUTSPEC argument.  This allows us to analyze
face specifications even when they are not passed directly
to relevant functions, but rather appear in a tail position
of a form that evaluates to a face specification.

* lisp/emacs-lisp/elisp-scope.el
(elisp-scope--match-spec-to-arg): Add new 'face' spec.
Use it instead of...
(elisp-scope-face, elisp-scope-face-1): ...these functions.
Remove them, no longer used.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the use of 'elisp-scope-face(-1)' for analyzing face
specifications with 'elisp-scope-1' calls with an
appropriate OUTSPEC argument.  This allows us to analyze
face specifications even when they are not passed directly
to relevant functions, but rather appear in a tail position
of a form that evaluates to a face specification.

* lisp/emacs-lisp/elisp-scope.el
(elisp-scope--match-spec-to-arg): Add new 'face' spec.
Use it instead of...
(elisp-scope-face, elisp-scope-face-1): ...these functions.
Remove them, no longer used.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>; elisp-scope.el: Simplify 'custom-declare-face' analyzer.</title>
<updated>2025-10-29T15:32:14+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-29T15:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b9aa420bc4c9f5d940ff6dd4f5148cbe6d7b037e'/>
<id>b9aa420bc4c9f5d940ff6dd4f5148cbe6d7b037e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; elisp-scope.el: Fix error during widget args analysis</title>
<updated>2025-10-21T14:18:24+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-21T09:07:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=9f35d1653f5d82e382edd2499197f8c99d81241f'/>
<id>9f35d1653f5d82e382edd2499197f8c99d81241f</id>
<content type='text'>
* lisp/emacs-lisp/elisp-scope.el (elisp-scope--match-spec-to-arg):
Simplify and fix handling of empty list.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/emacs-lisp/elisp-scope.el (elisp-scope--match-spec-to-arg):
Simplify and fix handling of empty list.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Fix semantic highlighting in presence of shorthands</title>
<updated>2025-10-21T14:12:11+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-20T16:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=bb54174c21923832b9d8c461b19ca3f5f1bfeb12'/>
<id>bb54174c21923832b9d8c461b19ca3f5f1bfeb12</id>
<content type='text'>
So far, 'scope-elisp-analyze-form' would disable
'read-symbol-shorthands' while reading a source form in
order to obtain the "original" length of symbols and pass
that length to the callback called for each analyzed symbol.
However, 'scope-elisp-analyze-form' could report an
incorrect length when a symbol was written with redundant
escaping (e.g. 'f\oo').  Moreover, disabling
'read-symbol-shorthands' breaks macro-expansion during
analysis, because macros may expect "expanded" symbols,
without shorthands.

In this commit we address these issues by leaving
'scope-elisp-analyze-form' enabled (so we get expended
symbols for macro-expansion) and recovering the original
length lazily in the callback, if needed, by going to the
beginning of the symbol and searching forward for its end.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope--report):
Replace LEN argument with SYM, the analyzed symbol itself.
Adapt all callers.
(elisp-scope-analyze-form): Cease let-binding
'read-symbol-shorthands' to nil while reading.  Wrap
analysis in 'save-excursion' when reading from current
buffer.  Update docstring.
* lisp/progmodes/elisp-mode.el (elisp-local-references)
(elisp-fontify-symbol): Obtain symbol length from buffer.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test that incorporates 'read-symbol-shorthands'.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock):
Set up 'read-symbol-shorthands' in test file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far, 'scope-elisp-analyze-form' would disable
'read-symbol-shorthands' while reading a source form in
order to obtain the "original" length of symbols and pass
that length to the callback called for each analyzed symbol.
However, 'scope-elisp-analyze-form' could report an
incorrect length when a symbol was written with redundant
escaping (e.g. 'f\oo').  Moreover, disabling
'read-symbol-shorthands' breaks macro-expansion during
analysis, because macros may expect "expanded" symbols,
without shorthands.

In this commit we address these issues by leaving
'scope-elisp-analyze-form' enabled (so we get expended
symbols for macro-expansion) and recovering the original
length lazily in the callback, if needed, by going to the
beginning of the symbol and searching forward for its end.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope--report):
Replace LEN argument with SYM, the analyzed symbol itself.
Adapt all callers.
(elisp-scope-analyze-form): Cease let-binding
'read-symbol-shorthands' to nil while reading.  Wrap
analysis in 'save-excursion' when reading from current
buffer.  Update docstring.
* lisp/progmodes/elisp-mode.el (elisp-local-references)
(elisp-fontify-symbol): Obtain symbol length from buffer.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test that incorporates 'read-symbol-shorthands'.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock):
Set up 'read-symbol-shorthands' in test file.
</pre>
</div>
</content>
</entry>
<entry>
<title>; elisp-scope.el: Improve widget-type handling.</title>
<updated>2025-10-12T15:02:11+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-09T08:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=81867057529af488bfc1dde66581f2d546ac42f0'/>
<id>81867057529af488bfc1dde66581f2d546ac42f0</id>
<content type='text'>
Use argument specs to analyze complex widget types.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope-widget-type)
(elisp-scope-widget-type-1)
(elisp-scope-widget-type-keyword-arguments)
(elisp-scope-widget-type-arguments)
(elisp-scope-widget-type-arguments-1): Delete, no longer used.
(custom-declare-variable, define-widget): Simplify analyzers.
(elisp-scope--match-spec-to-arg): Add new 'list', 'and', and
'plist-and-then' parametric specs, and add 'widget-type' as a
new recursive spec.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el
Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use argument specs to analyze complex widget types.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope-widget-type)
(elisp-scope-widget-type-1)
(elisp-scope-widget-type-keyword-arguments)
(elisp-scope-widget-type-arguments)
(elisp-scope-widget-type-arguments-1): Delete, no longer used.
(custom-declare-variable, define-widget): Simplify analyzers.
(elisp-scope--match-spec-to-arg): Add new 'list', 'and', and
'plist-and-then' parametric specs, and add 'widget-type' as a
new recursive spec.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el
Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>; elisp-mode.el: Improve consistency among face names.</title>
<updated>2025-10-12T08:33:58+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-12T08:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=73feb431b3a82651d60bde1984a2de56519b2885'/>
<id>73feb431b3a82651d60bde1984a2de56519b2885</id>
<content type='text'>
Rename a couple of faces to solidify the convention that the
face name 'elisp-foo' implies "references to foo", not "foo
definitions".  For definitions we use 'elisp-deffoo' if foo is
only one word, or 'elisp-bar-baz-definition' otherwise.

* lisp/progmodes/elisp-mode.el (elisp-function-reference):
Rename to 'elisp-function'.
(elisp-macro-call): Rename to 'elisp-macro'.
(elisp-non-local-exit):
(elisp-unknown-call):
(elisp-special-form):
* lisp/emacs-lisp/elisp-scope.el:
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Update references to renamed faces.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename a couple of faces to solidify the convention that the
face name 'elisp-foo' implies "references to foo", not "foo
definitions".  For definitions we use 'elisp-deffoo' if foo is
only one word, or 'elisp-bar-baz-definition' otherwise.

* lisp/progmodes/elisp-mode.el (elisp-function-reference):
Rename to 'elisp-function'.
(elisp-macro-call): Rename to 'elisp-macro'.
(elisp-non-local-exit):
(elisp-unknown-call):
(elisp-special-form):
* lisp/emacs-lisp/elisp-scope.el:
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Update references to renamed faces.
</pre>
</div>
</content>
</entry>
<entry>
<title>; (elisp-scope-if-let): Fix case where bindings entry is a symbol</title>
<updated>2025-10-08T16:18:56+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-08T15:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e7df895c2ed9f9491fc1a585c2bff753ad7a5c3f'/>
<id>e7df895c2ed9f9491fc1a585c2bff753ad7a5c3f</id>
<content type='text'>
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-if-let): Fix
handling of a plain symbol as one the bindings in an
'if-let*' form, as in (if-let* (foo) 'bar).

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Test it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-if-let): Fix
handling of a plain symbol as one the bindings in an
'if-let*' form, as in (if-let* (foo) 'bar).

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Test it.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Add semantic highlighting test with 'when-let*'</title>
<updated>2025-10-07T22:06:00+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-07T21:57:35+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d1d06099d65c298c7260c26c131d4e5779b0f944'/>
<id>d1d06099d65c298c7260c26c131d4e5779b0f944</id>
<content type='text'>
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test form with 'when-let*'.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock):
Trust temporary test buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test form with 'when-let*'.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock):
Trust temporary test buffer.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Test semantic highlighting with 'cl-macrolet' and 'cl-flet'</title>
<updated>2025-10-06T09:00:03+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-06T09:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=81c5399012f7824186c0730a673998c2e09bab22'/>
<id>81c5399012f7824186c0730a673998c2e09bab22</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; Add another ELisp semantic highlighting test</title>
<updated>2025-10-04T09:08:17+00:00</updated>
<author>
<name>Eshel Yaron</name>
</author>
<published>2025-10-04T09:08:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ef08bdcd6d4668746e20b184e324112118c58e03'/>
<id>ef08bdcd6d4668746e20b184e324112118c58e03</id>
<content type='text'>
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test with code that uses 'cl-loop'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test with code that uses 'cl-loop'.
</pre>
</div>
</content>
</entry>
</feed>
