From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: mh-e/mh-acros.el advices `require' incorrectly Date: Fri, 13 Jan 2006 16:49:48 +0900 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1137139300 32442 80.91.229.2 (13 Jan 2006 08:01:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2006 08:01:40 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 13 09:01:36 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 1ExJsH-0008DR-BR for ged-emacs-devel@m.gmane.org; Fri, 13 Jan 2006 09:01:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExJuO-0006Fg-DK for ged-emacs-devel@m.gmane.org; Fri, 13 Jan 2006 03:03:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ExJjL-0001hi-5v for emacs-devel@gnu.org; Fri, 13 Jan 2006 02:52:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ExJjG-0001h8-F7 for emacs-devel@gnu.org; Fri, 13 Jan 2006 02:52:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExJjA-0001ga-Nu for emacs-devel@gnu.org; Fri, 13 Jan 2006 02:52:06 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1ExJm6-0007qa-FX for emacs-devel@gnu.org; Fri, 13 Jan 2006 02:55:06 -0500 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id k0D7nn0a018669 for ; Fri, 13 Jan 2006 16:49:49 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id k0D7nnqB024921 for ; Fri, 13 Jan 2006 16:49:49 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1ExJgy-0004Oo-00 for ; Fri, 13 Jan 2006 16:49:48 +0900 Original-To: emacs-devel@gnu.org User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) 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:48982 Archived-At: This is in the latest CVS. The origianl `require' returns FEATURE even if it is already provided, but the adviced `require' returns nil in such a case. So, once mh-acros.el is loaded, a code depending on the return value of `require' stops working. Ex: (require 'mh-e) (require 'enriched) => enriched (require 'enriched) => nil How about this change? *** 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)) (defmacro mh-assoc-ignore-case (key alist) "Check if KEY is present in ALIST while ignoring case to do the comparison. --- 152,162 ---- (defadvice require (around mh-prefer-el activate) "Modify `require' to load uncompiled MH-E files." ! (if (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) ! (setq ad-return-value (ad-get-arg 0)))) (defmacro mh-assoc-ignore-case (key alist) "Check if KEY is present in ALIST while ignoring case to do the comparison. --- Kenichi Handa handa@m17n.org