From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.devel Subject: Re: mh-e/mh-acros.el advices `require' incorrectly Date: Fri, 13 Jan 2006 18:52:06 -0800 Organization: Newt Software Message-ID: <87ek3bfrmx.fsf@olgas.newt.com> References: <87hd87g62x.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137207217 20107 80.91.229.2 (14 Jan 2006 02:53:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 14 Jan 2006 02:53:37 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 14 03:53:25 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ExbXc-0004X7-5l for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2006 03:53:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExbZm-0007wD-40 for ged-emacs-devel@m.gmane.org; Fri, 13 Jan 2006 21:55:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ExbZ7-0007vc-RI for emacs-devel@gnu.org; Fri, 13 Jan 2006 21:54:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ExbZ6-0007vH-VM for emacs-devel@gnu.org; Fri, 13 Jan 2006 21:54:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExbZ6-0007v4-Fh for emacs-devel@gnu.org; Fri, 13 Jan 2006 21:54:52 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1ExbcB-0005qL-Hq for emacs-devel@gnu.org; Fri, 13 Jan 2006 21:58:03 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ExbWh-0004Q5-LQ for emacs-devel@gnu.org; Sat, 14 Jan 2006 03:52:23 +0100 Original-Received: from m110e36d0.tmodns.net ([208.54.14.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jan 2006 03:52:23 +0100 Original-Received: from wohler by m110e36d0.tmodns.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jan 2006 03:52:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 50 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: m110e36d0.tmodns.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:rB6H9OdZLxRr46y/5RhZnetyTow= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:49058 Archived-At: Stefan Monnier 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 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.