[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mh-e/mh-acros.el advices `require' incorrectly
From: |
Stefan Monnier |
Subject: |
Re: mh-e/mh-acros.el advices `require' incorrectly |
Date: |
Fri, 13 Jan 2006 16:45:15 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> *** 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)
- Re: mh-e/mh-acros.el advices `require' incorrectly, (continued)
- Re: mh-e/mh-acros.el advices `require' incorrectly, Richard M. Stallman, 2006/01/15
- Re: mh-e/mh-acros.el advices `require' incorrectly, Bill Wohler, 2006/01/15
- Re: mh-e/mh-acros.el advices `require' incorrectly, Richard M. Stallman, 2006/01/16
- Re: mh-e/mh-acros.el advices `require' incorrectly, Bill Wohler, 2006/01/16
- Re: mh-e/mh-acros.el advices `require' incorrectly, David Kastrup, 2006/01/17
- Re: mh-e/mh-acros.el advices `require' incorrectly, Bill Wohler, 2006/01/17
- MH-E reorg (was: mh-e/mh-acros.el advices `require' incorrectly), Bill Wohler, 2006/01/29
- Re: MH-E reorg, Bill Wohler, 2006/01/29
- Re: MH-E reorg (was: mh-e/mh-acros.el advices `require' incorrectly), Richard M. Stallman, 2006/01/30
- Re: MH-E reorg (was: mh-e/mh-acros.el advices `require' incorrectly), Bill Wohler, 2006/01/30
Re: mh-e/mh-acros.el advices `require' incorrectly,
Stefan Monnier <=
Re: mh-e/mh-acros.el advices `require' incorrectly, Richard M. Stallman, 2006/01/14