emacs-devel
[Top][All Lists]
Advanced

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

Re: mh-e/mh-acros.el advices `require' incorrectly


From: Bill Wohler
Subject: Re: mh-e/mh-acros.el advices `require' incorrectly
Date: Fri, 13 Jan 2006 18:52:06 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> *** mh-acros.el      13 Jan 2006 10:27:43 +0900      1.13
>> --- mh-acros.el      13 Jan 2006 16:45:04 +0900      
>> ***************
>> *** 152,161 ****
>   
>>   (defadvice require (around mh-prefer-el activate)
>>     "Modify `require' to load uncompiled MH-E files."
>> !   (or (featurep (ad-get-arg 0))
>> !       (and (string-match "^mh-" (symbol-name (ad-get-arg 0)))
>> !            (load (format "%s.el" (ad-get-arg 0)) t t))
>> !       ad-do-it))
>   
> For what it's worth:
> We usually try to avoid defadvice within Emacs and I think for
> good reasons.  Now, some elisp packages do you use defadvice, but they only
> only do it when it's absolutely necessary.  The above advice seem to be just
> a minor convenience hack to making recompiling occasionally easier.
>
> I'd rather try and come up with a generic fix for the problem.
> I personally use the patch below for now.
>
>
>         Stefan
>
>
> --- orig/lisp/emacs-lisp/bytecomp.el
> +++ mod/lisp/emacs-lisp/bytecomp.el
> @@ -1640,6 +1640,12 @@
>    ;; Force logging of the file name for each file compiled.
>    (setq byte-compile-last-logged-file nil)
>    (let ((byte-compile-current-file filename)
> +        ;; Prefer source files over compiled files.  This is so that when
> +        ;; several files are changed and recompiled, each new file is
> +        ;; properly recompiled with the new macros in the other new files.
> +        (load-suffixes (sort (copy-sequence load-suffixes)
> +                             (lambda (s1 s2) (and (string-match "\\.elc\\b" 
> s2)
> +                                             (string-match "\\.el\\b" s1)))))
>       (set-auto-coding-for-load t)
>       target-file input-buffer output-buffer
>       byte-compile-dest-file)

Is there a problem with your committing this patch? Then we can get
rid of the defadvice and make everyone happy ;-).

-- 
Bill Wohler <address@hidden>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.





reply via email to

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