Spelling fixes.
[bpt/emacs.git] / lisp / emulation / viper-cmd.el
index f06428d..ce3cc3c 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
@@ -1384,7 +1387,7 @@ as a Meta key and any number of multiple escapes are allowed."
        (insert " ")(backward-char 1)))
   (if (= viper-com-point (point))
       (viper-forward-char-carefully))
-  (set-mark viper-com-point)
+  (push-mark viper-com-point)
   (if (eq m-com 'viper-next-line-at-bol)
       (viper-enlarge-region (mark t) (point)))
   (if (< (point) (mark t))
@@ -1393,8 +1396,7 @@ as a Meta key and any number of multiple escapes are allowed."
       (viper-backward-char-carefully)) ; give back the newline
   (if (eq viper-intermediate-command 'viper-repeat)
       (viper-change-subr (mark t) (point))
-    (viper-change (mark t) (point))
-    ))
+    (viper-change (mark t) (point))))
 
 ;; this is invoked by viper-substitute-line
 (defun viper-exec-Change (m-com com)
@@ -1597,7 +1599,7 @@ as a Meta key and any number of multiple escapes are allowed."
 ;; call viper-execute-com to execute viper-exec-change, which eventually will
 ;; call viper-change to invoke the replace mode on the region.
 ;;
-;; The var viper-d-com is set to (M-COM VAL COM REG INSETED-TEXT COMMAND-KEYS)
+;; The var viper-d-com is set to (M-COM VAL COM REG INSERTED-TEXT COMMAND-KEYS)
 ;; via a call to viper-set-destructive-command, for later use by viper-repeat.
 (defun viper-execute-com (m-com val com)
   (let ((reg viper-use-register))
@@ -3713,7 +3715,7 @@ Although this function is bound to \\[viper-toggle-search-style], the most
 convenient way to use it is to bind `//' to the macro
 `1 M-x viper-toggle-search-style' and `///' to
 `2 M-x viper-toggle-search-style'.  In this way, hitting `//' quickly will
-toggle case-fold-search and hitting `/' three times witth toggle regexp
+toggle case-fold-search and hitting `/' three times with toggle regexp
 search.  Macros are more convenient in this case because they don't affect
 the Emacs binding of `/'."
   (interactive "P")