/[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.38 by rms, Mon Jun 10 08:50:02 2002 UTC revision 1.38.2.1 by miles, Fri Apr 4 06:20:18 2003 UTC
# Line 863  Vi's prefix argument will be used.  Othe Line 863  Vi's prefix argument will be used.  Othe
863          ) ; let          ) ; let
864      (error nil)      (error nil)
865      ) ; condition-case      ) ; condition-case
866          
867    (viper-set-input-method nil)    (viper-set-input-method nil)
868    (viper-set-iso-accents-mode nil)    (viper-set-iso-accents-mode nil)
869    (viper-set-mode-vars-for viper-current-state)    (viper-set-mode-vars-for viper-current-state)
# Line 1208  as a Meta key and any number of multiple Line 1208  as a Meta key and any number of multiple
1208    
1209    (if (atom com)    (if (atom com)
1210        ;; `com' is a single char, so we construct the command argument        ;; `com' is a single char, so we construct the command argument
1211        ;; and if `char' is `?', we describe the arg; otherwise        ;; and if `char' is `?', we describe the arg; otherwise
1212        ;; we prepare the command that will be executed at the end.        ;; we prepare the command that will be executed at the end.
1213        (progn        (progn
1214          (setq cmd-info (cons value com))          (setq cmd-info (cons value com))
# Line 1216  as a Meta key and any number of multiple Line 1216  as a Meta key and any number of multiple
1216            (viper-describe-arg cmd-info)            (viper-describe-arg cmd-info)
1217            (setq char (read-char)))            (setq char (read-char)))
1218          ;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we          ;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
1219          ;; execute it at the very end          ;; execute it at the very end
1220          (or (viper-movement-command-p char)          (or (viper-movement-command-p char)
1221              (viper-digit-command-p char)              (viper-digit-command-p char)
1222              (viper-regsuffix-command-p char)              (viper-regsuffix-command-p char)
1223              (viper= char ?!) ; bang command              (viper= char ?!) ; bang command
1224              (error ""))              (error ""))
1225          (setq cmd-to-exec-at-end          (setq cmd-to-exec-at-end
1226                (viper-exec-form-in-vi                (viper-exec-form-in-vi
1227                 `(key-binding (char-to-string ,char)))))                 `(key-binding (char-to-string ,char)))))
1228        
1229      ;; as com is non-nil, this means that we have a command to execute      ;; as com is non-nil, this means that we have a command to execute
1230      (if (viper-memq-char (car com) '(?r ?R))      (if (viper-memq-char (car com) '(?r ?R))
1231          ;; execute apropriate region command.          ;; execute apropriate region command.
# Line 1239  as a Meta key and any number of multiple Line 1239  as a Meta key and any number of multiple
1239        ;; otherwise, reset prefix arg and call appropriate command        ;; otherwise, reset prefix arg and call appropriate command
1240        (setq value (if (null value) 1 value))        (setq value (if (null value) 1 value))
1241        (setq prefix-arg nil)        (setq prefix-arg nil)
1242        (cond        (cond
1243         ;; If we change ?C to ?c here, then cc will enter replacement mode         ;; If we change ?C to ?c here, then cc will enter replacement mode
1244         ;; rather than deleting lines.  However, it will affect 1 less line than         ;; rather than deleting lines.  However, it will affect 1 less line than
1245         ;; normal.  We decided to not use replacement mode here and follow Vi,         ;; normal.  We decided to not use replacement mode here and follow Vi,
# Line 1253  as a Meta key and any number of multiple Line 1253  as a Meta key and any number of multiple
1253         ((equal com '(?! . ?!)) (viper-line (cons value ?!)))         ((equal com '(?! . ?!)) (viper-line (cons value ?!)))
1254         ((equal com '(?= . ?=)) (viper-line (cons value ?=)))         ((equal com '(?= . ?=)) (viper-line (cons value ?=)))
1255         (t (error "")))))         (t (error "")))))
1256      
1257    (if cmd-to-exec-at-end    (if cmd-to-exec-at-end
1258        (progn        (progn
1259          (setq last-command-char char)          (setq last-command-char char)
1260          (setq last-command-event          (setq last-command-event
1261                (viper-copy-event                (viper-copy-event
1262                 (if viper-xemacs-p (character-to-event char) char)))                 (if viper-xemacs-p (character-to-event char) char)))
1263          (condition-case nil          (condition-case nil
# Line 1987  Undo previous insertion and inserts new. Line 1987  Undo previous insertion and inserts new.
1987    
1988  ;; Thie is a temp hook that uses free variables init-message and initial.  ;; Thie is a temp hook that uses free variables init-message and initial.
1989  ;; A dirty feature, but it is the simplest way to have it do the right thing.  ;; A dirty feature, but it is the simplest way to have it do the right thing.
1990  ;; The INIT-MESSAGE and INITIAL vars come from the scope set by  ;; The INIT-MESSAGE and INITIAL vars come from the scope set by
1991  ;; viper-read-string-with-history  ;; viper-read-string-with-history
1992  (defun viper-minibuffer-standard-hook ()  (defun viper-minibuffer-standard-hook ()
1993    (if (stringp init-message)    (if (stringp init-message)
# Line 2594  These keys are ESC, RET, and LineFeed" Line 2594  These keys are ESC, RET, and LineFeed"
2594      (setq char (if com viper-d-char (viper-char-at-pos 'backward)))      (setq char (if com viper-d-char (viper-char-at-pos 'backward)))
2595    
2596      (if com (insert char))      (if com (insert char))
2597        
2598      (setq viper-d-char char)      (setq viper-d-char char)
2599        
2600      (viper-loop (1- (if (> arg 0) arg (- arg)))      (viper-loop (1- (if (> arg 0) arg (- arg)))
2601                  (delete-char 1 t)                  (delete-char 1 t)
2602                  (insert char))                  (insert char))
2603        
2604      (viper-adjust-undo)      (viper-adjust-undo)
2605      (backward-char arg)      (backward-char arg)
2606      ))      ))
# Line 4604  One can use `` and '' to temporarily jum Line 4604  One can use `` and '' to temporarily jum
4604    
4605  ;; Get viper standard value of SYMBOL.  If symbol is customized, get its  ;; Get viper standard value of SYMBOL.  If symbol is customized, get its
4606  ;; standard value.  Otherwise, get the value saved in the alist STORAGE.  If  ;; standard value.  Otherwise, get the value saved in the alist STORAGE.  If
4607  ;; STORAGE is nil, use viper-saved-user-settings.  ;; STORAGE is nil, use viper-saved-user-settings.
4608  (defun viper-standard-value (symbol &optional storage)  (defun viper-standard-value (symbol &optional storage)
4609    (or (eval (car (get symbol 'customized-value)))    (or (eval (car (get symbol 'customized-value)))
4610        (eval (car (get symbol 'saved-value)))        (eval (car (get symbol 'saved-value)))
# Line 4945  Mail anyway (y or n)? ") Line 4945  Mail anyway (y or n)? ")
4945            ))            ))
4946    
4947    
4948      
4949    
4950  ;;; viper-cmd.el ends here  ;;; viper-cmd.el ends here

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.38.2.1

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