emacs-devel
[Top][All Lists]
Advanced

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

Re: master 38697a07c0 1/2: Add :safe property to ffap-machine-p-* variab


From: Stefan Monnier
Subject: Re: master 38697a07c0 1/2: Add :safe property to ffap-machine-p-* variables
Date: Fri, 08 Jul 2022 15:48:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii [2022-07-08 16:16:57] wrote:
>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Cc: Stefan Kangas <stefan@marxist.se>,  emacs-devel@gnu.org
>> Date: Fri, 08 Jul 2022 09:03:25 -0400
>> > This uses an internal function as the value of a property of a user
>> > option, which I think is not a good idea.
>> Why is that a problem?
> It's not nice.  If we are serious about internal things being
> internal, we should avoid exposing them to users.

I don't see why.  AFAIK it's definitely no worse (and arguably better)
than having an anonymous function, and I've never heard anyone complain
about exposing an anonymous function on `safe-local-variable`.

To me, this is similar to

    (defalias 'foo-bar #'foo--bar-thingy)

The fact that the value stored is an internal function is not important
because the official API is "call `foo-bar`" and we "promise" that this
API will be preserved even if `foo--bar-thingy` disappears or changes.


        Stefan




reply via email to

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