[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mh-e/mh-acros.el advices `require' incorrectly
From: |
Kenichi Handa |
Subject: |
mh-e/mh-acros.el advices `require' incorrectly |
Date: |
Fri, 13 Jan 2006 16:49:48 +0900 |
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) |
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
address@hidden
- mh-e/mh-acros.el advices `require' incorrectly,
Kenichi Handa <=
- Re: mh-e/mh-acros.el advices `require' incorrectly, Bill Wohler, 2006/01/13
- RE: mh-e/mh-acros.el advices `require' incorrectly, Drew Adams, 2006/01/13
- Re: mh-e/mh-acros.el advices `require' incorrectly, Kenichi Handa, 2006/01/13
- Re: mh-e/mh-acros.el advices `require' incorrectly, Richard M. Stallman, 2006/01/14
- Re: mh-e/mh-acros.el advices `require' incorrectly, Bill Wohler, 2006/01/14
- Re: mh-e/mh-acros.el advices `require' incorrectly, Andreas Schwab, 2006/01/14
- Re: mh-e/mh-acros.el advices `require' incorrectly, Bill Wohler, 2006/01/14