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

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

[elpa] externals/spacious-padding f831b59dcf 1/4: Define the 'spacious-p


From: ELPA Syncer
Subject: [elpa] externals/spacious-padding f831b59dcf 1/4: Define the 'spacious-padding' theme like 'use-package' does
Date: Mon, 6 Jan 2025 06:59:46 -0500 (EST)

branch: externals/spacious-padding
commit f831b59dcf3f081b7ebb440bdc50b43b7d3c0170
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Define the 'spacious-padding' theme like 'use-package' does
    
    This way we can store our configurations in the theme of our name,
    instead of the cryptic 'changed' theme.
---
 spacious-padding.el | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/spacious-padding.el b/spacious-padding.el
index 0df1cbaf86..70ab9f0f6c 100644
--- a/spacious-padding.el
+++ b/spacious-padding.el
@@ -53,6 +53,18 @@
   :group 'faces
   :group 'frames)
 
+;; NOTE 2025-01-06: This is what `use-package' does with its own
+;; theme, so it is probably the right approach for us too.
+(eval-and-compile
+  ;; Declare a synthetic theme for :custom variables.
+  ;; Necessary in order to avoid having those variables saved by custom.el.
+  (deftheme spacious-padding))
+
+(enable-theme 'spacious-padding)
+;; Remove the synthetic spacious-padding theme from the enabled themes, so
+;; iterating over them to "disable all themes" won't disable it.
+(setq custom-enabled-themes (remq 'spacious-padding custom-enabled-themes))
+
 (defcustom spacious-padding-widths
   '( :internal-border-width 15
      :header-line-width 4
@@ -288,7 +300,7 @@ hooks that pass one or more arguments to it, such as
         (fg-main (face-foreground 'default))
         custom--inhibit-theme-enable)
     (custom-theme-set-faces
-     'changed
+     'spacious-padding
      `(fringe ((t :background ,bg-main)))
      `(line-number ((t :background ,bg-main)))
      `(header-line ((t ,@(spacious-padding-set-face-box-padding 'header-line 
'default))))
@@ -314,7 +326,7 @@ hooks that pass one or more arguments to it, such as
   "Make window dividers for THEME invisible."
   (let (custom--inhibit-theme-enable)
     (custom-theme-set-faces
-     'changed
+     'spacious-padding
      '(fringe (( )))
      '(line-number (( )))
      '(header-line (( )))



reply via email to

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