[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emulation/viper-cmd.el
From: |
Michael Kifer |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/viper-cmd.el |
Date: |
Mon, 24 Dec 2001 00:50:33 -0500 |
Index: emacs/lisp/emulation/viper-cmd.el
diff -c emacs/lisp/emulation/viper-cmd.el:1.33
emacs/lisp/emulation/viper-cmd.el:1.34
*** emacs/lisp/emulation/viper-cmd.el:1.33 Sat Oct 13 17:38:19 2001
--- emacs/lisp/emulation/viper-cmd.el Mon Dec 24 00:50:31 2001
***************
*** 298,307 ****
;; desirable that viper-pre-command-sentinel is the last hook and
;; viper-post-command-sentinel is the first hook.
! (make-local-hook 'viper-after-change-functions)
! (make-local-hook 'viper-before-change-functions)
! (make-local-hook 'viper-post-command-hooks)
! (make-local-hook 'viper-pre-command-hooks)
(remove-hook 'post-command-hook 'viper-post-command-sentinel)
(add-hook 'post-command-hook 'viper-post-command-sentinel)
--- 298,309 ----
;; desirable that viper-pre-command-sentinel is the last hook and
;; viper-post-command-sentinel is the first hook.
! (if viper-xemacs-p
! (progn
! (make-local-hook 'viper-after-change-functions)
! (make-local-hook 'viper-before-change-functions)
! (make-local-hook 'viper-post-command-hooks)
! (make-local-hook 'viper-pre-command-hooks)))
(remove-hook 'post-command-hook 'viper-post-command-sentinel)
(add-hook 'post-command-hook 'viper-post-command-sentinel)
***************
*** 786,794 ****
;; key translation. (Such left-overs are possible if the user
;; types a regular key.)
(let (unread-command-events)
! ;; The next 2 cmds are intended to prevent the input method
;; from swallowing ^M, ^Q and other special characters
(setq ch (read-char))
(viper-set-unread-command-events ch)
(quail-input-method nil)
--- 788,802 ----
;; key translation. (Such left-overs are possible if the user
;; types a regular key.)
(let (unread-command-events)
! ;; The next cmd and viper-set-unread-command-events
! ;; are intended to prevent the input method
;; from swallowing ^M, ^Q and other special characters
(setq ch (read-char))
+ ;; replace ^M with the newline
+ (if (eq ch ?\C-m) (setq ch ?\n))
+ ;; Make sure ^V and ^Q work as quotation chars
+ (if (memq ch '(?\C-v ?\C-q))
+ (setq ch (read-char)))
(viper-set-unread-command-events ch)
(quail-input-method nil)
***************
*** 806,811 ****
--- 814,824 ----
;; quail-input-method
(let (unread-command-events)
(setq ch (read-char))
+ ;; replace ^M with the newline
+ (if (eq ch ?\C-m) (setq ch ?\n))
+ ;; Make sure ^V and ^Q work as quotation chars
+ (if (memq ch '(?\C-v ?\C-q))
+ (setq ch (read-char)))
(viper-set-unread-command-events ch)
(quail-start-translation nil)
***************
*** 818,826 ****
--- 831,849 ----
))
((and (boundp 'iso-accents-mode) iso-accents-mode)
(setq ch (aref (read-key-sequence nil) 0))
+ ;; replace ^M with the newline
+ (if (eq ch ?\C-m) (setq ch ?\n))
+ ;; Make sure ^V and ^Q work as quotation chars
+ (if (memq ch '(?\C-v ?\C-q))
+ (setq ch (aref (read-key-sequence nil) 0)))
(insert ch))
(t
(setq ch (read-char))
+ ;; replace ^M with the newline
+ (if (eq ch ?\C-m) (setq ch ?\n))
+ ;; Make sure ^V and ^Q work as quotation chars
+ (if (memq ch '(?\C-v ?\C-q))
+ (setq ch (read-char)))
(insert ch))
)
(setq last-command-event
***************
*** 2554,2565 ****
(or (eq viper-intermediate-command 'viper-repeat)
(viper-special-read-and-insert-char))
- ;; Is this needed?
- (if (eq char ?\C-m) (setq char ?\n))
-
(delete-char 1 t)
-
(setq char (if com viper-d-char (viper-char-at-pos 'backward)))
(if com (insert char))
(setq viper-d-char char)
--- 2577,2585 ----
(or (eq viper-intermediate-command 'viper-repeat)
(viper-special-read-and-insert-char))
(delete-char 1 t)
(setq char (if com viper-d-char (viper-char-at-pos 'backward)))
+
(if com (insert char))
(setq viper-d-char char)
***************
*** 3836,3842 ****
(define-key viper-vi-basic-map
(cond ((viper-characterp viper-buffer-search-char)
(char-to-string viper-buffer-search-char))
! (t (error "viper-buffer-search-char: wrong value type, %s"
viper-buffer-search-char)))
'viper-command-argument)
(aset viper-exec-array viper-buffer-search-char 'viper-exec-buffer-search)
--- 3856,3862 ----
(define-key viper-vi-basic-map
(cond ((viper-characterp viper-buffer-search-char)
(char-to-string viper-buffer-search-char))
! (t (error "viper-buffer-search-char: wrong value type, %S"
viper-buffer-search-char)))
'viper-command-argument)
(aset viper-exec-array viper-buffer-search-char 'viper-exec-buffer-search)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emulation/viper-cmd.el,
Michael Kifer <=