[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/nano-theme 8d3ae3a 15/24: Experiments to remove inherit
From: |
ELPA Syncer |
Subject: |
[elpa] externals/nano-theme 8d3ae3a 15/24: Experiments to remove inheritance that slow down redisplay |
Date: |
Wed, 29 Sep 2021 08:57:50 -0400 (EDT) |
branch: externals/nano-theme
commit 8d3ae3a930411fc9078e34a3b89a263778824d7a
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Experiments to remove inheritance that slow down redisplay
---
nano-theme.el | 78 ++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 51 insertions(+), 27 deletions(-)
diff --git a/nano-theme.el b/nano-theme.el
index c1733bb..58d6a71 100644
--- a/nano-theme.el
+++ b/nano-theme.el
@@ -117,7 +117,7 @@
"Salient color is used for information that are important."
:type 'color :group 'nano-dark)
-(defcustom nano-dark-strong "#ECEFF4" ;; Snow Storm 3 / nord 6
+(defcustom nano-dark-strong "#FFFFFF" ;; White
"Strong color is used for information of a structural nature."
:type 'color :group 'nano-dark)
@@ -213,9 +213,10 @@ background color that is barely perceptible."
(setq window-divider-default-right-width 24)
(setq window-divider-default-places 'right-only)
(window-divider-mode 1)
- (set-display-table-slot standard-display-table 'truncation ?…)
- (set-display-table-slot standard-display-table 'wrap ?—))
-
+ (set-display-table-slot standard-display-table
+ 'truncation (make-glyph-code ?… 'nano-faded))
+ (set-display-table-slot standard-display-table
+ 'wrap (make-glyph-code ?… 'nano-faded)))
(defun nano-light ()
"Nano theme light"
@@ -259,6 +260,30 @@ background color that is barely perceptible."
(set-background-color nano-dark-background))
+(defun inherit (face &optional inherit)
+ "Extract face properties as a property list"
+
+ (let ((tags (list :family :foundry :width :height :weight :slant :underline
+ :overline :strike-through :box :inverse-video :foreground
+ :background :stipple :extend :inherit))
+ (properties))
+ (if inherit
+ `(:inherit ,face)
+ (progn
+ (dolist (tag tags)
+ (let ((attribute (face-attribute face tag)))
+ (when (not (eq attribute 'unspecified))
+ (push attribute properties)
+ (push tag properties)))))
+ properties)))
+
+;; (custom-theme-set-faces 'nano
+;; '(bold ((t (:inherit nano-strong)))))
+;;
+;; (custom-theme-set-faces 'nano
+;; `(bold ((t ,(inherit 'nano-strong)))))
+
+
;; --- Theme ----------------------------------------------------------
(let ((light '((background light)))
(dark '((background dark)))
@@ -267,7 +292,7 @@ background color that is barely perceptible."
(custom-theme-set-faces
'nano
-
+
;; --- Base ---------------------------------------------------------
`(default ((,light (:foreground ,nano-light-foreground
:weight ,(face-attribute 'nano-mono :weight)
@@ -348,7 +373,7 @@ background color that is barely perceptible."
(,dark (:foreground ,nano-dark-critical
:background ,nano-dark-background))))
- ;; --- Header & mode line -----------------------------------------------
+ ;; --- Header & mode line -------------------------------------------
`(mode-line ((,light (:foreground ,nano-light-background
:background ,nano-light-foreground
@@ -384,7 +409,8 @@ background color that is barely perceptible."
:inherit nil
:box nil))))
- ;; --- Structural ---------------------------------------------------------
+
+ ;; --- Structural ---------------------------------------------------
'(bold ((t (:inherit nano-strong))))
'(italic ((t (:slant italic))))
'(bold-italic ((t (:inherit nano-strong))))
@@ -398,14 +424,14 @@ background color that is barely perceptible."
:height ,(face-attribute 'nano-sans
:height)
:family ,(face-attribute 'nano-sans
:family)))))
- ;; --- Semantic ---------------------------------------------------------
+ ;; --- Semantic -----------------------------------------------------
'(shadow ((t (:inherit nano-faded))))
'(success ((t (:inherit nano-salient))))
'(warning ((t (:inherit nano-popout))))
'(error ((t (:inherit nano-critical))))
'(match ((t (:inherit nano-popout))))
- ;; --- General ---------------------------------------------------------
+ ;; --- General ------------------------------------------------------
'(buffer-menu-buffer ((t (:inherit nano-strong))))
'(minibuffer-prompt ((t (:inherit nano-strong))))
'(isearch ((t (:inherit nano-strong))))
@@ -445,13 +471,13 @@ background color that is barely perceptible."
'(tab-bar-tab-inactive ((t (:inherit nano-faded))))
'(tab-line ((t (:inherit default))))
- ;; --- Line numbers ----------------------------------------------------
+ ;; --- Line numbers -------------------------------------------------
'(line-number ((t (:inherit nano-faded))))
'(line-number-current-line ((t (:inherit default))))
`(line-number-major-tick ((t (:inherit nano-faded))))
'(line-number-minor-tick ((t (:inherit nano-faded))))
- ;; --- Font lock -------------------------------------------------------
+ ;; --- Font lock ----------------------------------------------------
'(font-lock-comment-face ((t (:inherit nano-faded))))
'(font-lock-doc-face ((t (:inherit nano-faded))))
'(font-lock-string-face ((t (:inherit nano-popout))))
@@ -463,7 +489,7 @@ background color that is barely perceptible."
'(font-lock-type-face ((t (:inherit nano-salient))))
'(font-lock-keyword-face ((t (:inherit nano-salient))))
- ;; --- Custom edit -----------------------------------------------------
+ ;; --- Custom edit --------------------------------------------------
'(widget-field ((t (:inherit nano-subtle))))
'(widget-button ((t (:inherit nano-strong))))
'(widget-single-line-field ((t (:inherit nano-subtle))))
@@ -483,7 +509,7 @@ background color that is barely perceptible."
'(custom-variable-obsolete ((t (:inherit nano-faded))))
- ;; --- Buttons -------------------------------------------------------
+ ;; --- Buttons ------------------------------------------------------
`(custom-button
((,light (:foreground ,nano-light-faded
:background ,nano-light-highlight
@@ -508,9 +534,7 @@ background color that is barely perceptible."
:background ,nano-dark-foreground
:box nil))))
-
-
- ;; --- Packages --------------------------------------------------------
+ ;; --- Packages -----------------------------------------------------
'(package-description ((t (:inherit nano-default))))
'(package-help-section-name ((t (:inherit nano-default))))
'(package-name ((t (:inherit nano-salient))))
@@ -550,7 +574,7 @@ background color that is barely perceptible."
'(diff-refine-removed ((t (:inherit nano-faded
:strike-through t))))
- ;; --- Message ---------------------------------------------------
+ ;; --- Message ------------------------------------------------------
'(message-cited-text-1 ((t (:inherit nano-faded))))
'(message-cited-text-2 ((t (:inherit nano-faded))))
'(message-cited-text-3 ((t (:inherit nano-faded))))
@@ -567,7 +591,7 @@ background color that is barely perceptible."
'(message-separator ((t (:inherit nano-faded))))
- ;; --- Outline ---------------------------------------------------
+ ;; --- Outline ------------------------------------------------------
'(outline-1 ((t (:inherit nano-strong))))
'(outline-2 ((t (:inherit nano-strong))))
'(outline-3 ((t (:inherit nano-strong))))
@@ -577,11 +601,11 @@ background color that is barely perceptible."
'(outline-7 ((t (:inherit nano-strong))))
'(outline-8 ((t (:inherit nano-strong))))
- ;; --- Fly spell -------------------------------------------------
+ ;; --- Fly spell ----------------------------------------------------
'(flyspell-duplicate ((t (:inherit nano-popout))))
'(flyspell-incorrect ((t (:inherit nano-popout))))
- ;; --- Org agenda ------------------------------------------------
+ ;; --- Org agenda ---------------------------------------------------
'(org-agenda-calendar-event ((t (:inherit nano-default))))
'(org-agenda-calendar-sexp ((t (:inherit nano-salient))))
'(org-agenda-clocking ((t (:inherit nano-faded))))
@@ -603,7 +627,7 @@ background color that is barely perceptible."
'(org-agenda-structure ((t (:inherit nano-strong))))
- ;; --- Org -------------------------------------------------------
+ ;; --- Org ----------------------------------------------------------
'(org-archived ((t (:inherit nano-faded))))
'(org-block ((t (:inherit highlight))))
'(org-block-begin-line ((t (:inherit nano-faded))))
@@ -664,7 +688,7 @@ background color that is barely perceptible."
'(org-warning ((t (:inherit nano-popout))))
- ;; --- Mu4e -------------------------------------------------------
+ ;; --- Mu4e ---------------------------------------------------------
'(mu4e-attach-number-face ((t (:inherit nano-strong))))
'(mu4e-cited-1-face ((t (:inherit nano-faded))))
'(mu4e-cited-2-face ((t (:inherit nano-faded))))
@@ -703,7 +727,7 @@ background color that is barely perceptible."
'(mu4e-view-body-face ((t (:inherit nano-default))))
'(mu4e-warning-face ((t (:inherit nano-popout))))
- ;; --- Elfeed ----------------------------------------------------
+ ;; --- Elfeed -------------------------------------------------------
'(elfeed-log-date-face ((t (:inherit nano-faded))))
'(elfeed-log-info-level-face ((t (:inherit nano-default))))
'(elfeed-log-debug-level-face ((t (:inherit nano-default))))
@@ -719,7 +743,7 @@ background color that is barely perceptible."
'(elfeed-search-unread-count-face ((t (:inherit nano-strong))))
'(elfeed-search-unread-title-face ((t (:inherit nano-strong))))
- ;; --- Deft ----------------------------------------------------
+ ;; --- Deft --------------------------------------------------------
'(deft-filter-string-error-face ((t (:inherit nano-popout))))
'(deft-filter-string-face ((t (:inherit nano-default))))
'(deft-header-face ((t (:inherit nano-salient))))
@@ -728,7 +752,7 @@ background color that is barely perceptible."
'(deft-time-face ((t (:inherit nano-salient))))
'(deft-title-face ((t (:inherit nano-strong))))
- ;; --- Restructured text ------------------------------------------
+ ;; --- Restructured text -------------------------------------------
'(rst-adornment ((t (:inherit nano-faded))))
'(rst-block ((t (:inherit nano-default))))
'(rst-comment ((t (:inherit nano-faded))))
@@ -748,7 +772,7 @@ background color that is barely perceptible."
'(rst-transition ((t (:inherit nano-default))))
- ;; --- Markdown --------------------------------------------------
+ ;; --- Markdown ----------------------------------------------------
'(markdown-blockquote-face ((t (:inherit nano-default))))
'(markdown-bold-face ((t (:inherit nano-strong))))
'(markdown-code-face ((t (:inherit nano-default))))
@@ -793,7 +817,7 @@ background color that is barely perceptible."
'(markdown-url-face ((t (:inherit nano-salient))))
- ;; --- Terminal ------------------------------------------------------
+ ;; --- Terminal ----------------------------------------------------
'(term-bold ((t (:inherit nano-strong))))
'(term-color-black ((t (:inherit default))))
'(term-color-blue ((t (:foreground "#42A5F5" ;; material color blue L400
- [elpa] externals/nano-theme d5affda 04/24: Recommended layout is off, (continued)
- [elpa] externals/nano-theme d5affda 04/24: Recommended layout is off, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 9b4a669 06/24: Added installation instructions, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 73c3be1 09/24: Added header line customization, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 4a23178 19/24: Fix theme for new frames. Close #6, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme da11e53 23/24: Removed tabs, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme a9e0ddd 21/24: Added documentation, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 2c252fe 22/24: Minor correction in documentation, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme c615b55 05/24: Added a nano-mode function to apply recommended settings, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 6127576 07/24: Add autoload for Custom, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme eb8b98a 12/24: Add file header, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 8d3ae3a 15/24: Experiments to remove inheritance that slow down redisplay,
ELPA Syncer <=
- [elpa] externals/nano-theme ae5d982 16/24: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 8c50bda 18/24: Make fonts stack an option (default is disabled), ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 5d4f6c6 20/24: Added GNUS faces and suppressed warnings, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 1ad2168 24/24: Cosmetic changes in comments, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 374962f 10/24: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 99ff1c5 17/24: Removed automatic start, ELPA Syncer, 2021/09/29
- [elpa] externals/nano-theme 2628d5b 08/24: Merge pull request #1 from kisaragi-hiu/patch-1, ELPA Syncer, 2021/09/29