[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/moe-theme 799540922e 160/352: If (featurep 'powerline) is
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/moe-theme 799540922e 160/352: If (featurep 'powerline) is nil, don't defun powerline-moe-theme. |
Date: |
Fri, 7 Jan 2022 03:59:17 -0500 (EST) |
branch: elpa/moe-theme
commit 799540922eb5e396d6fd26e147af24f916efddd9
Author: kuanyui <azazabc123@gmail.com>
Commit: kuanyui <azazabc123@gmail.com>
If (featurep 'powerline) is nil, don't defun powerline-moe-theme.
---
moe-theme.el | 109 +++++++++++++++++++++++++++++------------------------------
1 file changed, 53 insertions(+), 56 deletions(-)
diff --git a/moe-theme.el b/moe-theme.el
index a2dda55b12..272daf2460 100644
--- a/moe-theme.el
+++ b/moe-theme.el
@@ -411,60 +411,24 @@ You may also like `moe-theme-random-color'"
(if (eq moe-theme-powerline-enable-p t)
(powerline-moe-theme))))
-(if (commandp 'powerline-revert)
- (defadvice powerline-revert (after moe-theme-powerline-revert activate)
- "Auto set `moe-theme-powerline-enable-p' to nil after `powerline-revert'
+(when (featurep 'powerline)
+ (defadvice powerline-revert (after moe-theme-powerline-revert activate)
+ "Auto set `moe-theme-powerline-enable-p' to nil after `powerline-revert'
Because when `powerline-moe-theme' has been run, `moe-theme-select-color'
and `moe-theme-random-color' should call `powerline-moe-theme' again for
update."
- (setq moe-theme-powerline-enable-p nil)))
+ (setq moe-theme-powerline-enable-p nil))
-(defun powerline-moe-theme ()
- "Powerline theme powered by moe-theme.el
+ (defun powerline-moe-theme ()
+ "Powerline theme powered by moe-theme.el
It's recommended use this with `moe-light' or `moe-dark', but it's ok without
them,
as long as setq `moe-theme-mode-line-color' first."
- (interactive)
- (if (commandp 'powerline-default-theme)
- (progn
- (cond ((eq (frame-parameter nil 'background-mode) 'light)
- (set-face-attribute 'mode-line-buffer-id nil :background nil
:foreground "#1c1c1c")
- (set-face-attribute 'mode-line-inactive nil :background
"#b2b2b2" :foreground "#ffffff")
- (set-face-attribute 'powerline-active2 nil :background
"#585858" :foreground "#ffffff")
- (set-face-attribute 'powerline-inactive1 nil :background
"#c6c6c6" :foreground "#585858")
- (set-face-attribute 'powerline-inactive2 nil :background
"#e4e4e4" :foreground "#585858")
- (cond ((eq moe-theme-mode-line-color 'blue)
- (set-face-attribute 'mode-line nil :background "#5fafd7"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#afd7ff" :foreground "#005faf"))
- ((eq moe-theme-mode-line-color 'green)
- (set-face-attribute 'mode-line nil :background "#a1db00"
:foreground "#005f00")
- (set-face-attribute 'powerline-active1 nil :background
"#d7ff87" :foreground "#008700"))
- ((eq moe-theme-mode-line-color 'orange)
- (set-face-attribute 'mode-line nil :background "#ff8700"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#ffd787" :foreground "#d75f00"))
- ((eq moe-theme-mode-line-color 'magenta)
- (set-face-attribute 'mode-line nil :background "#ff4ea3"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#ffafff" :foreground "#ff1f8b"))
- ((eq moe-theme-mode-line-color 'yellow)
- (set-face-attribute 'mode-line nil :background "#fce94f"
:foreground "#875f00")
- (set-face-attribute 'powerline-active1 nil :background
"#ffff87" :foreground "#875f00"))
- ((eq moe-theme-mode-line-color 'purple)
- (set-face-attribute 'mode-line nil :background "#af5fd7"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#e6a8df" :foreground "#6c0099"))
- ((eq moe-theme-mode-line-color 'red)
- (set-face-attribute 'mode-line nil :background "#ff4b4b"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#ffafaf" :foreground "#cc0000"))
- ((eq moe-theme-mode-line-color 'cyan)
- (set-face-attribute 'mode-line nil :background "#5faf87"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#87d7af" :foreground "#005f5f"))
- ((eq moe-theme-mode-line-color 'w/b)
- (set-face-attribute 'mode-line nil :background "#1c1c1c"
:foreground "#ffffff")
- (set-face-attribute 'powerline-active1 nil :background
"#bcbcbc" :foreground "#3a3a3a")
- (set-face-attribute 'mode-line-buffer-id nil :background
nil :foreground "#ffffff"))))
- ((eq (frame-parameter nil 'background-mode) 'dark)
- (set-face-attribute 'mode-line-buffer-id nil :background nil
:foreground "#080808")
- (set-face-attribute 'mode-line-inactive nil :background "#4e4e4e"
:foreground "#9e9e9e")
- (set-face-attribute 'powerline-active2 nil :background "#ffffff"
:foreground "#3a3a3a")
- (set-face-attribute 'powerline-inactive1 nil :background
"#626262" :foreground "#eeeeee")
- (set-face-attribute 'powerline-inactive2 nil :background
"#767676" :foreground "#e4e4e4")
+ (interactive)
+ (cond ((eq (frame-parameter nil 'background-mode) 'light)
+ (set-face-attribute 'mode-line-buffer-id nil :background nil
:foreground "#1c1c1c")
+ (set-face-attribute 'mode-line-inactive nil :background "#b2b2b2"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active2 nil :background "#585858"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-inactive1 nil :background
"#c6c6c6" :foreground "#585858")
+ (set-face-attribute 'powerline-inactive2 nil :background
"#e4e4e4" :foreground "#585858")
(cond ((eq moe-theme-mode-line-color 'blue)
(set-face-attribute 'mode-line nil :background "#5fafd7"
:foreground "#ffffff")
(set-face-attribute 'powerline-active1 nil :background
"#afd7ff" :foreground "#005faf"))
@@ -490,14 +454,47 @@ as long as setq `moe-theme-mode-line-color' first."
(set-face-attribute 'mode-line nil :background "#5faf87"
:foreground "#ffffff")
(set-face-attribute 'powerline-active1 nil :background
"#87d7af" :foreground "#005f5f"))
((eq moe-theme-mode-line-color 'w/b)
- (set-face-attribute 'mode-line nil :background "#ffffff"
:foreground "#080808")
+ (set-face-attribute 'mode-line nil :background "#1c1c1c"
:foreground "#ffffff")
(set-face-attribute 'powerline-active1 nil :background
"#bcbcbc" :foreground "#3a3a3a")
- (set-face-attribute 'mode-line-buffer-id nil :background
nil :foreground "#3a3a3a")))))
- (powerline-default-theme)
- (powerline-reset)
- (setq moe-theme-powerline-enable-p t))
- (message "Powerline not found. Please install first and (require
'powerline)." )))
-;; If you want to use Powerline, please run `powerline-moe-theme'
+ (set-face-attribute 'mode-line-buffer-id nil :background
nil :foreground "#ffffff"))))
+ ((eq (frame-parameter nil 'background-mode) 'dark)
+ (set-face-attribute 'mode-line-buffer-id nil :background nil
:foreground "#080808")
+ (set-face-attribute 'mode-line-inactive nil :background "#4e4e4e"
:foreground "#9e9e9e")
+ (set-face-attribute 'powerline-active2 nil :background "#ffffff"
:foreground "#3a3a3a")
+ (set-face-attribute 'powerline-inactive1 nil :background "#626262"
:foreground "#eeeeee")
+ (set-face-attribute 'powerline-inactive2 nil :background "#767676"
:foreground "#e4e4e4")
+ (cond ((eq moe-theme-mode-line-color 'blue)
+ (set-face-attribute 'mode-line nil :background "#5fafd7"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active1 nil :background
"#afd7ff" :foreground "#005faf"))
+ ((eq moe-theme-mode-line-color 'green)
+ (set-face-attribute 'mode-line nil :background "#a1db00"
:foreground "#005f00")
+ (set-face-attribute 'powerline-active1 nil :background
"#d7ff87" :foreground "#008700"))
+ ((eq moe-theme-mode-line-color 'orange)
+ (set-face-attribute 'mode-line nil :background "#ff8700"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active1 nil :background
"#ffd787" :foreground "#d75f00"))
+ ((eq moe-theme-mode-line-color 'magenta)
+ (set-face-attribute 'mode-line nil :background "#ff4ea3"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active1 nil :background
"#ffafff" :foreground "#ff1f8b"))
+ ((eq moe-theme-mode-line-color 'yellow)
+ (set-face-attribute 'mode-line nil :background "#fce94f"
:foreground "#875f00")
+ (set-face-attribute 'powerline-active1 nil :background
"#ffff87" :foreground "#875f00"))
+ ((eq moe-theme-mode-line-color 'purple)
+ (set-face-attribute 'mode-line nil :background "#af5fd7"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active1 nil :background
"#e6a8df" :foreground "#6c0099"))
+ ((eq moe-theme-mode-line-color 'red)
+ (set-face-attribute 'mode-line nil :background "#ff4b4b"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active1 nil :background
"#ffafaf" :foreground "#cc0000"))
+ ((eq moe-theme-mode-line-color 'cyan)
+ (set-face-attribute 'mode-line nil :background "#5faf87"
:foreground "#ffffff")
+ (set-face-attribute 'powerline-active1 nil :background
"#87d7af" :foreground "#005f5f"))
+ ((eq moe-theme-mode-line-color 'w/b)
+ (set-face-attribute 'mode-line nil :background "#ffffff"
:foreground "#080808")
+ (set-face-attribute 'powerline-active1 nil :background
"#bcbcbc" :foreground "#3a3a3a")
+ (set-face-attribute 'mode-line-buffer-id nil :background nil
:foreground "#3a3a3a")))))
+ (powerline-default-theme)
+ (powerline-reset)
+ (setq moe-theme-powerline-enable-p t)))
+
(provide 'moe-theme)
- [nongnu] elpa/moe-theme 79e5a2464a 100/352: Merge remote-tracking branch 'upstream/master', (continued)
- [nongnu] elpa/moe-theme 79e5a2464a 100/352: Merge remote-tracking branch 'upstream/master', ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 870ce6a117 103/352: Update faces for new Magit., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme a99afddb3e 107/352: Add support for ido-mode, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 35106fd492 147/352: Update manuals., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme ff7692b0bf 122/352: Mode line subtle modification., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 6664bbbe98 136/352: Some new faces for latest version Magit, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme f6a6348b67 133/352: Flycheck and Malabar, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme da3380bf1c 118/352: Diff & EDiff., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme c1e9a7f8a4 178/352: I've hesitated for a long time -- Which type-face looks better, clear, and distinguishing..., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 3388d3590c 146/352: Fix typo bug., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 799540922e 160/352: If (featurep 'powerline) is nil, don't defun powerline-moe-theme.,
ELPA Syncer <=
- [nongnu] elpa/moe-theme ac0bff2881 151/352: Avoid unnecessary load-theme and screen flashing when changing color of, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 76cf341926 129/352: gnus, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme d369c07469 176/352: Improve org-document-* faces., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 1e806b04e5 119/352: Improve faces for Diff., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 60d72ee906 167/352: Merge branch 'master' of github.com:kuanyui/moe-theme.el, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 8d423f5aad 149/352: Correct installation guide., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme ddc6c495e1 226/352: Merge pull request #39 from oppenlander/remove-cl-dependency, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 01055276a5 187/352: Merge pull request #30 from kuanyui/pr/28, ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 7dd78f8d63 204/352: Fix some wrong faces., ELPA Syncer, 2022/01/07
- [nongnu] elpa/moe-theme 86c768059a 245/352: Add TOC for README, ELPA Syncer, 2022/01/07