emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105061: Limit triggering of abbrev e


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105061: Limit triggering of abbrev expansion in viper-mode (Bug#9038)
Date: Sat, 09 Jul 2011 15:32:42 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105061
author: Bob Nnamtrop <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-07-09 15:32:42 -0400
message:
  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.
modified:
  lisp/ChangeLog
  lisp/emulation/viper-cmd.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-09 18:12:29 +0000
+++ b/lisp/ChangeLog    2011-07-09 19:32:42 +0000
@@ -1,3 +1,8 @@
+2011-07-09  Bob Nnamtrop  <address@hidden>  (tiny change)
+
+       * emulation/viper-cmd.el (viper-change-state-to-vi): Limit
+       triggering of abbrev expansion (Bug#9038).
+
 2011-07-09  Martin Rudalics  <address@hidden>
 
        * window.el (display-buffer-default-specifiers): Remove.

=== modified file 'lisp/emulation/viper-cmd.el'
--- a/lisp/emulation/viper-cmd.el       2011-05-23 17:57:17 +0000
+++ b/lisp/emulation/viper-cmd.el       2011-07-09 19:32:42 +0000
@@ -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


reply via email to

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