From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: mh-e/mh-acros.el advices `require' incorrectly
Date: Fri, 13 Jan 2006 16:45:15 -0500 [thread overview]
Message-ID: <87hd87g62x.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1ExJgy-0004Oo-00@etlken> (Kenichi Handa's message of "Fri, 13 Jan 2006 16:49:48 +0900")
> *** 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)
next prev parent reply other threads:[~2006-01-13 21:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-13 7:49 mh-e/mh-acros.el advices `require' incorrectly Kenichi Handa
2006-01-13 18:56 ` Bill Wohler
2006-01-13 21:45 ` Stefan Monnier [this message]
2006-01-14 2:52 ` Bill Wohler
2006-01-14 16:14 ` Richard M. Stallman
2006-01-14 17:47 ` Stefan Monnier
2006-01-14 5:49 ` Richard M. Stallman
2006-01-14 8:25 ` Bill Wohler
[not found] <87oe2gez38.fsf@olgas.newt.com>
2006-01-13 21:04 ` Drew Adams
2006-01-13 22:11 ` Bill Wohler
2006-01-13 23:36 ` Satyaki Das
2006-01-14 1:39 ` Bill Wohler
2006-01-14 0:29 ` Kenichi Handa
2006-01-14 16:14 ` Richard M. Stallman
2006-01-14 23:00 ` Bill Wohler
2006-01-14 23:16 ` Andreas Schwab
2006-01-15 0:26 ` Bill Wohler
2006-01-15 2:22 ` Stefan Monnier
2006-01-15 23:07 ` Richard M. Stallman
2006-01-16 1:29 ` Bill Wohler
2006-01-17 3:24 ` Richard M. Stallman
2006-01-17 4:20 ` Bill Wohler
2006-01-17 9:18 ` David Kastrup
2006-01-17 17:19 ` Bill Wohler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hd87g62x.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).