[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: W3m.el and Emacspeak (non-member post)

Nothing religious --here is the practical problem that macros cause
systems like emacspeak 
that try to use services offered by  other packages while
speech-enabling them.

Consider for instance 'w3m-anchor --
It's useful to call this from inside emacspeak code to get the anchor
information and speak it.
However, since it is a macro,
byte-compiling the emacspeak-w3m module will give errors unless w3m
and all its modules are loaded when compilation happens.
I cannot  setup emacspeak to load w3m at compile time since w3m may be
installed in some non-standard place by the user.

Given that emacs lisp has defsubst which inlines the code,
there is no reason to use defmacro for this purpose --macros can (and
should be) used to create special forms where needed.
Katsumi Yamaoka writes:
 > >>>>> In [emacs-w3m : No.02960] <tvraman@us.ibm.com> wrote:
 > Raman> 0) W3M uses a large number of defmacros --I'd like to see at
 > Raman>    least some of these turned into defsubst to make Emacspeak's
 > Raman>    life easier.
 > Raman> If you are prepared to accept that change I'd be happy to
 > Raman>    contribute updates to w3m-utils.el and friends.
 > Eh, what problems do defmacros cause?  If the use of macros is
 > generally evil, many Lisp programs are sick.
 > Anyway, thanks very much for your good offices to use emacs-w3m
 > on Emacspeak.
 > -- 
 > Katsumi Yamaoka <yamaoka@jpl.org>

Best Regards,
T. V. Raman:  PhD (Cornell University)
IBM Research: Human Language Technologies
Architect:    Conversational And Multimodal WWW Standards
Phone:        1 (408) 927 2608
Fax:        1 (408) 927 3012
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
AIM:      TVRaman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120