emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add new csetq macro


From: Lucien Cartier-Tilet
Subject: Re: [PATCH] Add new csetq macro
Date: Sun, 04 Sep 2022 13:40:41 +0200
User-agent: mu4e 1.8.8; emacs 29.0.50

> `custom-set-variables` seems to solve this problem of
> repetition already.

`custom-set-variables` explicitely does not evaluate the expressions
passed as arguments, while `csetq' does, like `setq' itself. Moreover, I
wanted to write this macro with the aim of being as close as possible
to `setq'’s syntax.

> But more importantly, I think your `csetq` has been recently added
> under the name `setopt`.

I did not know this macro existed, it seems to be indeed close to what
I intended. My only issue with it is you still have to quote the
custom variable you want to set, unlike `setq'.
,----
| (setopt 'custom-var1 value1
|         'custom-var2 value2)
| ;; vs
| (csetq custom-var1 value1
|        custom-var2 value2)
`----

--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs

Attachment: signature.asc
Description: PGP signature


reply via email to

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