GNU bug report logs -
#60623
30.0.50; Add forward-sentence with tree sitter support
Previous Next
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
> > Exactly. IMO, if the variable can have
^^
> > a nonfunction value, especially nil, then
>
> Bad idea.
I know you think so. ;-)
> That precludes changing the value of the
> variable with `add-function`,
Yes, it does, at least blindly and ignoring
its current value. And that's _appropriate_
IF the var can have a non-function value.
But even in that case the var value can be
tested to see if it's a function, and if/when
so, advising it can make sense.
> 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).
A legitimate argument. But it doesn't apply to
a variable already defined so that it "can have
a nonfunction value." Did you perhaps miss that
"if"?
I also don't agree that that (_good_) reason you
give is all-deciding.
I'd say that _other things being equal_, yes,
you can take advantage of that good reason, IF
the variable's value can be ensured to always be
a function, or sometimes even if it just is
currently a function.
IOW, you give one (good) reason for one (good)
practice, which, yes, can sometimes make sense.
> > there's no need (nothing gained, and even
> > possible confusion/misunderstanding added) by
> > adding "-default-" to the name.
> >
> > 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.
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.