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

Re: [patch] emacspeak-w3m.el and problems



The issue with macros defined in an external file is independent
of advice.

Here is the problem:

Macros get expanded in-line, functions do not.

Now, when you compile a call of the form 
(foo a b)
where  foo's definition is not available at compile time,
then the compiled code will work correctly later on when foo's
definition is available as a function.

However, if it's a macro, the compiled code will break.

>>>>> "Tim" == Tim Cross <tcross@xxxxxxxxxxx> writes:
    Tim> Can someone expand on why the use of macros is a
    Tim> problem? I'm interested as I've been looking at
    Tim> providing emacspeak support for an application and have
    Tim> been experiencing problems with advising one of the
    Tim> functions. I really wanted to know if there is an issue
    Tim> with using defadvice and macros that I may not be aware
    Tim> of and I'm always intrested in knowing more about elisp
    Tim> and possible limitations/issues that may exist with
    Tim> using things like macros.
    Tim> 
    Tim> In my current problem, there is a function which
    Tim> controls display of some data in another window. I
    Tim> originally thought I could advise this function so that
    Tim> after it was called, emacspeak would speak the contents
    Tim> of the window. However, its not turned out to be that
    Tim> simple.  As soon as I advise the function, it stops
    Tim> working correctly - it no longer scrolls the information
    Tim> in the other window. Even if I just advise the function
    Tim> without doing anything but essentially putting a
    Tim> defadvice wrapper around it, the behavior of the
    Tim> function changes.
    Tim> 
    Tim> I then tried to be a bit clever and redefined the key
    Tim> the function was bound to to another function which just
    Tim> calls the display function and then emacspeak to speak
    Tim> the window. This also changes the behavior of the
    Tim> original display function. The window will get spoken,
    Tim> but it does not scroll when you hit the key as it is
    Tim> supposed to.
    Tim> 
    Tim> The function in question is definitely a function, but
    Tim> it does use a number of macros and I'm wondering if
    Tim> there is some weird macro expansion going on that I'm
    Tim> not understanding.
    Tim> 
    Tim> Tim
    Tim> 
    >> 
> I'm not on the w3m lists -- so at least I've not made them
    >> aware of this. If you and others use w3m heavily, I
    >> suggest you join their mailing list and contribute -- I'm
    >> sure they will be receptive.
    >> 
    >> >>>>> "Robert" == Robert D Crawford <rdc1x@xxxxxxxxxxx>
    >> writes:
    Robert> "T. V. Raman" <raman@xxxxxxxxxxx> writes:
    >> >> many of these errors are because things that shouldn't
    >> be >> macros are defined as macros in w3m --- see my
    >> earlier >> message about cleaning up w3m itself and
    >> changing those to >> defsubst where appropriate.
    Robert> 
    Robert> OK, as long as I know it wasn't something I did.
    Robert> 
    Robert> Have the developers of w3m been made aware of their
    Robert> errors?  I have no idea what is appropriate where, so
    Robert> it wouldn't do any good for me to post a message to
    Robert> them.
    Robert> 
    Robert> Thanks, rdc -- Robert D. Crawford rdc1x@xxxxxxxxxxx
    Robert> 
    Robert> "The only real way to look younger is not to be born
    Robert> so soon."  -- Charles Schulz, "Things I've Had to
    Robert> Learn Over and Over and Over"
    Robert> 
    Robert> -----------------------------------------------------------------------------
    Robert> To unsubscribe from the emacspeak list or change your
    Robert> address on the emacspeak list send mail to
    Robert> "emacspeak-request@xxxxxxxxxxx" with a subject of
    Robert> "unsubscribe" or "help"
    >> 
    >> -- 
    >> Best Regards, --raman
    >> 
    >> 
    >> Email: raman@xxxxxxxxxxx WWW:
    >> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk:
    >> tv.raman.tv@xxxxxxxxxxx PGP:
    >> http://emacspeak.sf.net/raman/raman-almaden.asc Google:
    >> tv+raman IRC: irc://irc.freenode.net/#emacs
    >> 
    >> -----------------------------------------------------------------------------
    >> To unsubscribe from the emacspeak list or change your
    >> address on the emacspeak list send mail to
    >> "emacspeak-request@xxxxxxxxxxx" with a subject of
    >> "unsubscribe" or "help"
    >> 

-- 
Best Regards,
--raman

      
Email:  raman@xxxxxxxxxxx
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@xxxxxxxxxxx
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog