1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 15:00:34 -08:00
emacs/lisp/emacs-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
..
advice.el ad-activate-advised-definition: Use proper function objects 2024-05-30 18:57:56 -04:00
avl-tree.el
backquote.el
backtrace.el Allow escape from 'read-key' 2024-10-27 12:28:12 +02:00
benchmark.el
bindat.el
byte-opt.el Move pure+side-effect-free declarations to byte-opt.el 2024-12-16 00:05:06 +01:00
byte-run.el Add some basic checking for function type declarations 2024-07-24 19:20:11 +02:00
bytecomp.el Add support for TCP_NODELAY on network streams 2024-12-13 14:12:39 +01:00
cconv.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
chart.el Merge from origin/emacs-30 2024-10-12 05:53:27 -04:00
check-declare.el
checkdoc.el Merge from origin/emacs-30 2024-08-24 06:04:51 -04:00
cl-extra.el Use Emacs Lisp xref backend in Lisp Help buffers 2024-10-03 03:05:18 +03:00
cl-generic.el Improve navigation to cl-defgeneric uses 2024-05-26 05:56:14 +03:00
cl-indent.el
cl-lib.el
cl-macs.el (cl-labels): Add support for (FUNC EXP) bindings (bug#59786) 2024-11-12 22:58:53 -05:00
cl-preloaded.el Rename subr-native-elisp to native-comp-function (bug#71123) 2024-05-28 20:52:40 -04:00
cl-print.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
cl-seq.el Safer and faster string sorting 2024-05-12 14:58:38 +02:00
comp-common.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
comp-cstr.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
comp-run.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
comp.el ; Add an autoload cookie for native-compile-prune-cache 2024-12-09 15:17:40 +01:00
compat.el ; * lisp/emacs-lisp/compat.el: Fix header style. 2024-08-18 11:47:38 +02:00
cond-star.el ; Fix typos 2024-11-21 10:06:19 +01:00
copyright.el
crm.el Support minibuffer-visible-completions in completing-read-multiple 2024-08-07 19:52:36 +03:00
cursor-sensor.el
debug-early.el
debug.el debug.el: Prevent re-entering the debugger for the same error 2024-03-16 23:10:48 -04:00
derived.el
disass.el Redirect calls to subr-native-elisp-p to native-comp-function-p 2024-05-28 20:53:25 -04:00
easy-mmode.el ; Fix typos 2024-11-21 10:06:19 +01:00
easymenu.el ; Improve documentation of 'easy-menu-define' 2024-09-14 11:55:08 +03:00
edebug.el Call PF correctly from pcase--edebug-match-pat-args 2024-10-28 16:35:27 +00:00
eieio-base.el
eieio-core.el (cl-type-of): New function to return more precise types (bug#69739) 2024-03-18 09:29:47 -04:00
eieio-custom.el
eieio-datadebug.el
eieio-opt.el
eieio-speedbar.el
eieio.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
eldoc.el Checkdoc fixes in emacs-lisp/*.el 2024-07-08 14:30:37 +02:00
elint.el
elp.el
ert-font-lock.el Require ert-x for use by 'ert-font-lock-deftest-file' 2024-09-28 14:10:00 +03:00
ert-x.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
ert.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
ewoc.el
faceup.el
find-func.el find-function-mode: Define keys at a low precedence level 2024-10-04 20:46:00 +08:00
float-sup.el
generate-lisp-file.el
generator.el
generic.el
gv.el
helper.el
hierarchy.el
icons.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
inline.el
let-alist.el Support numeric indexing in let-alist 2024-09-19 03:54:59 +02:00
lisp-mnt.el Merge from savannah/emacs-30 2024-07-07 10:23:08 +08:00
lisp-mode.el Make font-lock face variables obsolete 2024-12-18 03:48:35 +01:00
lisp.el Prefer defcustom :local specifier 2024-10-04 01:38:11 +02:00
loaddefs-gen.el Merge from origin/emacs-30 2024-10-27 08:23:05 -04:00
macroexp.el Revert "Preserve source position of macro calls in macro expansions" 2024-10-20 17:05:32 +02:00
map-ynp.el Use substitute-command-keys in map-y-or-n-p 2024-12-16 21:46:12 +01:00
map.el
memory-report.el
multisession.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
nadvice.el ; Fix typos 2024-10-27 07:49:32 +01:00
oclosure.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
package-vc.el ; Touch up & fix documentation changes from last commit 2024-10-24 21:36:58 +08:00
package-x.el
package.el Make font-lock face variables obsolete 2024-12-18 03:48:35 +01:00
pcase.el Call PF correctly from pcase--edebug-match-pat-args 2024-10-28 16:35:27 +00:00
pp.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
radix-tree.el
range.el
re-builder.el
regexp-opt.el Change 'type' declaration to 'ftype' 2024-05-14 11:17:25 +02:00
regi.el
ring.el
rmc.el ; Fix typos in symbols 2024-06-29 17:29:38 +02:00
rx.el Remove misspelled rx category chinse-two-byte 2024-08-01 10:42:24 +02:00
seq.el ; * admin/MAINTAINERS: Remove Nicolas Petton. 2024-07-25 16:15:52 +02:00
shadow.el
shortdoc.el ; * lisp/vc/vc-git.el (vc-git--out-str): Doc fix. 2024-03-18 15:59:54 +02:00
shorthands.el
smie.el
subr-x.el Fix 'string-pixel-width' to not reset 'display-line-numbers' 2024-11-09 12:58:38 +02:00
syntax.el
tabulated-list.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
tcover-ses.el
testcover.el Declare nested backquotes unsupported in Pcase patterns (bug#72328) 2024-09-24 14:01:26 -04:00
text-property-search.el
thunk.el ; * admin/MAINTAINERS: Remove Nicolas Petton. 2024-07-25 16:15:52 +02:00
timer-list.el Use timer accessors instead of aref/aset 2024-07-25 14:40:35 +02:00
timer.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00
tq.el
trace.el
track-changes.el Merge from origin/emacs-30 2024-10-18 17:56:15 +02:00
unsafep.el
vtable.el Replace vtable--color-blend with color-blend 2024-11-09 12:40:56 +02:00
warnings.el Mark if-let and when-let obsolete 2024-10-24 16:50:07 +08:00