summaryrefslogtreecommitdiff
path: root/lisp/emulation/viper-util.el
diff options
context:
space:
mode:
authorMichael Kifer <kifer@cs.stonybrook.edu>2009-11-22 03:14:14 +0000
committerMichael Kifer <kifer@cs.stonybrook.edu>2009-11-22 03:14:14 +0000
commit433d9ace74fbd35205c06bcef487bd3e5d41e6bb (patch)
treea7d85bd9038bbc883093b9a830980723b4639b03 /lisp/emulation/viper-util.el
parent5ea5dbc9255d4abf0e2ab727167a2c9ba9c11076 (diff)
downloademacs-433d9ace74fbd35205c06bcef487bd3e5d41e6bb.tar.gz
emacs-433d9ace74fbd35205c06bcef487bd3e5d41e6bb.tar.bz2
emacs-433d9ace74fbd35205c06bcef487bd3e5d41e6bb.zip
2009-11-22 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el: use viper-last-command-char instead of last-command-char/last-command-event. (viper-prefix-arg-value): do correct conversion of event-char for XEmacs. * viper-util.el, viper.el: use viper-last-command-char instead of last-command-char/last-command-event. * ediff-init.el, ediff-mult.el, ediff-util.el: relpace last-command-char and last-command-event with (ediff-last-command-char) everywhere. * ediff-vers.el (ediff-rcs-get-output-buffer): make sure the buffer is created in fundamental mode. * ediff.el (ediff-version): revert the change of interactive-p to called-interactively-p.
Diffstat (limited to 'lisp/emulation/viper-util.el')
-rw-r--r--lisp/emulation/viper-util.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 503265c8b85..80cf3c78f60 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -174,12 +174,14 @@ Otherwise return the normal value."
(viper-frame-value viper-vi-state-cursor-color)
frame))))
-;; By default, saves current frame cursor color in the
-;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay
+;; By default, saves current frame cursor color before changing viper state
(defun viper-save-cursor-color (before-which-mode)
(if (and (viper-window-display-p) (viper-color-display-p))
(let ((color (viper-get-cursor-color)))
(if (and (stringp color) (viper-color-defined-p color)
+ ;; there is something fishy in that the color is not saved if
+ ;; it is the same as frames default cursor color. need to be
+ ;; checked.
(not (string= color
(viper-frame-value
viper-replace-overlay-cursor-color))))
@@ -1047,6 +1049,11 @@ Otherwise return the normal value."
(append mod (list basis))
basis))))
+(defun viper-last-command-char ()
+ (if (featurep 'xemacs)
+ (event-to-character last-command-event)
+ last-command-event))
+
(defun viper-key-to-emacs-key (key)
(let (key-name char-p modifiers mod-char-list base-key base-key-name)
(cond ((featurep 'xemacs) key)