Automatically fix themes that set ansi-term-color-vector to old version
Fixes `face-attribute: Invalid face: unspecified`
This commit is contained in:
parent
172e7065ca
commit
dc4dd6db74
@ -2119,17 +2119,29 @@ window is active in the perspective."
|
||||
(setq left-margin-width 0)
|
||||
(defvar-setq hl-line-mode nil))
|
||||
|
||||
(defun imalison:after-load-theme (&rest args)
|
||||
(when (fboundp 'powerline-reset)
|
||||
(powerline-reset))
|
||||
(imalison:restore-ansi-term-color-vector))
|
||||
|
||||
(when t
|
||||
(if (emacs24_4-p)
|
||||
(advice-add 'load-theme :after #'(lambda (&rest args)
|
||||
(when (fboundp 'powerline-reset)
|
||||
(powerline-reset))))
|
||||
(advice-add 'load-theme :after #'imalison:after-load-theme)
|
||||
(defadvice load-theme (after name activate)
|
||||
(when (fboundp 'powerline-reset)
|
||||
(powerline-reset)))))
|
||||
(imalison:after-load-theme))))
|
||||
|
||||
(when (file-exists-p custom-after-file) (load custom-after-file))
|
||||
|
||||
(defvar imalison:ansi-term-color-vector ansi-term-color-vector)
|
||||
|
||||
(defun imalison:ansi-term-color-vector-broken? ()
|
||||
(--some (or (eq it 'unspecified) (not (symbolp it)))
|
||||
(append ansi-term-color-vector nil)))
|
||||
|
||||
(defun imalison:restore-ansi-term-color-vector (&optional force)
|
||||
(when (or force (imalison:ansi-term-color-vector-broken?))
|
||||
(setq ansi-term-color-vector imalison:ansi-term-color-vector)))
|
||||
|
||||
(defun imalison:appearance (&optional frame)
|
||||
(interactive)
|
||||
(message "called set appearance")
|
||||
|
Loading…
Reference in New Issue
Block a user