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: Tim X
Subject: Re: Redefining functions and variables
Date: Wed, 08 Dec 2010 15:21:57 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Johan Bockgård <bojohan+news@gnu.org> writes:

> 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

Not sure what you mean here, but I have lots of defadvice that is
defined for functions that are already defined and byte compiled which
work fine i.e. I use defadvice to advise standard emacs lisp functions
regularly without problems.

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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