bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12895: 24.3.50; Replacement for flet


From: Antoine Levitt
Subject: bug#12895: 24.3.50; Replacement for flet
Date: Thu, 15 Nov 2012 23:42:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]