bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41742: 28.0.50; Derive gnus-edit-form-mode from lisp-data-mode


From: Basil L. Contovounesios
Subject: bug#41742: 28.0.50; Derive gnus-edit-form-mode from lisp-data-mode
Date: Sat, 06 Jun 2020 23:31:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> While there, would you mind cleaning up how gnus-edit-form-mode-map is
>> defined?  It currently does a defvar+unless+setq dance, whereas it
>> should ideally only be a defvar+let, as per the last few paragraphs of
>> (info "(elisp) Tips for Defining").
>
> Huh, the last few paragraphs of that info page make it look like it's
> _okay_ to do defvar+unless+setq, am I misreading this? Granted it only
> says to do it so you can get the docstring closer to the defvar, and
> there's no docstring in this case, but it does seem acceptable.

I posit it's always better to defvar+let in one swell foop.

> I wonder what the point of writing it this way is, otherwise?

In most places I've seen defvar+unless, it's due to the author thinking
in terms of "if the user hasn't already defined this map before loading
this file, then..."

But defvar provides these semantics for free and in a cleaner way.

Unless I'm missing something, that is.

-- 
Basil





reply via email to

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