Skip to content

Instantly share code, notes, and snippets.

@jamescherti
Created July 8, 2024 17:31
Show Gist options
  • Save jamescherti/316e2f87b9e8f0af9a560ee594552083 to your computer and use it in GitHub Desktop.
Save jamescherti/316e2f87b9e8f0af9a560ee594552083 to your computer and use it in GitHub Desktop.
Emacs: Set all attributes of the specified FACE to `unspecified'.
;; Description: Set all attributes of the specified FACE to `unspecified'.
;; Gits URL: https://gist.github.com/jamescherti/316e2f87b9e8f0af9a560ee594552083
;; License: MIT
;; Author: James Cherti
(defun my-reset-face-attributes (face)
"Set all attributes of the specified FACE to `unspecified'."
(when (facep face)
(let ((attributes (face-all-attributes face)))
(dolist (attr attributes)
(set-face-attribute face nil (car attr) 'unspecified)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment