diff options
| author | Michael Shields | 2025-04-19 12:58:26 -0700 |
|---|---|---|
| committer | Eli Zaretskii | 2025-04-27 10:48:55 +0300 |
| commit | ebcde0f90f67852d485a36941b0661cfd1b892eb (patch) | |
| tree | 15178cd179ded1f70cb42c2d429255939d7dbc51 /doc/misc | |
| parent | 0c55cd0e176cc73178e8f18d959d5a6f9bf632de (diff) | |
| download | emacs-ebcde0f90f67852d485a36941b0661cfd1b892eb.tar.gz emacs-ebcde0f90f67852d485a36941b0661cfd1b892eb.zip | |
Fix use-package :custom-face to set face-defface-spec (bug#77928)
By default, `face-set-spec' sets the override face spec, so face
attributes are combined with defaults rather than replacing them.
This was a behavior change that was an apparently unintended
consequence of commit 6b344a9.
Also set the `face-modified' property, which causes Customize to
flag the face as changed outside Customize.
* doc/misc/use-package.texi (Faces): Document the behavior.
* lisp/use-package/use-package-core.el (use-package-handler/:custom-face):
(use-package): Improve docstring to reflect implementation.
* test/lisp/use-package/use-package-tests.el
(use-package-test/:custom-face-1): (use-package-test/:custom-face-2):
(use-package-test/:custom-face-3): (use-package-test/:custom-face-4):
Add tests.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/use-package.texi | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index c8630cee1c9..2f980df9f45 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi | |||
| @@ -1471,7 +1471,7 @@ faces. Example: | |||
| 1471 | (use-package example | 1471 | (use-package example |
| 1472 | :custom-face | 1472 | :custom-face |
| 1473 | (example-1-face ((t (:foreground "LightPink")))) | 1473 | (example-1-face ((t (:foreground "LightPink")))) |
| 1474 | (example-2-face ((t (:foreground "LightGreen"))) face-defspec-spec)) | 1474 | (example-2-face ((t (:foreground "LightGreen"))))) |
| 1475 | @end group | 1475 | @end group |
| 1476 | 1476 | ||
| 1477 | @group | 1477 | @group |
| @@ -1486,6 +1486,11 @@ faces. Example: | |||
| 1486 | @end group | 1486 | @end group |
| 1487 | @end lisp | 1487 | @end lisp |
| 1488 | 1488 | ||
| 1489 | Similarly to @code{:custom} (@pxref{User options}), this allows | ||
| 1490 | configuring customizable faces outside of Customize (@pxref{Saving | ||
| 1491 | Customizations,,, emacs, GNU Emacs Manual}). Using both systems to | ||
| 1492 | configure the same face can lead to confusing results. | ||
| 1493 | |||
| 1489 | @node Hiding minor modes | 1494 | @node Hiding minor modes |
| 1490 | @section Hiding minor modes with diminish and delight | 1495 | @section Hiding minor modes with diminish and delight |
| 1491 | @cindex hiding minor modes | 1496 | @cindex hiding minor modes |