gnu-emacs-sources
[Top][All Lists]
Advanced

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

[GNU ELPA] Standard-Themes version 1.2.0


From: ELPA update
Subject: [GNU ELPA] Standard-Themes version 1.2.0
Date: Thu, 16 Feb 2023 05:04:17 -0500

Version 1.2.0 of package Standard-Themes has just been released in GNU ELPA.
You can now find it in M-x list-packages RET.

Standard-Themes describes itself as:

  ==========================================
  Like the default theme but more consistent
  ==========================================

More at https://elpa.gnu.org/packages/standard-themes.html

## Summary:

             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
              STANDARD-THEMES: LIKE THE DEFAULT THEME BUT MORE
                                 CONSISTENT

                            Protesilaos Stavrou
                            info@protesilaos.com
             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


  This manual, written by Protesilaos Stavrou, describes the Emacs package
  called `standard-themes', and provides every other piece of information
  pertinent to it.

  The documentation furnished herein corresponds to stable version 1.2.0,
  released on 2023-02-16.  Any reference to a newer feature which does not
  yet form part of the latest tagged commit, is explicitly marked as such.

  Current development target is 1.3.0-dev.

  ⁃ Package name (GNU ELPA): `standard-themes'
  ⁃ Official manual: <https://protesilaos.com/emacs/standard-themes>
  ⁃ Git repo on SourceHut:

## Recent NEWS:

                  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                   CHANGE LOG OF THE STANDARD THEMES
                  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


This document contains the release notes for each tagged commit on the
project's main git repository:
<https://git.sr.ht/~protesilaos/standard-themes>.

The newest release is at the top.  For further details, please consult
the manual: <https://protesilaos.com/emacs/standard-themes>.


Version 1.2.0 on 2023-02-16
═══════════════════════════

Support for palette overrides
─────────────────────────────

  It is now possible to override the palette of each Standard theme.
  This is the same feature that I implemented for the `modus-themes',
  except it is a bit more limited in scope (the Modus themes are
  maximalist due to their accessibility target).

  Overrides allow the user to tweak the presentation of either or both
  themes, such as to change the colour value of individual entries
  and/or remap how named colours are applied to semantic code
  constructs.

  For example, the user can change what the exact value of `blue-warmer'
  is and then, say, make comments use a shade of green instead of red.

  There are three user options to this end:

  ⁃ `standard-themes-common-palette-overrides' which covers both themes.
  ⁃ `standard-dark-palette-overrides' which concerns the dark theme.
  ⁃ `standard-light-palette-overrides' which is for the light theme.

  The theme-specific overrides take precedence over the "common" ones.

  The theme's palette with named colors can be previewed with the
  commands `standard-themes-preview-colors' and
  `standard-themes-preview-colors-current'.  When called with a
  universal prefix argument (`C-u' with default key bindings) these
  commands produce a preview of the semantic colour mappings (e.g. what
  colour applies to level 2 headings).

  Use the preview as a reference to find entries to override.  And
  consult the manual for the technicalities.

  Thanks to Clemens Radermacher for fixing a mistake I made in the code
  that produces the palette previews.


Added the function `standard-themes-get-color-value'
────────────────────────────────────────────────────

  It returns the colour value of named `COLOR' for the current Standard
  theme.

  `COLOR' is a symbol that represents a named colour entry in the
  palette.

  If the value is the name of another colour entry in the palette (so a
  mapping), recur until you find the underlying colour value.

  With optional `OVERRIDES' as a non-nil value, account for palette
  overrides.  Else use the default palette.

  With optional `THEME' as a symbol among `standard-themes-items', use
  the palette of that item.  Else use the current Standard theme.

  If `COLOR' is not present in the palette, return the `unspecified'
  symbol, which is safe when used as a face attribute's value.

  The manual provides this information and also links to relevant
  entries.  The example it uses, with the `standard-light' as current:

  ┌────
  │ ;; Here we show the recursion of palette mappings.  In general, it is
  │ ;; better for the user to specify named colors to avoid possible
  │ ;; confusion with their configuration, though those still work as
  │ ;; expected.
  │ (setq standard-themes-common-palette-overrides
  │       '((cursor red)
  │     (prompt cursor)
  │     (variable prompt)))
  │ 
  │ ;; Ignore the overrides and get the original value.
  │ (standard-themes-get-color-value 'variable)
  │ ;; => "#a0522d"
  │ 
  │ ;; Read from the overrides and deal with any recursion to find the
  │ ;; underlying value.
  │ (standard-themes-get-color-value 'variable :overrides)
  │ ;; => "#b3303a"
  └────


New user option `standard-themes-disable-other-themes'
──────────────────────────────────────────────────────

  This user option is set to `t' by default.  This means that loading a
  Standard theme with the command `standard-themes-toggle' or the
  functions `standard-theme-load-dark', `standard-theme-load-light' will
  disable all `custom-enabled-themes'.

  When the value of this user option is nil, themes are loaded without
  disabling other entries outside their family.  This retains the
  original (and in my opinion bad for most users) behaviour of Emacs
  where it blithely blends multiple enabled themes.  …  …

reply via email to

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