GNU bug report logs -
#12895
24.3.50; Replacement for flet
Previous Next
Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>
Date: Thu, 15 Nov 2012 13:37:02 UTC
Severity: normal
Tags: notabug
Found in version 24.3.50
Done: Marcin Borkowski <mbork <at> mbork.pl>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 12895 <at> debbugs.gnu.org (full text, mbox):
11/15/2012 19:35, Stefan Monnier
>>> Such override should be done with an advice.
>> Unless I'm missing something easier, using an advice would be cumbersome
>> (define the advice, activate it, run the function, then deactivate the
>> advice, protecting for errors). Would you consider un-obsoleting flet?
>> It isn't deprecated by either cl-flet or cl-letf.
>
> Overriding a function is bad. It can mess things up and throw you
> majorly off-course when debugging the problem.
So are advices. I have lots of flet in my .emacs, usually to suppress
messages from functions which are defined elsewhere. For instance,
(defun my-org-agenda-to-appt ()
(interactive)
(flet ((message (&rest args) ))
(org-agenda-to-appt)))
The point is I do not want to redefine org-agenda-to-appt, because I
don't want to have to maintain a parallel copy of it. To get away with
it without too much effort, I'm just going to have to redefine flet
without the obsolete part in my .emacs, which is suboptimal.
This bug report was last modified 9 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.