~pkal/public-inbox

1

setup.el: setopt vs :option

Zachary D'Anthony <zdm@disroot.org>
Details
Message ID
<87plurjy2k.fsf@disroot.org>
DKIM signature
pass
Download raw message
Greetings,

I was looking over your emacs init file and noticed you never use the
local macro `:option' for setting custom variables, but rather use

  (setopt ...)

Is there a reason for this?
Details
Message ID
<87y19f6waf.fsf@posteo.net>
In-Reply-To
<87plurjy2k.fsf@disroot.org> (view parent)
DKIM signature
pass
Download raw message
Zachary D'Anthony <zdm@disroot.org> writes:

> Greetings,

Hi, 

> I was looking over your emacs init file and noticed you never use the
> local macro `:option' for setting custom variables, but rather use
>
>   (setopt ...)
>
> Is there a reason for this?

I wrote :option before there was any setopt.  I still keep it in setup,
because of backwards compatibility, but you might notice that in terms
of local macros, it has no context-sensitivity which is usually
something I want all bundled macros to provide.  I wrote a
context-sensitive alternative[0], but don't trust it enough to add it to
the package.

As for setopt, it provides primitive type checking for user options,
which is useful most of the time.

[0] https://www.emacswiki.org/emacs/SetupEl#h5o-20

-- 
	Philip Kaludercic on peregrine
Reply to thread Export thread (mbox)