GNU bug report logs - #55156
[PATCH] eval.c: New functions `defvar-f` and `defconst-f`

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Wed, 27 Apr 2022 21:47:01 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 55156 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55156 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#55156: [PATCH] eval.c: New functions `defvar-f` and
 `defconst-f`
Date: Thu, 28 Apr 2022 23:10:40 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

We don't have a convention of an `-f' suffix in function names.
That form of name is extra cryptic.
Let's choose names that follow some existing pattern
rather than being inconsistent with old practice.

I suggest `defvar-internal', since it isn't meant for users to call.
Even `defvar-function' would be better than `defvar-f'.

For the doc string, it is better to say in a self-contained way what
the function does, rather than only make an analogy.

How about this:

   Define the variable VAR, with initial value INITVAL and doc string DOC.

Note that `defvar', being a special form, can distinguish between nil
as INITVAL and having only one argument.  However, a function cannot
do that: it will treat those two cases the same.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






This bug report was last modified 2 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.