unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5936: 23.1.95; fix a bug in abbrev--before-point
@ 2010-04-12 15:19 Leo
  2010-04-12 18:25 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Leo @ 2010-04-12 15:19 UTC (permalink / raw)
  To: 5936

If you use the :regexp property in an abbrev table, all abbrevs in that
table will fail except those with only one char. This is because of a
regexp match in abbrev--before-point which only looks back one char.

BTW, the doc string of looking-back seems irrelevant if by default it
only looks back one char, that can't be slower than looking-at.

diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index b72bdbb..d3b95cb 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -681,7 +681,7 @@ then ABBREV is looked up in that table only."
                              (setq start (point))
                              (forward-word 1)
                              (setq end (min (point) lim)))
-                         (when (looking-back re (line-beginning-position))
+                         (when (looking-back re (line-beginning-position) t)
                            (setq start (match-beginning 1))
                            (setq end   (match-end 1)))))
                      (setq name  (buffer-substring start end))








^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-15 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-12 15:19 bug#5936: 23.1.95; fix a bug in abbrev--before-point Leo
2010-04-12 18:25 ` Stefan Monnier
2010-04-15 10:15   ` Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).