]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/viper.el
* progmodes/cfengine.el: Add CFEngine 3.x syntax highlighting and support.
[gnu-emacs] / lisp / emulation / viper.el
index 0da3345aae43c13539b10743298d532afb006c3f..3704725b8dd25b4681409c5e8667accd898b3c13 100644 (file)
@@ -1,4 +1,4 @@
-;;; viper.el --- A full-featured Vi emulator for GNU Emacs and XEmacs,
+;;; viper.el --- A full-featured Vi emulator for Emacs and XEmacs,
 ;;              a VI Plan for Emacs Rescue,
 ;;              and a venomous VI PERil.
 ;;              Viper Is also a Package for Emacs Rebels.
@@ -491,7 +491,7 @@ unless it is coming up in a wrong Viper state."
     )
   "List specifying how to modify the various major modes to enable some Viperisms.
 The list has the structure: ((mode viper-state keymap) (mode viper-state
-keymap) ...).  If `mode' is on the list, the `kemap' will be made active (on
+keymap) ...).  If `mode' is on the list, the `keymap' will be made active (on
 the minor-mode-map-alist) in the specified viper state.
 If you change this list, have to restart Emacs for the change to take effect.
 However, if you did the change through the customization widget, then Emacs
@@ -547,7 +547,7 @@ If Viper is enabled, turn it off.  Otherwise, turn it on."
                      "Viper Is a Package for Emacs Rebels,
 a VI Plan for Emacs Rescue, and a venomous VI PERil.
 
-Incidentally, Viper emulates Vi under GNU Emacs 20 and XEmacs 20.
+Incidentally, Viper emulates Vi under Emacs/XEmacs 20.
 It supports all of what is good in Vi and Ex, while extending
 and improving upon much of it.
 
@@ -777,7 +777,7 @@ It also can't undo some Viper settings."
   (viper-unbind-mouse-search-key)
   (viper-unbind-mouse-insert-key)
   ;; In emacs, we have to advice handle-switch-frame
-  ;; This advice is undone earlier, when all advices matchine "viper-" are
+  ;; This advice is undone earlier, when all advices matching "viper-" are
   ;; deactivated.
   (if (featurep 'xemacs)
       (remove-hook 'mouse-leave-frame-hook 'viper-remember-current-frame))
@@ -850,20 +850,21 @@ It also can't undo some Viper settings."
   ;; Zap bad bindings in flyspell-mouse-map, which prevent ESC from working
   ;; over misspelled words (due to the overlay keymaps)
   (defvar flyspell-mode-hook)
+  (defvar flyspell-mouse-map)
   (add-hook 'flyspell-mode-hook
-           '(lambda ()
-              (define-key flyspell-mouse-map viper-ESC-key nil)))
+           (lambda ()
+              (define-key flyspell-mouse-map viper-ESC-key nil)))
   ;; if viper is started from .emacs, it might be impossible to get certain
   ;; info about the display and windows until emacs initialization is complete
   ;; So do it via the window-setup-hook
   (add-hook 'window-setup-hook
-           '(lambda ()
-              (modify-frame-parameters
-               (selected-frame)
-               (list (cons 'viper-vi-state-cursor-color
-                           (viper-get-cursor-color))))
-              (setq viper-vi-state-cursor-color (viper-get-cursor-color))
-              ))
+           (lambda ()
+              (modify-frame-parameters
+               (selected-frame)
+               (list (cons 'viper-vi-state-cursor-color
+                           (viper-get-cursor-color))))
+              (setq viper-vi-state-cursor-color (viper-get-cursor-color))
+              ))
 
   ;; Tell vc-diff to put *vc* in Vi mode
   (eval-after-load
@@ -1049,7 +1050,7 @@ It also can't undo some Viper settings."
                                         (memq 'down (event-modifiers (aref key 1)))))
                                (read-event))))))
     ) ; (if (featurep 'xemacs)
-  
+
   (if (featurep 'xemacs)
       ;; XEmacs
       (defadvice describe-key-briefly
@@ -1075,7 +1076,7 @@ It also can't undo some Viper settings."
                               (prefix-numeric-value current-prefix-arg))
                           1))))
     ) ; (if (featurep 'xemacs)
-  
+
   (defadvice find-file (before viper-add-suffix-advice activate)
     "Use `read-file-name' for reading arguments."
     (interactive (cons (read-file-name "Find file: " nil default-directory)