Skip to content

Commit

Permalink
Avoid making redundant pseudo-obsolete-face aliases via inheritance
Browse files Browse the repository at this point in the history
This was causing color-theme-select to recurse infinitely when trying
to resolve the inheritance.

Fixes dbrock#13
  • Loading branch information
dabrahams committed Oct 3, 2011
1 parent 0fd6649 commit a942799
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions zenburn.el
Expand Up @@ -26,6 +26,9 @@


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


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


Expand Down

0 comments on commit a942799

Please sign in to comment.