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

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

Re: Redefining functions and variables


From: Johan Bockgård
Subject: Re: Redefining functions and variables
Date: Wed, 08 Dec 2010 15:21:54 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Elena <egarrulo@gmail.com> writes:

>> (defmacro defun (name args &rest body)
>>   `(progn
>>       (message "defining %S" name)
>>       (,old-defun ,name ,args ,@body)))
>
> This is very close to what I was looking for.

Note that neither defadvice nor redefinition of defun will work for
(already) byte compiled code.


(byte-compile (lambda () (defun foo ()))) =>

#[nil "..." [defalias foo #[nil "..." [nil] 1]] 3]
                ^
          no `defun' after byte compilation


reply via email to

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