Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid making redundant pseudo-obsolete-face aliases via inheritance #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions zenburn.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

(require 'color-theme)

(require 'cus-edit) ;; for custom-face-tag-face et. al
(require 'org-faces) ;; for org faces in alias clause

(defvar zenburn-fg "#dcdccc")
(defvar zenburn-bg-1 "#282828")
(defvar zenburn-bg "#3f3f3f")
Expand Down Expand Up @@ -797,7 +800,7 @@
;; Are these aliases still necessary?
(zenburn-make-face-alias-clauses
'(Buffer-menu-buffer-face
apt-utils-broken-face
; apt-utils-broken-face
apt-utils-description-face
apt-utils-field-contents-face
apt-utils-field-keyword-face
Expand Down Expand Up @@ -977,8 +980,8 @@
message-header-xheader-face
message-mml-face
message-separator-face
mtorus-highlight-face
mtorus-notify-highlight-face
; mtorus-highlight-face
; mtorus-notify-highlight-face
nxml-attribute-colon-face
nxml-attribute-local-name-face
nxml-attribute-prefix-face
Expand Down Expand Up @@ -1141,10 +1144,12 @@ static char *gnus-pointer[] = {
(error "Invalid face alias: %s" alias-name)
(let ((target-name (replace-regexp-in-string
".*\\(-face\\)" ""
alias-name nil nil 1)))
(push `(,(intern alias-name)
((t (:inherit ,(intern target-name)))))
clauses)))))))
alias-name nil nil 1))
(alias (intern alias-name)))
(unless (get alias 'face-alias)
(push `(,alias
((t (:inherit ,(intern target-name)))))
clauses))))))))

(defalias 'zenburn #'color-theme-zenburn)

Expand Down