Re: master e4df903f6b5 2/2: ; Fix last change

Derek Upham <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
> I agree.  I think we should eliminate all binding of symbol function
> definitions.  The way to start would be to make `letf' give a warning
> for attempts to bind symbol function definitions.
>
> Indeed, maybe we should discourage let-binding of anything except
> symbols' values.  Perhaps `letf' is simply a bad idea.  It looks like
> that was added for the sake of completeness.,
>
> Can anyone suggest a case for which `letf' is a good method?

The "shell-command" and "shell-command-on-region" functions make
assumptions about automatically displaying outputs, to support the
interactive case.  I've used "letf" to work around those assumptions for
local tools, where I invoke and capture commands in bulk (such as
running "curl"-mediated API calls over and over again).

This is not a "good" solution for a problem, but it worked.  I've found
that dynamic function binding can help in user code as an escape hatch,
in the same way that dynamic variable binding can help in user code.
Eliminating the function binding feature entirely would hold user code
to an Emacs-core design/quality bar.  I see similarity to the nuance
around advising functions for yourself, versus in code for release
("13.12.2 Advising Named Functions").

Derek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.