From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.bugs Subject: bug#12895: 24.3.50; Replacement for flet Date: Tue, 9 Feb 2016 21:36:34 +0100 Message-ID: References: <87a9uj9efm.fsf@gmail.com> <87lie27vvd.fsf@gmail.com> <87wqxm5vzh.fsf@gmail.com> <87vcd538o2.fsf@gmail.com> <87zivlodc4.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1145b64cf9dcbf052b5c4568 X-Trace: ger.gmane.org 1455050242 16595 80.91.229.3 (9 Feb 2016 20:37:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2016 20:37:22 +0000 (UTC) Cc: 12895@debbugs.gnu.org, Stefan Monnier To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 09 21:37:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aTF28-0000pf-9Q for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Feb 2016 21:37:12 +0100 Original-Received: from localhost ([::1]:60379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTF27-000243-HB for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Feb 2016 15:37:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTF23-00023m-HX for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 15:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTF1y-0006H2-HQ for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 15:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTF1y-0006Gw-E6 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 15:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aTF1y-0005Iq-9E for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2016 15:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Antoine Levitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Feb 2016 20:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12895 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 12895-submit@debbugs.gnu.org id=B12895.145505020120352 (code B ref 12895); Tue, 09 Feb 2016 20:37:02 +0000 Original-Received: (at 12895) by debbugs.gnu.org; 9 Feb 2016 20:36:41 +0000 Original-Received: from localhost ([127.0.0.1]:33911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTF1d-0005IC-L3 for submit@debbugs.gnu.org; Tue, 09 Feb 2016 15:36:41 -0500 Original-Received: from mail-wm0-f44.google.com ([74.125.82.44]:38539) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTF1c-0005Hz-37 for 12895@debbugs.gnu.org; Tue, 09 Feb 2016 15:36:40 -0500 Original-Received: by mail-wm0-f44.google.com with SMTP id p63so115131wmp.1 for <12895@debbugs.gnu.org>; Tue, 09 Feb 2016 12:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=c0S7QRByp350TuL/W/ZYTtbJcWRS4ucLSCRpfcLxIYo=; b=rge+Bi5CIoJFMEiFsm3jihPb/YBGRETpcsfD4zMPXqsalrTQs1HHgWZSsUjlNI8hO7 Q4hO7s/yFA0gyvFE3/7dSrybzMfllQmXsdp6+DMRyHwPXRWq4E4ETlirmFV9JgD02A/9 jQy9p7fHCSVUJGkX90Q43tjv0rFJnz9YT/FPmWc6B4UEuiGJVYgxV6ok4su74JsBXIp6 ITnFvqTRX/0K36FQAvasToiEhkhTqbNAlbnpgu1l3Z5bLY4rj8Gq5q1KJ7KpsYLjUgxm 80BBWn1yKzrd45ANmrNof48cqFz3WrNsrGUUXdPuS6KP64YVfR8nxYnoDi+Nn6ZCQ3dz McPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=c0S7QRByp350TuL/W/ZYTtbJcWRS4ucLSCRpfcLxIYo=; b=hOiyq7FPyQwjd4/jtGmiEGXcNuydv7JisOyE7oQb6RKckIC7FgM61jHpQzLaK4jbk9 xgKBVd759TMbmkzRrpuryjyhieF7r07Z4Uvi8gZv2ZcAFauXMuOr7EIgLuZ7wLjXIhzt hzxLjDIfh7Bg0xFXvHukhZtNQSDquj+xKkyZ3bOE8nK+GUCfibsFpQgUsY/G5RFNQQeB kMLdEGNae+rqVYvKrRzoWaCHPDk9WXVgZk7gX00O8jd9hROzvR8jMUp86udxYnjpDb0c VdAb5ib+qUH0hi0L7pxUtKkSiSiP7QkoUyA+prEMc8q8b4zDPL4sJ3TEpzyS5R+OWPHQ t8mw== X-Gm-Message-State: AG10YOTz5lKZetDfe5fqaoIaadHtno8gnf2Ju9I4JU4lq4JNECz1xF5/nYZ5ucJbjeyzmy13nAVlHqYiWZzLBw== X-Received: by 10.28.21.19 with SMTP id 19mr6628661wmv.43.1455050194539; Tue, 09 Feb 2016 12:36:34 -0800 (PST) Original-Received: by 10.28.11.198 with HTTP; Tue, 9 Feb 2016 12:36:34 -0800 (PST) In-Reply-To: <87zivlodc4.fsf@web.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112826 Archived-At: --001a1145b64cf9dcbf052b5c4568 Content-Type: text/plain; charset=UTF-8 That does the trick, thanks for taking the time to respond to such an old bug report :-) On 31 January 2016 at 18:42, Michael Heerdegen wrote: > Antoine Levitt writes: > > > I did like flet, though, and in general, I think it's annoying to users > > to remove/deprecate functionality that are neat ways to get inside lisp > > code from outside (dynamic-scoping overrides, advices, etc.) just > > because they are bad practice and make debugging harder. > > BTW, let me add to the (valid) warnings that this can still be achieved > with cl-letf: > > (cl-letf (((symbol-function 'some-function) #'some-other-function)) > code...) > > The created binding to the symbol-function place is dynamical. > > > Michael. > --001a1145b64cf9dcbf052b5c4568 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That does the trick, thanks for taking the time to re= spond to such an old bug report :-)
<= br>
On 31 January 2016 at 18:42, Michael Heerdege= n <michael_heerdegen@web.de> wrote:
Antoine Levitt <antoine.levitt@gmail.com> writes:

> I did like flet, though, and in general, I think it's annoying to = users
> to remove/deprecate functionality that are neat ways to get inside lis= p
> code from outside (dynamic-scoping overrides, advices, etc.)=C2=A0 jus= t
> because they are bad practice and make debugging harder.

BTW, let me add to the (valid) warnings that this can still be achie= ved
with cl-letf:

=C2=A0 =C2=A0 (cl-letf (((symbol-function 'some-function) #'some-ot= her-function))
=C2=A0 =C2=A0 =C2=A0 code...)

The created binding to the symbol-function place is dynamical.


Michael.

--001a1145b64cf9dcbf052b5c4568--