1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

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.
This commit is contained in:
Bob Nnamtrop 2011-07-09 15:32:42 -04:00 committed by Chong Yidong
parent 0b608d029a
commit c0a7f30097
2 changed files with 9 additions and 1 deletions

View 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.

View File

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