From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Add theme-buffet package Date: Fri, 24 Nov 2023 18:11:19 +0000 Message-ID: <877cm72f94.fsf@posteo.net> References: <87edgkpqz5.fsf@bboal.com> <87cyw48ctt.fsf@posteo.net> <87fs0v9ya6.fsf@bboal.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24900"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, info@protesilaos.com To: Bruno Boal Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 24 19:12:12 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r6aex-0006Fk-FV for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Nov 2023 19:12:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6aeH-0007eY-HO; Fri, 24 Nov 2023 13:11:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6aeF-0007de-K4 for emacs-devel@gnu.org; Fri, 24 Nov 2023 13:11:27 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6aeD-0005vg-4J for emacs-devel@gnu.org; Fri, 24 Nov 2023 13:11:27 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E8D0D240103 for ; Fri, 24 Nov 2023 19:11:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1700849480; bh=BvyU6LQ/5pBdyzUhIWpy9WRZn2YtLyz3zuqWmNSOij4=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=brwydeUjuAqeD/3EfLRa7cHJI9eua74I4fPsEbPLhlcxoBO20cg0Tqo3Tb+jH/dNG LN7yUvDd28qiktPCZ7FaTAxSkcGaIWRXp7497Sbd3R+pbG4YrHahN/0idUoKxW6s87 LEbQW/KjecqzTFYU/PFl4fSC449ipVaBjH3j6s+h5Ep0YyMIm+IsRFYz5AYrar7Ut7 jidSNcdJIU75gZBw7EEs+EPKw76MnsFrfIshksroHqK0MRgtElC9lh0PpcA2haau9X YpSNYgg4DESn987626Z1FHoN7qvy8HRDit7OXlRinyfO+EIxvyoCxdOgESQ+ji+xLh fP+EQ2gOYGYJg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4ScNMr1JB2z6tmv; Fri, 24 Nov 2023 19:11:20 +0100 (CET) In-Reply-To: <87fs0v9ya6.fsf@bboal.com> (Bruno Boal's message of "Fri, 24 Nov 2023 11:38:25 +0000") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313179 Archived-At: --=-=-= Content-Type: text/plain Bruno Boal writes: > Philip Kaludercic writes: > >> Bruno Boal 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': --=-=-= Content-Type: text/plain Content-Disposition: inline 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) --=-=-= Content-Type: text/plain 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 --=-=-=--