aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/samples.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-30 10:39:52 -0400
committerCraig Jennings <c@cjennings.net>2026-06-30 10:39:52 -0400
commit3ec5eef7025d2bdbb9efbb2dc1026d65ca3a8590 (patch)
treeed25021c7f7b265b51dccd73095cef361459abe8 /scripts/theme-studio/samples.py
parentb7e4c817dbe278831015b8b406d60a4f42ae5160 (diff)
downloaddotemacs-3ec5eef7025d2bdbb9efbb2dc1026d65ca3a8590.tar.gz
dotemacs-3ec5eef7025d2bdbb9efbb2dc1026d65ca3a8590.zip
feat(theme-studio): surface the five remaining font-lock faces
Add the font-lock faces the syntax tier didn't cover (warning, doc-markup, negation-char, and the two regexp-grouping faces) as their own editable categories: warn, dmark, neg, rxgb, rxgc. Each maps 1:1 to its face, seeds from the stock defaults, and is exercised in the code-sample preview via a TODO comment, a docstring substitution, a string regexp, and a C negation. Injected only the five new faces into the default-faces snapshot rather than regenerating it wholesale. A full recapture pulls in unrelated package-inventory drift.
Diffstat (limited to 'scripts/theme-studio/samples.py')
-rw-r--r--scripts/theme-studio/samples.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/theme-studio/samples.py b/scripts/theme-studio/samples.py
index 585fff04c..feebd1b71 100644
--- a/scripts/theme-studio/samples.py
+++ b/scripts/theme-studio/samples.py
@@ -43,6 +43,7 @@ PYS=[
]
ELS=[
[('cmd',';;'),('cm',' cache.el')],
+ [('cmd',';;'),('cm',' '),('warn','TODO'),('cm',': add an LRU eviction policy')],
[('punc','('),('kw','require'),('p',' '),('con',"'cl-lib"),('punc',')')],
[],
[('punc','('),('kw','defvar'),('p',' '),('var','cache--tbl'),('p',' '),('punc','('),('fnc','make-hash-table'),('p',' '),('con',':test'),('p',' '),('con',"'equal"),('punc','))')],
@@ -55,7 +56,7 @@ ELS=[
[('p',' '),('punc','('),('fnc','puthash'),('p',' '),('var','key'),('p',' '),('var','v'),('p',' '),('var','cache--tbl'),('punc',') '),('var','v'),('punc','))))')],
[],
[('punc','('),('kw','defun'),('p',' '),('fnd','cache-clear'),('p',' '),('punc','()')],
- [('p',' '),('doc','"Empty the memo table."')],
+ [('p',' '),('doc','"Empty the memo table. See '),('dmark','\\\\[cache-get]'),('doc','."')],
[('p',' '),('punc','('),('kw','interactive'),('punc',')')],
[('p',' '),('punc','('),('fnc','clrhash'),('p',' '),('var','cache--tbl'),('punc',')')],
[('p',' '),('punc','('),('fnc','message'),('p',' '),('str','"cleared'),('esc','\\n'),('str','"'),('punc','))')],
@@ -66,6 +67,9 @@ ELS=[
[('p',' '),('punc','('),('fnc','maphash'),('p',' '),('punc','('),('kw','lambda'),('p',' '),('punc','('),('var','k'),('p',' '),('var','_v'),('punc',')'),('p',' '),('punc','('),('fnc','push'),('p',' '),('var','k'),('p',' '),('var','acc'),('punc','))')],
[('p',' '),('var','cache--tbl'),('punc',')'),('p',' '),('var','acc'),('punc','))')],
[],
+ [('punc','('),('kw','defun'),('p',' '),('fnd','cache--key-p'),('p',' '),('punc','('),('var','s'),('punc',')')],
+ [('p',' '),('punc','('),('fnc','string-match'),('p',' '),('str','"'),('rxgb','\\\\'),('rxgc','('),('str','key'),('rxgb','\\\\'),('rxgc',')'),('str','"'),('p',' '),('var','s'),('punc','))')],
+ [],
[('punc','('),('kw','provide'),('p',' '),('con',"'cache"),('punc',')')],
]
GOS=[
@@ -134,7 +138,7 @@ CS=[
[],
[('cmd','//'),('cm',' returns -1 on null input')],
[('ty','int'),('p',' '),('fnd','push'),('punc','('),('ty','Order'),('p',' '),('op','*'),('var','o'),('punc',')'),('p',' '),('dec','__attribute__'),('punc','(('),('dec','nonnull'),('punc','))'),('p',' '),('punc','{')],
- [('p',' '),('kw','if'),('p',' '),('punc','('),('var','o'),('p',' '),('op','=='),('p',' '),('con','NULL'),('punc',')'),('p',' '),('kw','return'),('p',' '),('num','-1'),('punc',';')],
+ [('p',' '),('kw','if'),('p',' '),('punc','('),('neg','!'),('var','o'),('punc',')'),('p',' '),('kw','return'),('p',' '),('num','-1'),('punc',';')],
[('p',' '),('fnc','printf'),('punc','('),('str','"id=%d'),('esc','\\n'),('str','"'),('punc',','),('p',' '),('var','o'),('op','->'),('prop','id'),('punc',');')],
[('p',' '),('kw','return'),('p',' '),('num','0'),('punc',';')],
[('punc','}')],