diff options
author | Bob Nnamtrop <bobnnamtrop@gmail.com> | 2011-07-09 15:32:42 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-07-09 15:32:42 -0400 |
commit | c0a7f30097617435ab8520b78cb135e9255d8f51 (patch) | |
tree | 8cf8aa48410d14b29053cf8b2a96332ebb02cf94 | |
parent | 0b608d029a1d44f856a93d86e7145be10c19ad53 (diff) | |
download | emacs-c0a7f30097617435ab8520b78cb135e9255d8f51.tar.gz |
Limit triggering of abbrev expansion in viper-mode (Bug#9038)
* lisp/emulation/viper-cmd.el (viper-change-state-to-vi): Limit
triggering of abbrev expansion.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/emulation/viper-cmd.el | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95fae9252d1..6cdc0d38810 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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. diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index f06428d81eb..9d0eb6c0d14 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -617,7 +617,10 @@ (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 |