From: Austin Clements <amdragon@MIT.EDU>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: Avoid deprecated function flet
Date: Mon, 20 May 2013 13:04:39 -0400 [thread overview]
Message-ID: <20130520170439.GG5999@mit.edu> (raw)
In-Reply-To: <8761ydr6xm.fsf@zancas.localnet>
Quoth David Bremner on May 20 at 12:45 pm:
> Austin Clements <amdragon@MIT.EDU> writes:
>
> > flet was deprecated in Emacs 24.3 and replaced with cl-flet. However,
> > cl-flet lexically binds the function symbol, while we depend on flet
> > dynamically binding the function symbol. Hence, this patch replaces
> > the deprecated flet use with letf, which lets us dynamically bind the
> > function symbol, while remaining compatible with both Emacs 23 and 24.
>
> The bad news: letf is also marked as obsolete, although there is no
> yelling from the byte-compiler yet.
From what I understand, all non-cl-prefixed functions are now
considered obsolete, but the non-prefixed aliases are going to have to
stick around for a long time and we won't be able to use the prefixed
ones until we drop support for pre-24.3 Emacs.
flet is a more complicated story, since it was deprecated not just in
name, but in semantics, which I think is why the compiler singles it
out.
> In my simple tests, it _seemed_ to work to replace letf with cl-letf,
> although
>
> - that would require some kind of compatability alias
> - the docstring for letf mutters something about "deprecated usage of
> `symbol-function' in place forms.
>
> On the third hand,
>
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Setting-Generalized-Variables.html#Setting-Generalized-Variables
>
> suggests using symbol-function with setf is legitimate.
My concern would be that letf is a cl function, and cl's documentation
does *not* list symbol-function as a supported generalized variable:
http://www.gnu.org/software/emacs/manual/html_mono/cl.html#Setf-Extensions
We should probably just use fset in an unwind-protect.
next prev parent reply other threads:[~2013-05-20 17:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-19 11:31 use of flet in notmuch-emacs David Bremner
2013-05-19 15:14 ` [PATCH] emacs: Avoid deprecated function flet Austin Clements
2013-05-20 15:45 ` David Bremner
2013-05-20 17:04 ` Austin Clements [this message]
2013-05-20 20:08 ` [PATCH] emacs: Don't override mm-show-part in notmuch-show-view-part Austin Clements
2013-05-21 6:09 ` Mark Walters
2013-05-21 19:13 ` Mark Walters
2013-05-26 6:36 ` Austin Clements
2013-05-26 6:34 ` [PATCH v2] " Austin Clements
2013-05-26 7:04 ` Mark Walters
2013-05-26 7:31 ` Tomi Ollila
2013-05-26 23:35 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130520170439.GG5999@mit.edu \
--to=amdragon@mit.edu \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).