This was done in pull request 212: <https://github.com/protesilaos/modus-themes/pull/212>.
The change is within the ~15-line limit for non-trivial changes,
meaning that Benjamin does not need to assign copyright to the Free
Software Foundation.
The explicit `nil's actually don't break the previously introduced
functionality. As (stringp nil) is `nil', it was interpreted as a
missing DOCSTRING.
However, they now contain only noise.
This commit removes mtt-define-test's explicit DOCSTRING argument and
instead inspects the first entry of the given ARGS:
- if (car args) is a string, it is interpreted as a DOCSTRING
- otherwise, it is considered to be part of the test's BODY
Examples:
;; No docstring
(macroexpand-1
'(mtt-define-test trivial-check
(should (= 1 1))))
=> (ert-deftest mtt-trivial-check nil "Test that `trivial-check' does the right thing." (should (= 1 1)))
;; With docstring
(macroexpand-1
'(mtt-define-test trivial-check-with-docstring
"This tests a trivial thing."
(should (= 1 1))))
=> (ert-deftest mtt-trivial-check-with-docstring nil "This tests a trivial thing." (should (= 1 1)))
mtt-define-test's own docstring follows the usual \(fn ARGLIST)
feature used for macros, see "(elisp) Function Documentation".
I am putting it here instead of the manual. The latter is synchronised
with emacs.git and I do not want to have any issues about mentioning
projects that may not be in line with GNU policy.
I want to prompt for a theme only if modus-themes-to-toggle is not
right.
Thanks Morten Kjeldgaard for bringing this matter to my attention in
issue 44 in the ef-themes repository (those are built on top of the
modus-themes): <https://github.com/protesilaos/ef-themes/issues/44>.
This gives users and derivative themes the option to pick a suitable
value for those interfaces.
Thanks to aikrahguzar for making this suggestion in issue 70 of my
ef-themes repository (the ef-themes are built on top of the
modus-themes): <https://github.com/protesilaos/ef-themes/issues/70>.
This is because our check involves this:
(let ((theme-exists-p (get name 'theme-feature)) ...) ...)
Thanks to Daniel Colascione for informing me about this in issue 201:
<https://github.com/protesilaos/modus-themes/issues/201>.
I tried to do this with a recent commit but that broke things because
I also included a deftheme declaration. Having that meant that
modus-themes-theme would not declare the theme with all its data,
including its palette.
I looked at loaddefs-generate--emacs-batch and it seems that having
just the theme-autoload line is enough.
This reverts commit 122d53333f.
The reason is that this breaks the package when trying to load a theme
at startup. This was reported by Eamonn Sullivan in issue 69 in the
ef-themes repository: <https://github.com/protesilaos/ef-themes/issues/69>.