]> git.eshelyaron.com Git - emacs.git/commitdiff
Limit triggering of abbrev expansion in viper-mode (Bug#9038)
authorBob Nnamtrop <bobnnamtrop@gmail.com>
Sat, 9 Jul 2011 19:32:42 +0000 (15:32 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 9 Jul 2011 19:32:42 +0000 (15:32 -0400)
* lisp/emulation/viper-cmd.el (viper-change-state-to-vi): Limit
triggering of abbrev expansion.

lisp/ChangeLog
lisp/emulation/viper-cmd.el

index 95fae9252d18a65957a74a022de10d1561e86726..6cdc0d38810827268d92d6a1734d48a86f4c0370 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-09  Bob Nnamtrop  <bobnnamtrop@gmail.com>  (tiny change)
+
+       * emulation/viper-cmd.el (viper-change-state-to-vi): Limit
+       triggering of abbrev expansion (Bug#9038).
+
 2011-07-09  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-default-specifiers): Remove.
index f06428d81eb7e1dd902f99d0ee29cd4dc5e3dbf3..9d0eb6c0d140df3e08d5d33e97e2d4121bf84897 100644 (file)
     (or (viper-overlay-p viper-replace-overlay)
       (viper-set-replace-overlay (point-min) (point-min)))
     (viper-hide-replace-overlay)
-    (if abbrev-mode (expand-abbrev))
+    ;; Expand abbrevs iff the previous character has word syntax.
+    (and abbrev-mode
+        (eq (char-syntax (preceding-char)) ?w)
+        (expand-abbrev))
     (if (and auto-fill-function (> (current-column) fill-column))
        (funcall auto-fill-function))
     ;; don't leave whitespace lines around