[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] Add theme-buffet package
From: |
Philip Kaludercic |
Subject: |
Re: [ELPA] Add theme-buffet package |
Date: |
Fri, 24 Nov 2023 18:11:19 +0000 |
Bruno Boal <egomet@bboal.com> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Bruno Boal <egomet@bboal.com> writes:
>>
>>> Hello everyone,
>>>
>>> I would like you to consider including my package in the GNU ELPA.
>>> I've just filled out the copyright assignment form, and in the meantime
>>> I'm sending the proposed changes below for your consideration.
>>
>> Here are a few comments in form of a diff (this is not a patch that you
>> should apply, but just some suggestions, hints and ideas that can be
>> discussed):
>>
>
> [...]
>
> Hello again Philip,
>
> I took a look at your constructive review, made some changes accordingly
> and now it looks good to me.
> Thanks in advance for any additional feedback.
I have added the package to GNU ELPA. You can now change the "This file
is NOT part of GNU Emacs." to "This file is part of GNU Emacs.".
I just noticed that there were a few instances of `pcase' that might
seem to be better suited by using `pcase-exhaustive':
diff --git a/theme-buffet.el b/theme-buffet.el
index 00120d307e..2b88b81c8d 100644
--- a/theme-buffet.el
+++ b/theme-buffet.el
@@ -205,7 +205,7 @@ Prefilled with Emacs default themes as an example to be
changed by the user."
(defun theme-buffet--selected-menu ()
"Return property list based on `theme-buffet-menu' value."
- (pcase theme-buffet-menu
+ (pcase-exhaustive theme-buffet-menu
('built-in theme-buffet--built-in)
('modus-ef theme-buffet--modus-ef)
('end-user theme-buffet--end-user)))
@@ -387,11 +387,9 @@ UNITS is an unquoted symbol, mins or hours and refers to
timer of the same
naming."
(let ((fn-name (intern (format "theme-buffet-timer-%s" units)))
factor max-num)
- (pcase units
+ (pcase-exhaustive units
('mins (setq factor 60 max-num 180))
- ('hours (setq factor 3600 max-num 12))
- (_ (user-error
- "Bad `units' arg on `theme-buffet--define-timer %s'" units)))
+ ('hours (setq factor 3600 max-num 12)))
`(defun ,fn-name (number)
,(format "Set interactively the timer for NUMBER of %s.
When NUMBER is 0, the timer is cancelled. Maximum value is %s" units max-num)
@@ -425,11 +423,10 @@ Theme-Buffet uses both Modus and Ef themes, mixed and
matched for a maximum
\"Wow!!\" factor of pleasure and professionalism. At least in this developer's
opinion.")
(doc-end-user "End user selected themes")
- (docstring (pcase menu
+ (docstring (pcase-exhaustive menu
('built-in doc-built-in)
('modus-ef doc-modus-ef)
- ('end-user doc-end-user)
- (_ "This is not correct!"))))
+ ('end-user doc-end-user))))
`(defun ,(intern (format "theme-buffet-%s" menu)) ()
,docstring
(interactive)
Depending on how extensible you want to make the package, it might also
be interesting to investigate the usage of generic functions and
methods.
> All the best,
> Bruno Boal