From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Bob Nnamtrop <bobnnamtrop@gmail.com>
Cc: 5805@debbugs.gnu.org
Subject: bug#5805: 23.3 abbrev-insert needs a limited save-excursion
Date: Thu, 07 Jul 2011 21:03:03 -0400 [thread overview]
Message-ID: <jwv62ndwpqe.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAKV0tLOEA2kUOb0emP7HvBEXS=oP6EPGC=FcO-1z-3tEZTdaiw@mail.gmail.com> (Bob Nnamtrop's message of "Thu, 7 Jul 2011 18:02:15 -0600")
> Here are two patches that do what I explained above. I am new to elisp
> so be kind :-) Note that these apply against the trunk (sorry to be
> switching back of forth).
I still haven't thought about the save-excursion issue, but for the
other, I think the fix should be complete in viper without changing
expand-abbrev.
The way it work in "normal Emacs" is the self-insert-command only calls
expand-abbrev if (as its docstring explains) the char inserted doesn't
have word syntax and the previous one does. The corresponding code
(it's in C):
if (!NILP (BVAR (current_buffer, abbrev_mode))
&& synt != Sword
&& NILP (BVAR (current_buffer, read_only))
&& PT > BEGV
&& (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters))
? XFASTINT (Fprevious_char ())
: UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ())))
== Sword))
{
-- Stefan
next prev parent reply other threads:[~2011-07-08 1:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201003291206.NAA17706@ultimate.Smallworld.co.uk>
2010-03-30 16:33 ` bug#5805: Returned mail: Cannot send message within 3 days Maguire, Andrew (GE Infra, Energy)
2010-04-10 16:04 ` bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion Chong Yidong
2010-04-10 17:06 ` Maguire, Andrew (GE Infra, Energy)
2010-04-10 19:10 ` Stefan Monnier
2010-04-12 11:28 ` Maguire, Andrew (GE Infra, Energy)
2010-04-12 13:31 ` Stefan Monnier
2010-04-12 15:02 ` Maguire, Andrew (GE Infra, Energy)
2010-04-12 18:13 ` Stefan Monnier
2011-07-07 14:48 ` bug#5805: 23.3 abbrev-insert needs a limited save-excursion Bob Nnamtrop
2011-07-07 20:59 ` Stefan Monnier
2011-07-07 21:46 ` Bob Nnamtrop
2011-07-08 0:02 ` Bob Nnamtrop
2011-07-08 1:03 ` Stefan Monnier [this message]
2011-07-08 14:43 ` Stefan Monnier
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=jwv62ndwpqe.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=5805@debbugs.gnu.org \
--cc=bobnnamtrop@gmail.com \
/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.