From bfefdee51c8d7874f4e43335e354a3e885a994c7 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 21 May 2013 13:04:39 +2000 Subject: [PATCH] Re: [PATCH] emacs: Avoid deprecated function flet --- 98/6a582f6e5f00d52d93d6c0f1179208a49f07af | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 98/6a582f6e5f00d52d93d6c0f1179208a49f07af diff --git a/98/6a582f6e5f00d52d93d6c0f1179208a49f07af b/98/6a582f6e5f00d52d93d6c0f1179208a49f07af new file mode 100644 index 000000000..c137bfe80 --- /dev/null +++ b/98/6a582f6e5f00d52d93d6c0f1179208a49f07af @@ -0,0 +1,118 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 0C6DE431FB6 + for ; Mon, 20 May 2013 10:04:54 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id DNMNe6-yd7hm for ; + Mon, 20 May 2013 10:04:46 -0700 (PDT) +Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU + [18.9.25.13]) + by olra.theworths.org (Postfix) with ESMTP id 44CC0431FBC + for ; Mon, 20 May 2013 10:04:46 -0700 (PDT) +X-AuditID: 1209190d-b7f716d000005557-73-519a57ab4694 +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP + id A5.51.21847.BA75A915; Mon, 20 May 2013 13:04:43 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r4KH4fSM001529; + Mon, 20 May 2013 13:04:43 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r4KH4d7L010407 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Mon, 20 May 2013 13:04:40 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1UeTVn-0007xY-85; Mon, 20 May 2013 13:04:39 -0400 +Date: Mon, 20 May 2013 13:04:39 -0400 +From: Austin Clements +To: David Bremner +Subject: Re: [PATCH] emacs: Avoid deprecated function flet +Message-ID: <20130520170439.GG5999@mit.edu> +References: <87vc6fjjdp.fsf@zancas.localnet> + <1368976447-5153-1-git-send-email-amdragon@mit.edu> + <8761ydr6xm.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <8761ydr6xm.fsf@zancas.localnet> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hRV1l0dPivQ4P9TCYsbrd2MFtdvzmR2 + YPJ4tuoWs8eWQ++ZA5iiuGxSUnMyy1KL9O0SuDKmfNnGUnCTt2LZ3V0sDYyTuLsYOTgkBEwk + dv826WLkBDLFJC7cW8/WxcjFISSwj1Fi0boj7BDORkaJJR8nQmVOM0k0rLoK5SxhlNh98wEb + SD+LgKrEzst/WEBsNgENiW37lzOC2CJA8avbJoPVMAtIS3z73cwEslpYwEqis40HJMwroC1x + fPp1ZoiZrYwS208dZIFICEqcnPmEBaJXS+LGv5dgvSBzlv/jAAlzCuhKbFy1kAnEFhVQkZhy + chvbBEahWUi6ZyHpnoXQvYCReRWjbEpulW5uYmZOcWqybnFyYl5eapGukV5uZoleakrpJkZw + WEvy7mB8d1DpEKMAB6MSD6+A4axAIdbEsuLK3EOMkhxMSqK8m8OAQnxJ+SmVGYnFGfFFpTmp + xYcYJTiYlUR4o3/PDBTiTUmsrEotyodJSXOwKInzXkm56S8kkJ5YkpqdmlqQWgSTleHgUJLg + PQIyVLAoNT21Ii0zpwQhzcTBCTKcB2j4OZAa3uKCxNzizHSI/ClGRSlx3lMgCQGQREZpHlwv + LO28YhQHekWY9wJIFQ8wZcF1vwIazAQ0eLslyNXFJYkIKakGxuiylTJL+P65JM0NnHrunoaz + pK7QpEWx/VpXr8n819tw77Drvfl6Zxu16l738PgIJ1SeM8jc5fI6uIObPblasXFLxHGRmy6/ + r05Nt9F+1JMx6cl2Z3Xurmd/TXter5jRxxi0o+a5Jd92TuWjTtqVJy98aNJlWsfAV1kac2SX + 6+bjh7IeJjRYKbEUZyQaajEXFScCAFPaWBMWAwAA +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 20 May 2013 17:04:54 -0000 + +Quoth David Bremner on May 20 at 12:45 pm: +> Austin Clements 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. -- 2.26.2