diff options
Diffstat (limited to 'lisp/emulation/viper-cmd.el')
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 77f1b291043..dd7648c2b77 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -694,7 +694,7 @@ | |||
| 694 | ARG is used as the prefix value for the executed command. If | 694 | ARG is used as the prefix value for the executed command. If |
| 695 | EVENTS is a list of events, which become the beginning of the command." | 695 | EVENTS is a list of events, which become the beginning of the command." |
| 696 | (interactive "P") | 696 | (interactive "P") |
| 697 | (if (viper= (viper-last-command-char) ?\\) | 697 | (if (viper= last-command-event ?\\) |
| 698 | (message "Switched to EMACS state for the next command...")) | 698 | (message "Switched to EMACS state for the next command...")) |
| 699 | (viper-escape-to-state arg events 'emacs-state)) | 699 | (viper-escape-to-state arg events 'emacs-state)) |
| 700 | 700 | ||
| @@ -1149,7 +1149,7 @@ as a Meta key and any number of multiple escapes are allowed." | |||
| 1149 | "Begin numeric argument for the next command." | 1149 | "Begin numeric argument for the next command." |
| 1150 | (interactive "P") | 1150 | (interactive "P") |
| 1151 | (viper-prefix-arg-value | 1151 | (viper-prefix-arg-value |
| 1152 | (viper-last-command-char) (if (consp arg) (cdr arg) nil))) | 1152 | last-command-event (if (consp arg) (cdr arg) nil))) |
| 1153 | 1153 | ||
| 1154 | (defun viper-command-argument (arg) | 1154 | (defun viper-command-argument (arg) |
| 1155 | "Accept a motion command as an argument." | 1155 | "Accept a motion command as an argument." |
| @@ -1157,7 +1157,7 @@ as a Meta key and any number of multiple escapes are allowed." | |||
| 1157 | (let ((viper-intermediate-command 'viper-command-argument)) | 1157 | (let ((viper-intermediate-command 'viper-command-argument)) |
| 1158 | (condition-case nil | 1158 | (condition-case nil |
| 1159 | (viper-prefix-arg-com | 1159 | (viper-prefix-arg-com |
| 1160 | (viper-last-command-char) | 1160 | last-command-event |
| 1161 | (cond ((null arg) nil) | 1161 | (cond ((null arg) nil) |
| 1162 | ((consp arg) (car arg)) | 1162 | ((consp arg) (car arg)) |
| 1163 | ((integerp arg) arg) | 1163 | ((integerp arg) arg) |
| @@ -1564,7 +1564,7 @@ invokes the command before that, etc." | |||
| 1564 | 1564 | ||
| 1565 | ;; Hook used in viper-undo | 1565 | ;; Hook used in viper-undo |
| 1566 | (defun viper-after-change-undo-hook (beg end _len) | 1566 | (defun viper-after-change-undo-hook (beg end _len) |
| 1567 | (if (and (boundp 'undo-in-progress) undo-in-progress) | 1567 | (if undo-in-progress |
| 1568 | (setq undo-beg-posn beg | 1568 | (setq undo-beg-posn beg |
| 1569 | undo-end-posn (or end beg)) | 1569 | undo-end-posn (or end beg)) |
| 1570 | ;; some other hooks may be changing various text properties in | 1570 | ;; some other hooks may be changing various text properties in |
| @@ -1598,9 +1598,9 @@ invokes the command before that, etc." | |||
| 1598 | (pos-visible-in-window-p before-undo-pt)) | 1598 | (pos-visible-in-window-p before-undo-pt)) |
| 1599 | (progn | 1599 | (progn |
| 1600 | (push-mark (point-marker) t) | 1600 | (push-mark (point-marker) t) |
| 1601 | (viper-sit-for-short 300) | 1601 | (sit-for 0.3) |
| 1602 | (goto-char undo-end-posn) | 1602 | (goto-char undo-end-posn) |
| 1603 | (viper-sit-for-short 300) | 1603 | (sit-for 0.3) |
| 1604 | (if (pos-visible-in-window-p undo-beg-posn) | 1604 | (if (pos-visible-in-window-p undo-beg-posn) |
| 1605 | (goto-char before-undo-pt) | 1605 | (goto-char before-undo-pt) |
| 1606 | (goto-char undo-beg-posn))) | 1606 | (goto-char undo-beg-posn))) |
| @@ -1886,15 +1886,11 @@ Undo previous insertion and inserts new." | |||
| 1886 | (or unread-command-events | 1886 | (or unread-command-events |
| 1887 | executing-kbd-macro | 1887 | executing-kbd-macro |
| 1888 | (sit-for 840)) | 1888 | (sit-for 840)) |
| 1889 | (if (fboundp 'minibuffer-prompt-end) | 1889 | (delete-region (minibuffer-prompt-end) (point-max)) |
| 1890 | (delete-region (minibuffer-prompt-end) (point-max)) | ||
| 1891 | (erase-buffer)) | ||
| 1892 | (insert viper-initial))) | 1890 | (insert viper-initial))) |
| 1893 | 1891 | ||
| 1894 | (defsubst viper-minibuffer-real-start () | 1892 | (defsubst viper-minibuffer-real-start () |
| 1895 | (if (fboundp 'minibuffer-prompt-end) | 1893 | (minibuffer-prompt-end)) |
| 1896 | (minibuffer-prompt-end) | ||
| 1897 | (point-min))) | ||
| 1898 | 1894 | ||
| 1899 | (defun viper-minibuffer-post-command-hook() | 1895 | (defun viper-minibuffer-post-command-hook() |
| 1900 | (when (active-minibuffer-window) | 1896 | (when (active-minibuffer-window) |
| @@ -1908,7 +1904,7 @@ Undo previous insertion and inserts new." | |||
| 1908 | "Exit minibuffer Viper way." | 1904 | "Exit minibuffer Viper way." |
| 1909 | (interactive) | 1905 | (interactive) |
| 1910 | (let (command) | 1906 | (let (command) |
| 1911 | (setq command (local-key-binding (char-to-string (viper-last-command-char)))) | 1907 | (setq command (local-key-binding (char-to-string last-command-event))) |
| 1912 | (run-hooks 'viper-minibuffer-exit-hook) | 1908 | (run-hooks 'viper-minibuffer-exit-hook) |
| 1913 | (if command | 1909 | (if command |
| 1914 | (command-execute command) | 1910 | (command-execute command) |
| @@ -2883,7 +2879,7 @@ If point is on a widget or a button, simulate clicking on that widget/button." | |||
| 2883 | (and (consp widget) | 2879 | (and (consp widget) |
| 2884 | (get (widget-type widget) 'widget-type)))) | 2880 | (get (widget-type widget) 'widget-type)))) |
| 2885 | (widget-button-press (point)) | 2881 | (widget-button-press (point)) |
| 2886 | (if (and (fboundp 'button-at) (fboundp 'push-button) (button-at (point))) | 2882 | (if (button-at (point)) |
| 2887 | (push-button) | 2883 | (push-button) |
| 2888 | ;; not a widget or a button | 2884 | ;; not a widget or a button |
| 2889 | (save-excursion | 2885 | (save-excursion |
| @@ -4738,8 +4734,7 @@ Please, specify your level now: ")) | |||
| 4738 | (viper-color-display-p (if (viper-window-display-p) | 4734 | (viper-color-display-p (if (viper-window-display-p) |
| 4739 | (viper-color-display-p) | 4735 | (viper-color-display-p) |
| 4740 | 'non-x)) | 4736 | 'non-x)) |
| 4741 | (viper-frame-parameters (if (fboundp 'frame-parameters) | 4737 | (viper-frame-parameters (frame-parameters (selected-frame))) |
| 4742 | (frame-parameters (selected-frame)))) | ||
| 4743 | (viper-minibuffer-emacs-face (if (viper-has-face-support-p) | 4738 | (viper-minibuffer-emacs-face (if (viper-has-face-support-p) |
| 4744 | (facep | 4739 | (facep |
| 4745 | viper-minibuffer-emacs-face) | 4740 | viper-minibuffer-emacs-face) |