[Top][All Lists]

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

bug#5936: 23.1.95; fix a bug in abbrev--before-point

From: Leo
Subject: bug#5936: 23.1.95; fix a bug in abbrev--before-point
Date: Mon, 12 Apr 2010 16:19:37 +0100

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))

reply via email to

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