Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid making redundant pseudo-obsolete-face aliases via inheritance

This was causing color-theme-select to recurse infinitely when trying
to resolve the inheritance.

Fixes #13
(cherry picked from commit a942799)
  • Loading branch information...
commit 0e5555d522177f5f170b94b2ecf3b37e5feaabbc 1 parent f122959
@dabrahams dabrahams authored committed
Showing with 10 additions and 4 deletions.
  1. +10 −4 zenburn.el
View
14 zenburn.el
@@ -25,6 +25,10 @@
(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 "#2b2b2b")
@@ -104,10 +108,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 `(,(intern alias-name)
+ ((t (:inherit ,(intern target-name)))))
+ clauses))))))))
;;;###autoload
(defun color-theme-zenburn ()
Please sign in to comment.
Something went wrong with that request. Please try again.