1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-14 10:51:20 -07:00
emacs/test/lisp
Stefan Kangas 3d3c109460 Make font-lock face variables obsolete
Using these variables as "another mechanism for changing face
appearance" never really worked, since mode authors were free to use the
face instead of the variable (i.e. quoting the symbol).  This means that
when users customized the variables, it would change its appearance only
in some cases, which is a rather surprising interface.

Indeed, it turns out that some modes have not always been consistent,
and mixed using the variable and the face, increasing the confusion even
further.  Thus, the only thing users could rely on to always work was to
leave the variables at their default value, and to customize the face.

We now recommend customizing the face, and are obsoleting these
variables.  This will lead to some minor code-churn, but it is believed
that it will be ultimately worth it.  To fix existing Lisp code, you
should typically only need to quote the symbol, as this commit shows.

It might be the case that we will have to keep the obsolete variables,
that have been with us since Emacs 19, around for a longer time-period
than normal, to allow package authors to adapt.

* lisp/font-lock.el (font-lock-comment-face)
(font-lock-comment-delimiter-face, font-lock-string-face)
(font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face)
(font-lock-builtin-face, font-lock-function-name-face)
(font-lock-variable-name-face, font-lock-type-face)
(font-lock-constant-face, font-lock-warning-face)
(font-lock-negation-char-face, font-lock-preprocessor-face): Make face
variables obsolete in favor of customizing the faces directly
instead.  (Bug#71469)

* doc/lispref/modes.texi (Faces for Font Lock): Don't document above
obsolete variables.

* lisp/cedet/data-debug.el (data-debug-insert-hash-table)
(data-debug-insert-widget-properties, data-debug-insert-string)
(data-debug-insert-number):
* lisp/emacs-lisp/lisp-mode.el (elisp--font-lock-backslash)
(lisp-font-lock-syntactic-face-function):
* lisp/emacs-lisp/package.el (describe-package-1):
* lisp/generic-x.el (rc-generic-mode, rul-generic-mode):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes)
(c-maybe-font-lock-wrong-style-comments, c-font-lock-declarators)
(c-font-lock-c++-lambda-captures, c-font-lock-c++-modules):
* lisp/progmodes/cperl-mode.el (cperl-find-sub-attrs)
(cperl-look-at-leading-count, cperl-process-here-doc)
(cperl-find-pods-heres):
* lisp/progmodes/gdb-mi.el (gdb-init-1, gdb-update, gdb-running)
(gdb-starting, gdb-stopped, gdb-internals)
(gdb-breakpoints--add-breakpoint-row, gdb-locals-handler-custom)
(gdb-registers-handler-custom, gdb-get-source-file):
* lisp/progmodes/js.el (js--font-lock-keywords-1)
(js--font-lock-keywords-2, js-font-lock-syntactic-face-function):
* lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock):
* lisp/progmodes/meta-mode.el (meta-indent-in-string-p):
* lisp/progmodes/prolog.el (prolog-font-lock-keywords):
* lisp/progmodes/python.el (python-font-lock-syntactic-face-function):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--comment-font-lock):
* lisp/progmodes/sh-script.el (sh-font-lock-syntactic-face-function):
* lisp/textmodes/tex-mode.el (doctex-font-lock-syntactic-face-function):
* test/lisp/faces-tests.el (faces--test-color-at-point):
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-extra-delimiters)
(cperl-test-bug-47112, cperl-test-bug-65834, cperl-test-bug-66145)
(cperl-test-bug-66161, cperl-test-bug-69604):
* test/lisp/progmodes/python-tests.el
(python-ts-mode-compound-keywords-face)
(python-ts-mode-named-assignment-face-1)
(python-ts-mode-assignment-face-2, python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1, python-ts-mode-union-types-face-2)
(python-ts-mode-types-face-1, python-ts-mode-types-face-2)
(python-ts-mode-types-face-3, python-ts-mode-isinstance-type-face-1)
(python-ts-mode-isinstance-type-face-2)
(python-ts-mode-isinstance-type-face-3)
(python-ts-mode-superclass-type-face, python-ts-mode-class-patterns-face)
(python-ts-mode-dotted-decorator-face-1)
(python-ts-mode-dotted-decorator-face-2)
(python-ts-mode-builtin-call-face)
(python-ts-mode-interpolation-nested-string)
(python-ts-mode-level-fontification-wo-interpolation)
(python-ts-mode-disabled-string-interpolation)
(python-ts-mode-interpolation-doc-string):
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-heredoc-font-lock, ruby-heredoc-highlights-interpolations)
(ruby-exit!-font-lock, ruby-regexp-interpolation-is-highlighted)
(ruby-recognize-symbols-starting-with-at-character)
(ruby-hash-character-not-interpolation)
(ruby-interpolation-suppresses-quotes-inside)
(ruby-interpolation-suppresses-one-double-quote)
(ruby-interpolation-inside-percent-literal)
(ruby-interpolation-inside-percent-literal-with-paren)
(ruby-interpolation-inside-another-interpolation)
(ruby-interpolation-inside-double-quoted-percent-literals)
(ruby-no-interpolation-in-single-quoted-literals):
Don't use above obsolete variables.
* lisp/progmodes/cc-fonts.el (font-lock-constant-face): Don't
declare now-unused variable.
2024-12-18 03:48:35 +01:00
..
align-resources
auth-source-resources
bookmark-resources
calc
calendar Check for presuppositions in `calendar-date-is-valid-p' 2024-12-14 14:42:15 +02:00
cedet
custom-resources
dabbrev-resources Fix bugs in dabbrev-expand (bug#74090) 2024-10-31 12:12:25 +01:00
dired-resources/insert-directory
emacs-lisp (cl-labels): Add support for (FUNC EXP) bindings (bug#59786) 2024-11-12 22:58:53 -05:00
emulation
epg-resources
erc ; Mark failing tests in erc-scenarios-match.el as :unstable 2024-12-09 11:45:05 -08:00
eshell Remove 'eshell-escape-arg' 2024-11-23 22:40:43 -08:00
faces-resources
files-resources
gnus ; * test/lisp/gnus/gnus-icalendar-tests.el: remove unneeded unwind-protect 2024-09-11 10:04:24 +02:00
hfy-cmap-resources
image
international Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
loadhist-resources
mail Improve tests for flow-fill 2024-10-12 15:30:05 +03:00
mh-e
minibuffer-resources
net ; Minor fixes in tramp-tests.el 2024-12-03 13:23:28 +01:00
nxml
obsolete
org
pcmpl-linux-resources
play
progmodes Make font-lock face variables obsolete 2024-12-18 03:48:35 +01:00
saveplace-resources
so-long-tests
term
textmodes
time-resources
url
use-package
vc Test more vc-dir scenarios with Git (bug#68183) 2024-08-21 03:41:18 +03:00
xdg-resources
abbrev-tests.el
align-tests.el Rename treesitter test 2024-07-15 19:25:42 +02:00
allout-tests.el
allout-widgets-tests.el
ansi-color-tests.el
ansi-osc-tests.el
apropos-tests.el
arc-mode-tests.el
auth-source-pass-tests.el Fix discrepancies in auth-source-pass vs netrc behavior 2024-09-06 16:02:12 -07:00
auth-source-tests.el
autoinsert-tests.el
autorevert-tests.el Enhance the auto-revert to avoid revert a buffer in short time 2024-10-20 10:05:19 +02:00
battery-tests.el
bookmark-tests.el
buff-menu-tests.el
button-tests.el
calculator-tests.el
char-fold-tests.el
color-tests.el Add color-blend to blend two RGB lists 2024-11-09 12:40:18 +02:00
comint-tests.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
completion-preview-tests.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
completion-tests.el
cus-edit-tests.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
custom-tests.el New value 'permanent-only' for defcustom :local keyword 2024-10-02 01:25:50 +02:00
dabbrev-tests.el Fix the latest dabbrev-expand test fix 2024-12-03 10:38:26 +01:00
delim-col-tests.el
descr-text-tests.el
desktop-tests.el
dired-aux-tests.el
dired-tests.el Hide default-directory absolute file name in dired-hide-details-mode 2024-10-19 10:51:34 +03:00
dired-x-tests.el
dnd-tests.el ; Fix dnd-tests on MS-Windows 2024-09-22 12:57:08 +03:00
dom-tests.el
edmacro-tests.el
electric-tests.el ; Add test for deleting multiple pairs at once 2024-09-22 10:10:35 +02:00
elide-head-tests.el
env-tests.el
epg-config-tests.el
epg-tests.el
faces-tests.el Make font-lock face variables obsolete 2024-12-18 03:48:35 +01:00
ffap-tests.el
filenotify-tests.el
files-tests.el
files-x-tests.el
find-cmd-tests.el
font-lock-tests.el
format-spec-tests.el
help-fns-tests.el
help-mode-tests.el (pp): Indent lines right when starting in col > 0 2024-08-26 11:49:37 -04:00
help-tests.el
hfy-cmap-tests.el
hi-lock-tests.el
hl-line-tests.el
htmlfontify-tests.el
ibuffer-tests.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
ido-tests.el
image-file-tests.el
image-tests.el
imenu-tests.el
info-tests.el
info-xref-tests.el
isearch-tests.el
jit-lock-tests.el
json-tests.el
jsonrpc-tests.el
kmacro-tests.el
loadhist-tests.el
lpr-tests.el
ls-lisp-tests.el
man-tests.el
md4-tests.el
minibuffer-tests.el Correctly include fixed strings before a prefix wildcard in PCM 2024-09-14 12:24:08 +03:00
misc-tests.el
mouse-tests.el
mwheel-tests.el
newcomment-tests.el
obarray-tests.el
paren-tests.el
password-cache-tests.el
pcmpl-linux-tests.el
pcomplete-tests.el
proced-tests.el Skip proced refine tests on Darwin 2024-11-22 09:36:31 +01:00
ps-print-tests.el
register-tests.el
repeat-tests.el Rename the property 'repeat-continue-only' to 'repeat-continue' 2024-12-17 20:58:09 +02:00
replace-tests.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
rot13-tests.el
saveplace-tests.el
scroll-lock-tests.el
server-tests.el
ses-tests.el ; Fix typos 2024-06-23 16:40:06 +02:00
shadowfile-tests.el
shell-tests.el
simple-tests.el (undo-delta): Handle apply elements (bug#74523) 2024-11-25 10:13:38 -05:00
sort-tests.el
soundex-tests.el
speedbar-tests.el Add Speedbar tests (bug#73533) 2024-10-19 10:14:37 +03:00
sqlite-tests.el
startup-tests.el
subr-tests.el Fix wrong value of when and unless with empty body (bug#74215) 2024-11-06 15:27:33 +02:00
tab-bar-tests.el
tabify-tests.el
tar-mode-tests.el
tempo-tests.el
term-tests.el Fix term.el tests; refine previous change 2024-10-04 00:56:37 -04:00
thingatpt-tests.el
thread-tests.el
time-stamp-tests.el ; * test/lisp/time-stamp-tests.el: make checkdoc happier 2024-12-14 10:46:15 -08:00
time-tests.el
timezone-tests.el
uniquify-tests.el Don't fail uniquify-tests in non-version-controlled source trees 2024-09-13 12:17:17 +02:00
version-tests.el
wdired-tests.el * test/lisp/wdired-tests.el (wdired-test-bug34915): Fix for *BSD. 2024-12-07 15:14:00 +01:00
which-key-tests.el Fix copyright years by hand (Bug#72809) 2024-08-26 02:50:24 +02:00
whitespace-tests.el Make whitespace.el's cleanup add missing final newline 2024-06-29 16:01:50 +03:00
wid-edit-tests.el Fix regression in widget-move (bug#72995) 2024-09-14 12:42:49 +02:00
x-dnd-tests.el
xdg-tests.el
xml-tests.el
xt-mouse-tests.el Fix xt-mouse-tests.el in interactive mode 2024-12-14 09:37:17 +01:00
yank-media-tests.el