emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: abbrev.c bug?


From: Luc Teirlinck
Subject: Re: abbrev.c bug?
Date: Mon, 26 Jul 2004 07:14:03 -0500 (CDT)

Katsumi Yamaoka wrote:

   I'm using mail aliases written in the ~/.mailrc file and the
   message-mode runs mail-abbrevs-setup to make them usable in the
   message buffer.  However, even if I write an alias and type the
   space key in the message header, it isn't expanded to the
   aliasee at present.  I don't know why pre-abbrev-expand-hook is
   not evaluated, but I found the following ChangeLog entry:

   2004-07-24  Richard M. Stallman  <address@hidden>
   [...]
           * abbrev.c (Fexpand_abbrev): Run Qpre_abbrev_expand_hook
           only when a real abbrev is present.

   How do I make `a real abbrev'?  Or is it a bug?

I guess there must have been a reason for that change.  However the
change contradicts the documentation of `pre-abbrev-expand-hook' in
th Elisp manual:

     Running the hook is the first thing that `expand-abbrev' does,
     and so a hook function can be used to change the current abbrev
     table before abbrev lookup happens.

as well as in its docstring

     This is the first thing that `expand-abbrev' does, and so this
     may change the current abbrev table before abbrev lookup happens.

Note that it says that it is the _first_ thing `expand-abbrev' does.
This is no longer valid at all.  Now, it is done after tons of other
stuff. 

I believe that one of the main jobs of `pre-abbrev-expand-hook' is to
decide whether a real abbrev is present.  It allows, for instance, to
change the syntax table before deciding that.  That is why it is
important that it is the very first thing `expand-abbrev' does, as the
documentation says.

Sincerely,

Luc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]