/[emacs]/emacs/lisp/emulation/viper-cmd.el
ViewVC logotype

Diff of /emacs/lisp/emulation/viper-cmd.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by kifer, Sat Oct 13 21:38:19 2001 UTC revision 1.34 by kifer, Mon Dec 24 05:50:31 2001 UTC
# Line 298  Line 298 
298    ;; desirable that viper-pre-command-sentinel is the last hook and    ;; desirable that viper-pre-command-sentinel is the last hook and
299    ;; viper-post-command-sentinel is the first hook.    ;; viper-post-command-sentinel is the first hook.
300    
301    (make-local-hook 'viper-after-change-functions)    (if viper-xemacs-p
302    (make-local-hook 'viper-before-change-functions)        (progn
303    (make-local-hook 'viper-post-command-hooks)          (make-local-hook 'viper-after-change-functions)
304    (make-local-hook 'viper-pre-command-hooks)          (make-local-hook 'viper-before-change-functions)
305            (make-local-hook 'viper-post-command-hooks)
306            (make-local-hook 'viper-pre-command-hooks)))
307    
308    (remove-hook 'post-command-hook 'viper-post-command-sentinel)    (remove-hook 'post-command-hook 'viper-post-command-sentinel)
309    (add-hook 'post-command-hook 'viper-post-command-sentinel)    (add-hook 'post-command-hook 'viper-post-command-sentinel)
# Line 786  Vi's prefix argument will be used.  Othe Line 788  Vi's prefix argument will be used.  Othe
788                 ;; key translation. (Such left-overs are possible if the user                 ;; key translation. (Such left-overs are possible if the user
789                 ;; types a regular key.)                 ;; types a regular key.)
790                 (let (unread-command-events)                 (let (unread-command-events)
791                   ;; The next 2 cmds are intended to prevent the input method                   ;; The next cmd  and viper-set-unread-command-events
792                     ;; are intended to prevent the input method
793                   ;; from swallowing ^M, ^Q and other special characters                   ;; from swallowing ^M, ^Q and other special characters
794                   (setq ch (read-char))                   (setq ch (read-char))
795                     ;; replace ^M with the newline
796                     (if (eq ch ?\C-m) (setq ch ?\n))
797                     ;; Make sure ^V and ^Q work as quotation chars
798                     (if (memq ch '(?\C-v ?\C-q))
799                         (setq ch (read-char)))
800                   (viper-set-unread-command-events ch)                   (viper-set-unread-command-events ch)
801                   (quail-input-method nil)                   (quail-input-method nil)
802    
# Line 806  Vi's prefix argument will be used.  Othe Line 814  Vi's prefix argument will be used.  Othe
814                 ;; quail-input-method                 ;; quail-input-method
815                 (let (unread-command-events)                 (let (unread-command-events)
816                   (setq ch (read-char))                   (setq ch (read-char))
817                     ;; replace ^M with the newline
818                     (if (eq ch ?\C-m) (setq ch ?\n))
819                     ;; Make sure ^V and ^Q work as quotation chars
820                     (if (memq ch '(?\C-v ?\C-q))
821                         (setq ch (read-char)))
822                   (viper-set-unread-command-events ch)                   (viper-set-unread-command-events ch)
823                   (quail-start-translation nil)                   (quail-start-translation nil)
824    
# Line 818  Vi's prefix argument will be used.  Othe Line 831  Vi's prefix argument will be used.  Othe
831                   ))                   ))
832                ((and (boundp 'iso-accents-mode) iso-accents-mode)                ((and (boundp 'iso-accents-mode) iso-accents-mode)
833                 (setq ch (aref (read-key-sequence nil) 0))                 (setq ch (aref (read-key-sequence nil) 0))
834                   ;; replace ^M with the newline
835                   (if (eq ch ?\C-m) (setq ch ?\n))
836                   ;; Make sure ^V and ^Q work as quotation chars
837                   (if (memq ch '(?\C-v ?\C-q))
838                       (setq ch (aref (read-key-sequence nil) 0)))
839                 (insert ch))                 (insert ch))
840                (t                (t
841                 (setq ch (read-char))                 (setq ch (read-char))
842                   ;; replace ^M with the newline
843                   (if (eq ch ?\C-m) (setq ch ?\n))
844                   ;; Make sure ^V and ^Q work as quotation chars
845                   (if (memq ch '(?\C-v ?\C-q))
846                       (setq ch (read-char)))
847                 (insert ch))                 (insert ch))
848                )                )
849          (setq last-command-event          (setq last-command-event
# Line 2554  These keys are ESC, RET, and LineFeed" Line 2577  These keys are ESC, RET, and LineFeed"
2577      (or (eq viper-intermediate-command 'viper-repeat)      (or (eq viper-intermediate-command 'viper-repeat)
2578          (viper-special-read-and-insert-char))          (viper-special-read-and-insert-char))
2579    
     ;; Is this needed?  
     (if (eq char ?\C-m) (setq char ?\n))  
       
2580      (delete-char 1 t)      (delete-char 1 t)
       
2581      (setq char (if com viper-d-char (viper-char-at-pos 'backward)))      (setq char (if com viper-d-char (viper-char-at-pos 'backward)))
2582    
2583      (if com (insert char))      (if com (insert char))
2584            
2585      (setq viper-d-char char)      (setq viper-d-char char)
# Line 3836  Null string will repeat previous search. Line 3856  Null string will repeat previous search.
3856    (define-key viper-vi-basic-map    (define-key viper-vi-basic-map
3857      (cond ((viper-characterp viper-buffer-search-char)      (cond ((viper-characterp viper-buffer-search-char)
3858             (char-to-string viper-buffer-search-char))             (char-to-string viper-buffer-search-char))
3859            (t (error "viper-buffer-search-char: wrong value type, %s"            (t (error "viper-buffer-search-char: wrong value type, %S"
3860                      viper-buffer-search-char)))                      viper-buffer-search-char)))
3861      'viper-command-argument)      'viper-command-argument)
3862    (aset viper-exec-array viper-buffer-search-char 'viper-exec-buffer-search)    (aset viper-exec-array viper-buffer-search-char 'viper-exec-buffer-search)

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26