emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/standard-themes c199023022 4/6: DEPRECATE standard-them


From: ELPA Syncer
Subject: [elpa] externals/standard-themes c199023022 4/6: DEPRECATE standard-themes-links; use palette overrides instead
Date: Sun, 26 Nov 2023 00:59:02 -0500 (EST)

branch: externals/standard-themes
commit c1990230222cb8bfec4fcdb7bc0b257a877f3c7b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    DEPRECATE standard-themes-links; use palette overrides instead
    
    We already have a powerful system of palette overrides where the user
    can specify any colour for each key in the palette. This means that
    instead of a hardcoded value for an "intense" or "subtle" style, we
    give the user the freedom to pick exactly the hue and intensity they
    prefer.
    
    The user options for palette overrides are:
    
    - standard-themes-common-palette-overrides
    - standard-dark-palette-overrides
    - standard-light-palette-overrides
---
 standard-dark-theme.el  | 12 ++++---
 standard-light-theme.el | 12 ++++---
 standard-themes.el      | 94 +++++--------------------------------------------
 3 files changed, 24 insertions(+), 94 deletions(-)

diff --git a/standard-dark-theme.el b/standard-dark-theme.el
index e46004845f..2df8e2b714 100644
--- a/standard-dark-theme.el
+++ b/standard-dark-theme.el
@@ -167,10 +167,6 @@
       (warning yellow-warmer)
       (info green)
 
-      (link cyan)
-      (link-alt magenta-cooler)
-      (link-faint cyan-faint)
-      (link-alt-faint magenta-faint)
       (date cyan-warmer)
       (name cyan-cooler)
       (keybind blue-cooler)
@@ -195,6 +191,14 @@
       (accent-2 green)
       (accent-3 magenta-cooler)
 
+      (fg-link cyan)
+      (bg-link unspecified)
+      (underline-link blue-warmer)
+
+      (fg-link-visited magenta-cooler)
+      (bg-link-visited unspecified)
+      (underline-link-visited magenta)
+
       (mail-0 red-cooler)
       (mail-1 magenta-warmer)
       (mail-2 green)
diff --git a/standard-light-theme.el b/standard-light-theme.el
index 55941990e1..2aa326f601 100644
--- a/standard-light-theme.el
+++ b/standard-light-theme.el
@@ -167,10 +167,6 @@
       (warning yellow-warmer)
       (info green)
 
-      (link blue-warmer)
-      (link-alt magenta)
-      (link-faint blue-faint)
-      (link-alt-faint magenta-faint)
       (date cyan-warmer)
       (name green-cooler)
       (keybind blue)
@@ -195,6 +191,14 @@
       (accent-2 green)
       (accent-3 magenta-cooler)
 
+      (fg-link blue-warmer)
+      (bg-link unspecified)
+      (underline-link blue-warmer)
+
+      (fg-link-visited magenta)
+      (bg-link-visited unspecified)
+      (underline-link-visited magenta)
+
       (mail-0 red-cooler)
       (mail-1 magenta)
       (mail-2 green)
diff --git a/standard-themes.el b/standard-themes.el
index e9e30854dd..892e8c4b27 100644
--- a/standard-themes.el
+++ b/standard-themes.el
@@ -246,60 +246,9 @@ ELPA (by Protesilaos))."
   :type 'boolean
   :link '(info-link "(standard-themes) UI typeface"))
 
-
-(defcustom standard-themes-links nil
-  "Set the style of links.
-
-The value is a list of properties, each designated by a symbol.
-The default (a nil value or an empty list) is a prominent text
-color, typically blue, with an underline of the same color.
-
-For the style of the underline, a `neutral-underline' property
-turns the color of the line into a subtle gray, while the
-`no-underline' property removes the line altogether.  If both of
-those are set, the latter takes precedence.
-
-For text coloration, a `faint' property desaturates the color of
-the text and the underline, unless the underline is affected by
-the aforementioned properties.
-
-A `bold' property applies a heavy typographic weight to the text
-of the link.
-
-An `italic' property adds a slant to the link's text (italic or
-oblique forms, depending on the typeface).
-
-Combinations of any of those properties are expressed as a list,
-like in these examples:
-
-    (faint)
-    (no-underline faint)
-
-The order in which the properties are set is not significant.
-
-In user configuration files the form may look like this:
-
-    (setq standard-themes-links (quote (neutral-underline faint)))
-
-The placement of the underline, meaning its proximity to the
-text, is controlled by `x-use-underline-position-properties',
-`x-underline-at-descent-line', `underline-minimum-offset'.
-Please refer to their documentation strings."
-  :group 'standard-themes
-  :package-version '(standard-themes . "1.0.0")
-  :type '(set :tag "Properties" :greedy t
-              (choice :tag "Text coloration"
-                      (const :tag "Saturared color (default)" nil)
-                      (const :tag "Faint coloration" faint))
-              (choice :tag "Underline"
-                      (const :tag "Same color as text (default)" nil)
-                      (const :tag "Neutral (gray) underline color" 
neutral-underline)
-                      (const :tag "No underline" no-underline))
-              (const :tag "Bold font weight" bold)
-              (const :tag "Italic font slant" italic))
-  :link '(info-link "(standard-themes) Link style"))
 (make-obsolete-variable 'standard-themes-region nil "2.0.0")
 (make-obsolete-variable 'standard-themes-fringes nil "2.0.0")
+(make-obsolete-variable 'standard-themes-links nil "2.0.0")
 
 (defcustom standard-themes-prompts nil
   "Control the style of prompts (e.g. minibuffer, REPL).
@@ -444,33 +393,6 @@ sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
             'bold)
            ((or weight 'unspecified))))))
 
-
-(defun standard-themes--link (fg fgfaint underline)
-  "Conditional application of link styles.
-FG is the link's default color for its text and underline
-property.  FGFAINT is a desaturated color for the text and
-underline.  UNDERLINE is a gray color only for the undeline."
-  (let ((properties (standard-themes--list-or-warn 'standard-themes-links)))
-    (list :inherit
-          (cond
-           ((and (memq 'bold properties)
-                 (memq 'italic properties))
-            'bold-italic)
-           ((memq 'italic properties)
-            'italic)
-           ((memq 'bold properties)
-            'bold)
-           ('unspecified))
-          :foreground
-          (if (memq 'faint properties) fgfaint fg)
-          :underline
-          (cond
-           ((memq 'no-underline properties)
-            'unspecified)
-           ((memq 'neutral-underline properties)
-            underline)
-           (t)))))
-
 (defun standard-themes--prompt (fg bg fg-for-bg)
   "Conditional use of colors for text prompt faces.
 FG is the prompt's standard foreground.  BG is a background
@@ -825,7 +747,7 @@ Optional prefix argument MAPPINGS has the same meaning as 
for
     `(region ((,c :background ,bg-region :foreground ,fg-region)))
     `(vertical-border ((,c :foreground "gray50")))
 ;;;;; all other basic faces
-    `(button ((,c ,@(standard-themes--link link link-faint border))))
+    `(button ((,c :background ,bg-link :foreground ,fg-link :underline 
,underline-link)))
     `(child-frame-border ((,c :background ,border)))
     `(comint-highlight-input ((,c :inherit bold)))
     `(comint-highlight-prompt ((,c :inherit minibuffer-prompt)))
@@ -841,8 +763,8 @@ Optional prefix argument MAPPINGS has the same meaning as 
for
     `(highlight ((,c :background ,bg-hover :foreground ,fg-main)))
     `(hl-line ((,c :background ,bg-hl-line)))
     `(icon-button ((,c :box ,fg-dim :background ,bg-active :foreground 
,fg-main))) ; same as `custom-button'
-    `(link ((,c ,@(standard-themes--link link link-faint border))))
-    `(link-visited ((,c ,@(standard-themes--link link-alt link-alt-faint 
border))))
+    `(link ((,c :inherit button)))
+    `(link-visited ((,c :background ,bg-link-visited :foreground 
,fg-link-visited :underline ,underline-link-visited)))
     `(minibuffer-prompt ((,c ,@(standard-themes--prompt prompt bg-prompt 
fg-main))))
     `(mm-command-output ((,c :foreground ,mail-4))) ; like message-mml
     `(pgtk-im-0 ((,c :inherit secondary-selection)))
@@ -1127,7 +1049,7 @@ Optional prefix argument MAPPINGS has the same meaning as 
for
     `(diredfl-flag-mark ((,c :inherit dired-marked)))
     `(diredfl-flag-mark-line ((,c :inherit dired-marked)))
     `(diredfl-ignored-file-name ((,c :inherit shadow)))
-    `(diredfl-link-priv ((,c :foreground ,link)))
+    `(diredfl-link-priv ((,c :foreground ,fg-link)))
     `(diredfl-no-priv ((,c :inherit shadow)))
     `(diredfl-number ((,c :inherit shadow)))
     `(diredfl-other-priv ((,c :foreground ,rainbow-0)))
@@ -1510,7 +1432,7 @@ Optional prefix argument MAPPINGS has the same meaning as 
for
     `(marginalia-file-owner ((,c :inherit shadow)))
     `(marginalia-file-priv-dir (( )))
     `(marginalia-file-priv-exec ((,c :foreground ,rainbow-3)))
-    `(marginalia-file-priv-link ((,c :foreground ,link)))
+    `(marginalia-file-priv-link ((,c :foreground ,fg-link)))
     `(marginalia-file-priv-no ((,c :inherit shadow)))
     `(marginalia-file-priv-other ((,c :foreground ,rainbow-0)))
     `(marginalia-file-priv-rare ((,c :foreground ,rainbow-0)))
@@ -2039,8 +1961,8 @@ Optional prefix argument MAPPINGS has the same meaning as 
for
     `(whitespace-tab ((,c :inherit whitespace-indentation)))
     `(whitespace-trailing ((,c :inherit whitespace-space-before-tab)))
 ;;;; widget
-    `(widget-button ((,c :inherit bold :foreground ,link)))
-    `(widget-button-pressed ((,c :inherit widget-button :foreground 
,link-alt)))
+    `(widget-button ((,c :inherit bold :foreground ,fg-link)))
+    `(widget-button-pressed ((,c :inherit widget-button :foreground 
,fg-link-visited)))
     `(widget-documentation ((,c :inherit font-lock-doc-face)))
     `(widget-field ((,c :background ,bg-alt :foreground ,fg-main :extend nil)))
     `(widget-inactive ((,c :inherit shadow :background ,bg-dim)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]