all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bill Wohler <wohler@newt.com>
Cc: mh-e-devel@lists.sourceforge.net
Subject: Re: mh-e/mh-acros.el advices `require' incorrectly
Date: Fri, 13 Jan 2006 10:56:27 -0800	[thread overview]
Message-ID: <87oe2gez38.fsf__42426.071331329$1137184786$gmane$org@olgas.newt.com> (raw)
In-Reply-To: E1ExJgy-0004Oo-00@etlken

Kenichi Handa <handa@m17n.org> writes:

> 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.

Satyaki,

What do you (and others) think about this?

-- 
Bill Wohler <wohler@newt.com>  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.

  reply	other threads:[~2006-01-13 18:56 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 [this message]
2006-01-13 21:45 ` Stefan Monnier
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87oe2gez38.fsf__42426.071331329$1137184786$gmane$org@olgas.newt.com' \
    --to=wohler@newt.com \
    --cc=mh-e-devel@lists.sourceforge.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.