comparison lisp/emulation/viper-macs.el @ 93615:34417c118a39

2008-04-03 Michael Kifer <kifer@cs.stonybrook.edu> * viper-macs.el (viper-read-fast-keysequence): use viper-read-event instead of viper-read-key. * viper.el (viper-mode): move the check for fundamental mode. * viper-utils.el (viper-get-saved-cursor-color-in-replace-mode) viper-get-saved-cursor-color-in-insert-mode): get rid of redundant let-statements. * viper*.el: replaced load with require in eval-when-compile.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Thu, 03 Apr 2008 21:04:18 +0000
parents 107ccd98fa12
children 1e3a407766b9
comparison
equal deleted inserted replaced
93614:ee3b56d7c857 93615:34417c118a39
36 36
37 ;; loading happens only in non-interactive compilation 37 ;; loading happens only in non-interactive compilation
38 ;; in order to spare non-viperized emacs from being viperized 38 ;; in order to spare non-viperized emacs from being viperized
39 (if noninteractive 39 (if noninteractive
40 (eval-when-compile 40 (eval-when-compile
41 (let ((load-path (cons (expand-file-name ".") load-path))) 41 (require 'viper-cmd)
42 (or (featurep 'viper-cmd) 42 ))
43 (load "viper-cmd.el" nil t 'nosuffix))
44 )))
45 ;; end pacifier 43 ;; end pacifier
46 44
47 (require 'viper-util) 45 (require 'viper-util)
48 (require 'viper-keym) 46 (require 'viper-keym)
49 47
871 ;; viper-fast-keyseq-timeout. 869 ;; viper-fast-keyseq-timeout.
872 (defun viper-read-fast-keysequence (event macro-alist) 870 (defun viper-read-fast-keysequence (event macro-alist)
873 (let ((lis (vector event)) 871 (let ((lis (vector event))
874 next-event) 872 next-event)
875 (while (and (viper-fast-keysequence-p) 873 (while (and (viper-fast-keysequence-p)
876 (viper-keyseq-is-a-possible-macro lis macro-alist)) 874 (viper-keyseq-is-a-possible-macro lis macro-alist))
877 (setq next-event (viper-read-key)) 875 ;; Seems that viper-read-event is more robust here. We need to be able to
878 ;;(setq next-event (viper-read-event)) 876 ;; place these events on unread-command-events list. If we use
877 ;; viper-read-key then events will be converted to keys, and sometimes
878 ;; (e.g., (control \[)) those keys differ from the corresponding events.
879 ;; So, do not use (setq next-event (viper-read-key))
880 (setq next-event (viper-read-event))
879 (or (viper-mouse-event-p next-event) 881 (or (viper-mouse-event-p next-event)
880 (setq lis (vconcat lis (vector next-event))))) 882 (setq lis (vconcat lis (vector next-event)))))
881 lis)) 883 lis))
882 884
883 885