emacs-devel
[Top][All Lists]
Advanced

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

Re: master a7c65fc666: Allow nil value for filter-buffer-substring-funct


From: Stefan Kangas
Subject: Re: master a7c65fc666: Allow nil value for filter-buffer-substring-function
Date: Mon, 19 Sep 2022 23:15:28 +0200

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> >     * lisp/simple.el
> >     (filter-buffer-substring): Support a nil value to be more resilient.
> >     (filter-buffer-substring-function): Doc fix; improve and update for
> >     above change.
>
> Why?  It's been that way "forever" already and new code should not put
> a nil in there since it'll break uses of `add-function`.

This came up because I set 'filter-buffer-substring-function' to
something bad, and had a hard time figuring out what to set it back
to.  It would have helped if the default value was in the docstring,
but allowing nil would also have been useful.  So I did both those
changes.

Note that before this patch, you had to go to the variable's
definition to find out how to set things back.  But then, you just
broke killing by being a bad so you have to type it in manually.  nil
is just handy to allow.  (BTW, is it still true that some
distributions don't even install the .el files by default?)

I don't see a good reason not to accept nil, though we don't need to
document it if we don't want to encourage its (ab)use.



reply via email to

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