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

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

Re: Undo defalias


From: Gregory Heytings
Subject: Re: Undo defalias
Date: Tue, 28 Feb 2023 09:17:27 +0000



Somehow `message' ended aliased to `ignore':

C-h f message

message is an alias for ‘ignore’.
...

To repair this damage (without restarting Emacs) usually I would go to the definition of `message' and evaluate it, but this function is defined in C.

How could I bind back `message' to its original function definition?


(defmacro undefalias (symbol)
  `(progn
     (fset ,symbol (cadr (get ,symbol 'function-history)))
     (put ,symbol 'function-history (cddr (get ,symbol 'function-history)))))


reply via email to

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