GNU bug report logs - #12895
24.3.50; Replacement for flet

Previous Next

Package: emacs;

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 #8 received at 12895 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Cc: 12895 <at> debbugs.gnu.org
Subject: Re: bug#12895: 24.3.50; Replacement for flet
Date: Thu, 15 Nov 2012 09:46:19 -0500
> (defun something ()
>   (message "hi"))
> (letf ((message (lambda () (&rest args) nil)))
>   (something))
> Is this because message is a built-in?

No, it's because what you want is not a local function, but an override
of an existing function.  Such override should be done with an advice.


        Stefan




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.