unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Bruno Boal <egomet@bboal.com>
Cc: emacs-devel@gnu.org,  info@protesilaos.com
Subject: Re: [ELPA] Add theme-buffet package
Date: Fri, 24 Nov 2023 18:11:19 +0000	[thread overview]
Message-ID: <877cm72f94.fsf@posteo.net> (raw)
In-Reply-To: <87fs0v9ya6.fsf@bboal.com> (Bruno Boal's message of "Fri, 24 Nov 2023 11:38:25 +0000")

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

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':


[-- Attachment #2: Type: text/plain, Size: 1829 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 177 bytes --]


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

      reply	other threads:[~2023-11-24 18:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 12:08 [ELPA] Add theme-buffet package Bruno Boal
2023-11-20 19:05 ` Philip Kaludercic
2023-11-24 11:38   ` Bruno Boal
2023-11-24 18:11     ` Philip Kaludercic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cm72f94.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=egomet@bboal.com \
    --cc=emacs-devel@gnu.org \
    --cc=info@protesilaos.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).