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

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

[elpa] externals/ef-themes 469ed40d3f 2/2: Replace 'ef-themes--height' w


From: ELPA Syncer
Subject: [elpa] externals/ef-themes 469ed40d3f 2/2: Replace 'ef-themes--height' with a dotimes
Date: Fri, 19 Aug 2022 22:57:39 -0400 (EDT)

branch: externals/ef-themes
commit 469ed40d3f523914501b93ee72ceb21d72a8d435
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Replace 'ef-themes--height' with a dotimes
    
    As the macro is not used anywhere else, we can replace the explicit
    repetition with a macro that invokes the result of
    'ef-themes--height's macro-expansion.
---
 ef-themes.el | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/ef-themes.el b/ef-themes.el
index 5683260936..9a85a07064 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -443,23 +443,11 @@ Helper function for `ef-themes-preview-colors'."
   :tag "Ef Themes Faces")
 
 ;; This produces `ef-themes-height-0' and the like.
-(defmacro ef-themes--height (n)
-  "Write `defface' for height level N."
-  `(defface ,(intern (format "ef-themes-heading-%s" n)) nil
-     ,(format "Used for level %s heading." n)
-     :group 'ef-themes-faces))
-
-;; FIXME 2022-08-18: Why won't `dotimes' work with the macro?  (dotimes
-;; (n 8) ...) does not interpret the n as a number.
-(ef-themes--height 0)
-(ef-themes--height 1)
-(ef-themes--height 2)
-(ef-themes--height 3)
-(ef-themes--height 4)
-(ef-themes--height 5)
-(ef-themes--height 6)
-(ef-themes--height 7)
-(ef-themes--height 8)
+(dotimes (n 8)
+  (custom-declare-face
+    (intern (format "ef-themes-heading-%d" n))
+    nil (format "Used for level %d heading." n)
+    :group 'ef-themes-faces))
 
 (defconst ef-themes-faces
   '(



reply via email to

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