[Top][All Lists]

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

Re: Undo defalias

From: Gregory Heytings
Subject: Re: Undo defalias
Date: Fri, 03 Mar 2023 16:01:17 +0000

The POC you posted works only if `message` was redefined in some particular way, such as when a loading a file that has

(defalias 'message #'ignore)

but then it wouldn't be the result of a bug but of deliberate harm :-)

My understanding is that this is what the OP did, and he wanted to "undo" what he did. With a Lisp function you can always open the source file again and C-M-x, but with a C function that's not possible.

AFAIK most cases where `message` can end up aliased to `ignore` is when you have code doing

(cl-letf (((symbol-function 'message) #'ignore))

In that case, the previous value won't be found in `function-history`. As for why is the `ignore` rebinding is still active...

But in that case the meaning of message is restored when the cl-letf is left, no? Am I missing something?

reply via email to

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