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

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

Re: mail-abbrev-end-of-buffer apparently does nothing


From: Francesco Potorti`
Subject: Re: mail-abbrev-end-of-buffer apparently does nothing
Date: Fri, 27 Apr 2007 09:19:29 +0200

>    Apparently mail-abbrev-end-of-buffer does nothing special: it jumps to
>    the end of buffer but does not expand the abbreviation.
>
>The code tries to expand:
...
>Why doesn't it work for you?

The problem is in mailabbrev.el, in sendmail-pre-abbrev-expand-hook,
where it does:

   ;; If the character just typed was non-alpha-symbol-syntax,
   ;; then don't expand the abbrev now (that is, don't expand
   ;; when the user types -.)  Check the character's syntax in
   ;; the usual syntax table.

   (or (and (integerp last-command-char)
              (or (eq (char-syntax last-command-char) ?_)
                  ;; Don't expand on @.
                  (memq last-command-char '(?@ ?. ?% ?! ?_ ?-))))

the code looks at last-command-char, trying to understand what is the
user doing.  But when I use ESC >, last-command-char is 62, whose syntax
is ?_, and so the expansion code is skipped.  Apparently, testing
last-command-char is not the right way to do this check.




reply via email to

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