[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Undo defalias
From: |
Óscar Fuentes |
Subject: |
Re: Undo defalias |
Date: |
Fri, 03 Mar 2023 17:00:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
>> Somehow `message' ended aliased to `ignore':
>
> That'd be a bug.
> Probably a piece of code intended to do that temporarily but the
> restoration code failed or failed to be run.
>
> It'd be good to track it down and get the code fixed.
The problem was caused by aggressive-indent-mode.el. It uses
(cl-letf (((symbol-function 'message) #'ignore))
...
There is a PR for changing it to
(let ((inhibit-message t))
...
which hopefully will be more robust.
>> How could I bind back `message' to its original function definition?
>
> Depends on how it got set to `ignore` (you can try exiting from
> a recursive edit or a minibuffer), but in many cases it's impossible:
> the #<subr message> object may simply not be reachable from anywhere any
> more :-(
That was what I expected, although Gregory's solution works for the case
you apply it right after
(defalias 'message 'ignore)
Tested on emacs -Q version 30.0.50.