Skip to content

Add support for 'reset value of face attribute#61

Open
binarin wants to merge 1 commit into
emacsorphanage:masterfrom
binarin:git-emacs-face-attribute-reset
Open

Add support for 'reset value of face attribute#61
binarin wants to merge 1 commit into
emacsorphanage:masterfrom
binarin:git-emacs-face-attribute-reset

Conversation

@binarin

@binarin binarin commented May 15, 2026

Copy link
Copy Markdown

Newer emacs introduces new possible value for the face attributes - 'reset.

This is from the elisp manual from the fresh git emacs:

A face attribute can also have the value ‘reset’.  This special value
stands for the value of the corresponding attribute of the ‘default’
face.

Also it looks like this is yet unhandled problem for the
htmlfontify-buffer included in emacs itself: https://lists.gnu.org/archive/html/bug-gnu-emacs/2026-05/msg00923.html

This is from the elisp manual from the fresh git emacs:
A face attribute can also have the value ‘reset’.  This special value
stands for the value of the corresponding attribute of the ‘default’
face.

Also it looks like this was the problem for the internal
htmlfontify-buffer:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2026-05/msg00923.html
@binarin

binarin commented May 15, 2026

Copy link
Copy Markdown
Author

And this is a temporary workaround that can be added to a emacs config:

(advice-add 'htmlize-face-color-internal :around
            (defun b/htmlize-face-reset-workaround (orig-fun face bg)
              (pcase (funcall orig-fun face bg)
                ('reset (funcall orig-fun 'default bg))
                (val))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants