mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
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.
This commit is contained in:
parent
ece2193705
commit
2ee00512e3
7 changed files with 111 additions and 99 deletions
|
|
@ -1,3 +1,16 @@
|
|||
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.
|
||||
|
||||
2008-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* files.el (auto-mode-alist): Use archive-mode for Debian packages.
|
||||
|
|
|
|||
|
|
@ -3450,7 +3450,8 @@ controlled by the sign of prefix numeric value."
|
|||
;; (which is called from viper-search-forward/backward/next). If the value of
|
||||
;; viper-search-scroll-threshold is negative - don't scroll.
|
||||
(defun viper-adjust-window ()
|
||||
(let ((win-height (if (featurep 'xemacs) (window-displayed-height)
|
||||
(let ((win-height (if (featurep 'xemacs)
|
||||
(window-displayed-height)
|
||||
(1- (window-height)))) ; adjust for modeline
|
||||
(pt (point))
|
||||
at-top-p at-bottom-p
|
||||
|
|
|
|||
|
|
@ -46,10 +46,8 @@
|
|||
;; in order to spare non-viperized emacs from being viperized
|
||||
(if noninteractive
|
||||
(eval-when-compile
|
||||
(let ((load-path (cons (expand-file-name ".") load-path)))
|
||||
(or (featurep 'viper-cmd)
|
||||
(load "viper-cmd.el" nil t 'nosuffix))
|
||||
)))
|
||||
(require 'viper-cmd)
|
||||
))
|
||||
;; end pacifier
|
||||
|
||||
(require 'viper-util)
|
||||
|
|
@ -2077,7 +2075,8 @@ Please contact your system administrator. "
|
|||
;; create temp buffer for the region
|
||||
(setq temp-buf (get-buffer-create " *ex-write*"))
|
||||
(set-buffer temp-buf)
|
||||
(if (featurep 'xemacs) (set-visited-file-name ex-file)
|
||||
(if (featurep 'xemacs)
|
||||
(set-visited-file-name ex-file)
|
||||
(set-visited-file-name ex-file 'noquery))
|
||||
(erase-buffer)
|
||||
(if (and file-exists ex-append)
|
||||
|
|
|
|||
|
|
@ -38,10 +38,8 @@
|
|||
;; in order to spare non-viperized emacs from being viperized
|
||||
(if noninteractive
|
||||
(eval-when-compile
|
||||
(let ((load-path (cons (expand-file-name ".") load-path)))
|
||||
(or (featurep 'viper-cmd)
|
||||
(load "viper-cmd.el" nil t 'nosuffix))
|
||||
)))
|
||||
(require 'viper-cmd)
|
||||
))
|
||||
;; end pacifier
|
||||
|
||||
(require 'viper-util)
|
||||
|
|
@ -874,8 +872,12 @@ name from there."
|
|||
next-event)
|
||||
(while (and (viper-fast-keysequence-p)
|
||||
(viper-keyseq-is-a-possible-macro lis macro-alist))
|
||||
(setq next-event (viper-read-key))
|
||||
;;(setq next-event (viper-read-event))
|
||||
;; Seems that viper-read-event is more robust here. We need to be able to
|
||||
;; place these events on unread-command-events list. If we use
|
||||
;; viper-read-key then events will be converted to keys, and sometimes
|
||||
;; (e.g., (control \[)) those keys differ from the corresponding events.
|
||||
;; So, do not use (setq next-event (viper-read-key))
|
||||
(setq next-event (viper-read-event))
|
||||
(or (viper-mouse-event-p next-event)
|
||||
(setq lis (vconcat lis (vector next-event)))))
|
||||
lis))
|
||||
|
|
|
|||
|
|
@ -41,10 +41,8 @@
|
|||
;; in order to spare non-viperized emacs from being viperized
|
||||
(if noninteractive
|
||||
(eval-when-compile
|
||||
(let ((load-path (cons (expand-file-name ".") load-path)))
|
||||
(or (featurep 'viper-cmd)
|
||||
(load "viper-cmd.el" nil t 'nosuffix))
|
||||
)))
|
||||
(require 'viper-cmd)
|
||||
))
|
||||
;; end pacifier
|
||||
|
||||
(require 'viper-util)
|
||||
|
|
|
|||
|
|
@ -209,10 +209,9 @@ Otherwise return the normal value."
|
|||
(if (featurep 'emacs) 'frame-parameter 'frame-property)
|
||||
(selected-frame)
|
||||
'viper-saved-cursor-color-in-replace-mode)
|
||||
(let ((ecolor (viper-frame-value viper-emacs-state-cursor-color)))
|
||||
(or (and (eq viper-current-state 'emacs-mode)
|
||||
ecolor)
|
||||
(viper-frame-value viper-vi-state-cursor-color)))))
|
||||
(viper-frame-value viper-emacs-state-cursor-color))
|
||||
(viper-frame-value viper-vi-state-cursor-color))))
|
||||
|
||||
(defsubst viper-get-saved-cursor-color-in-insert-mode ()
|
||||
(or
|
||||
|
|
@ -220,10 +219,9 @@ Otherwise return the normal value."
|
|||
(if (featurep 'emacs) 'frame-parameter 'frame-property)
|
||||
(selected-frame)
|
||||
'viper-saved-cursor-color-in-insert-mode)
|
||||
(let ((ecolor (viper-frame-value viper-emacs-state-cursor-color)))
|
||||
(or (and (eq viper-current-state 'emacs-mode)
|
||||
ecolor)
|
||||
(viper-frame-value viper-vi-state-cursor-color)))))
|
||||
(viper-frame-value viper-emacs-state-cursor-color))
|
||||
(viper-frame-value viper-vi-state-cursor-color))))
|
||||
|
||||
(defsubst viper-get-saved-cursor-color-in-emacs-mode ()
|
||||
(or
|
||||
|
|
@ -996,7 +994,7 @@ Otherwise return the normal value."
|
|||
;; This function lets function-key-map convert key sequences into logical
|
||||
;; keys. This does a better job than viper-read-event when it comes to kbd
|
||||
;; macros, since it enables certain macros to be shared between X and TTY modes
|
||||
;; by correctly mapping key sequences for Left/Right/... (one an ascii
|
||||
;; by correctly mapping key sequences for Left/Right/... (on an ascii
|
||||
;; terminal) into logical keys left, right, etc.
|
||||
(defun viper-read-key ()
|
||||
(let ((overriding-local-map viper-overriding-map)
|
||||
|
|
|
|||
|
|
@ -597,13 +597,14 @@ This startup message appears whenever you load Viper, unless you type `y' now."
|
|||
))
|
||||
(viper-set-expert-level 'dont-change-unless)))
|
||||
|
||||
(if (eq major-mode 'viper-mode)
|
||||
(setq major-mode 'fundamental-mode))
|
||||
|
||||
(or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi
|
||||
(memq major-mode viper-insert-state-mode-list) ; don't switch
|
||||
(viper-change-state-to-vi))
|
||||
)))
|
||||
))
|
||||
|
||||
(if (eq major-mode 'viper-mode)
|
||||
(setq major-mode 'fundamental-mode))
|
||||
)
|
||||
|
||||
|
||||
;; Apply a little heuristic to invoke vi state on major-modes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue