GNU bug report logs - #60623
30.0.50; Add forward-sentence with tree sitter support

Previous Next

Package: emacs;

Reported by: Theodor Thornhill <theo <at> thornhill.no>

Date: Sat, 7 Jan 2023 11:55:02 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Theodor Thornhill <theo <at> thornhill.no>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: "casouri <at> gmail.com" <casouri <at> gmail.com>, "60623 <at> debbugs.gnu.org" <60623 <at> debbugs.gnu.org>, Theodor Thornhill <theo <at> thornhill.no>, "eliz <at> gnu.org" <eliz <at> gnu.org>, Juri Linkov <juri <at> linkov.net>
Subject: bug#60623: 30.0.50; Add forward-sentence with tree sitter support
Date: Mon, 09 Jan 2023 01:20:50 -0500
> Exactly.  IMO, if the variable can have a
> nonfunction value, especially nil, then

Bad idea.  That precludes changing the value of the variable with
`add-function`, whereas `add-function` is often the best way for
a major/minor mode to change that variable (actually, the "only" way to
do it with some hope that it will interact correctly with other modes
that may change it as well).

> there's no need (nothing gained, and even possible
> confusion/misunderstanding added) by adding "-default-" to the name.

Instead we should strive to make the name of the default function simply
irrelevant.  If all goes well, nobody should ever need to explicitly
call "the default value" of that variable.  Instead the function they
added via `add-function` will receive the "previous" value as argument.

> On the other hand, if the value must always be a function, then having
> "-default-" in the name makes sense.

Agreed.  It's also helpful when you look at the var's value, it lets you
know that it hasn't been modified.


        Stefan





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

Previous Next


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