Mercurial > emacs
comparison lisp/emulation/viper-cmd.el @ 85972:51aa47312c4b
* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
(ediff-has-face-support-p, ediff-BAD-INFO, ediff-check-version)
(ediff-current-diff-A, ediff-current-diff-B)
(ediff-current-diff-C, ediff-fine-diff-C, ediff-fine-diff-A)
(ediff-fine-diff-B, ediff-fine-diff-Ancestor, ediff-even-diff-A)
(ediff-even-diff-B, ediff-even-diff-C, ediff-even-diff-Ancestor)
(ediff-odd-diff-A, ediff-odd-diff-B, ediff-odd-diff-C)
(ediff-odd-diff-Ancestor, ediff-reset-mouse):
* ediff-wind.el (ediff-narrow-control-frame-leftward-shift)
(ediff-setup-windows-plain-merge)
(ediff-setup-windows-plain-compare, ediff-setup-control-frame)
(ediff-refresh-control-frame, ediff-get-visible-buffer-window):
* ediff-util.el (ediff-setup-keymap, )
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-really-quit)
(ediff-good-frame-under-mouse)
(ediff-highlight-diff-in-one-buffer)
(ediff-remove-flags-from-buffer, ediff-place-flags-in-buffer1)
(ediff-make-bullet-proof-overlay):
* ediff-mult.el (ediff-setup-meta-map, ediff-emacs-p)
(ediff-set-meta-overlay):
* ediff-help.el (ediff-help-region-map, ediff-set-help-overlays):
* ediff.el (ediff-documentation): Replace ediff-xemacs-p and
ediff-emacs-p with their former definitions.
* emulation/viper-init.el (viper-xemacs-p, viper-emacs-p): Remove.
(viper-has-face-support-p, viper-inactivate-input-method)
(viper-activate-input-method)
(viper-use-replace-region-delimiters, viper-restore-cursor-type):
* emulation/viper-mous.el (viper-multiclick-timeout)
(viper-surrounding-word, viper-mouse-click-insert-word)
(viper-mouse-click-search-word, viper-parse-mouse-key):
* emulation/viper-macs.el (viper-char-array-to-macro):
* emulation/viper.el (viper-go-away, viper-set-hooks)
(viper-non-hook-settings):
* emulation/viper-util.el (viper-get-saved-cursor-color-in-replace-mode)
(viper-get-saved-cursor-color-in-insert-mode)
(viper-get-saved-cursor-color-in-emacs-mode)
(viper-check-version, viper-get-visible-buffer-window)
(viper-file-checked-in-p, viper-set-replace-overlay)
(viper-set-replace-overlay-glyphs, viper-set-minibuffer-overlay)
(viper-check-minibuffer-overlay, viper-read-key-sequence)
(viper-key-to-emacs-key): Replace viper-xemacs-p and viper-emacs-p
with their former definitions.
(viper-eventify-list-xemacs): Only do work for XEmacs.
(viper-set-unread-command-events): Only do work for Emacs.
(viper-overlay-p, viper-make-overlay, viper-overlay-live-p)
(viper-move-overlay, viper-overlay-start, viper-overlay-end)
(viper-overlay-get, viper-overlay-put, viper-read-event)
(viper-characterp, viper-int-to-char, viper-get-face)
(viper-color-defined-p, viper-iconify): New defaliases replacing
the old fsets.
* progmodes/fortran.el (comment-region-function)
(uncomment-region-function): Pacify byte compiler.
* vc.el (vc-diff-internal): Remove code for an old version of
gnus.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 09 Nov 2007 05:20:57 +0000 |
parents | d505125b0b46 |
children | fc93e9674475 880960b70474 |
comparison
equal
deleted
inserted
replaced
85971:2e692f327278 | 85972:51aa47312c4b |
---|---|
832 (let (viper-vi-kbd-minor-mode | 832 (let (viper-vi-kbd-minor-mode |
833 viper-insert-kbd-minor-mode | 833 viper-insert-kbd-minor-mode |
834 viper-emacs-kbd-minor-mode | 834 viper-emacs-kbd-minor-mode |
835 ch) | 835 ch) |
836 (cond ((and viper-special-input-method | 836 (cond ((and viper-special-input-method |
837 viper-emacs-p | 837 (featurep 'emacs) |
838 (fboundp 'quail-input-method)) | 838 (fboundp 'quail-input-method)) |
839 ;; (let ...) is used to restore unread-command-events to the | 839 ;; (let ...) is used to restore unread-command-events to the |
840 ;; original state. We don't want anything left in there after | 840 ;; original state. We don't want anything left in there after |
841 ;; key translation. (Such left-overs are possible if the user | 841 ;; key translation. (Such left-overs are possible if the user |
842 ;; types a regular key.) | 842 ;; types a regular key.) |
859 (setq ch (or ch | 859 (setq ch (or ch |
860 (aref quail-current-str | 860 (aref quail-current-str |
861 (1- (length quail-current-str))))) | 861 (1- (length quail-current-str))))) |
862 )) | 862 )) |
863 ((and viper-special-input-method | 863 ((and viper-special-input-method |
864 viper-xemacs-p | 864 (featurep 'xemacs) |
865 (fboundp 'quail-start-translation)) | 865 (fboundp 'quail-start-translation)) |
866 ;; same as above but for XEmacs, which doesn't have | 866 ;; same as above but for XEmacs, which doesn't have |
867 ;; quail-input-method | 867 ;; quail-input-method |
868 (let (unread-command-events) | 868 (let (unread-command-events) |
869 (setq ch (read-char-exclusive)) | 869 (setq ch (read-char-exclusive)) |
891 (setq ch (aref (read-key-sequence nil) 0))) | 891 (setq ch (aref (read-key-sequence nil) 0))) |
892 (insert ch)) | 892 (insert ch)) |
893 (t | 893 (t |
894 ;;(setq ch (read-char-exclusive)) | 894 ;;(setq ch (read-char-exclusive)) |
895 (setq ch (aref (read-key-sequence nil) 0)) | 895 (setq ch (aref (read-key-sequence nil) 0)) |
896 (if viper-xemacs-p | 896 (if (featurep 'xemacs) |
897 (setq ch (event-to-character ch))) | 897 (setq ch (event-to-character ch))) |
898 ;; replace ^M with the newline | 898 ;; replace ^M with the newline |
899 (if (eq ch ?\C-m) (setq ch ?\n)) | 899 (if (eq ch ?\C-m) (setq ch ?\n)) |
900 ;; Make sure ^V and ^Q work as quotation chars | 900 ;; Make sure ^V and ^Q work as quotation chars |
901 (if (memq ch '(?\C-v ?\C-q)) | 901 (if (memq ch '(?\C-v ?\C-q)) |
902 (progn | 902 (progn |
903 ;;(setq ch (read-char-exclusive)) | 903 ;;(setq ch (read-char-exclusive)) |
904 (setq ch (aref (read-key-sequence nil) 0)) | 904 (setq ch (aref (read-key-sequence nil) 0)) |
905 (if viper-xemacs-p | 905 (if (featurep 'xemacs) |
906 (setq ch (event-to-character ch)))) | 906 (setq ch (event-to-character ch)))) |
907 ) | 907 ) |
908 (insert ch)) | 908 (insert ch)) |
909 ) | 909 ) |
910 (setq last-command-event | 910 (setq last-command-event |
911 (viper-copy-event (if viper-xemacs-p | 911 (viper-copy-event (if (featurep 'xemacs) |
912 (character-to-event ch) ch))) | 912 (character-to-event ch) ch))) |
913 ) ; let | 913 ) ; let |
914 (error nil) | 914 (error nil) |
915 ) ; condition-case | 915 ) ; condition-case |
916 | 916 |
1078 (not viper-translate-all-ESC-keysequences)) | 1078 (not viper-translate-all-ESC-keysequences)) |
1079 ;; put keys following ESC on the unread list | 1079 ;; put keys following ESC on the unread list |
1080 ;; and return ESC as the key-sequence | 1080 ;; and return ESC as the key-sequence |
1081 (viper-set-unread-command-events (viper-subseq keyseq 1)) | 1081 (viper-set-unread-command-events (viper-subseq keyseq 1)) |
1082 (setq last-input-event event | 1082 (setq last-input-event event |
1083 keyseq (if viper-emacs-p | 1083 keyseq (if (featurep 'emacs) |
1084 "\e" | 1084 "\e" |
1085 (vector (character-to-event ?\e))))) | 1085 (vector (character-to-event ?\e))))) |
1086 ((and viper-xemacs-p | 1086 ((and (featurep 'xemacs) |
1087 (key-press-event-p first-key) | 1087 (key-press-event-p first-key) |
1088 (equal '(meta) key-mod)) | 1088 (equal '(meta) key-mod)) |
1089 (viper-set-unread-command-events | 1089 (viper-set-unread-command-events |
1090 (vconcat (vector | 1090 (vconcat (vector |
1091 (character-to-event (event-key first-key))) | 1091 (character-to-event (event-key first-key))) |
1318 (if cmd-to-exec-at-end | 1318 (if cmd-to-exec-at-end |
1319 (progn | 1319 (progn |
1320 (setq last-command-char char) | 1320 (setq last-command-char char) |
1321 (setq last-command-event | 1321 (setq last-command-event |
1322 (viper-copy-event | 1322 (viper-copy-event |
1323 (if viper-xemacs-p (character-to-event char) char))) | 1323 (if (featurep 'xemacs) (character-to-event char) char))) |
1324 (condition-case err | 1324 (condition-case err |
1325 (funcall cmd-to-exec-at-end cmd-info) | 1325 (funcall cmd-to-exec-at-end cmd-info) |
1326 (error | 1326 (error |
1327 (error "%s" (error-message-string err)))))) | 1327 (error "%s" (error-message-string err)))))) |
1328 )) | 1328 )) |
2789 (- (viper-chars-in-region pt (point)))))) | 2789 (- (viper-chars-in-region pt (point)))))) |
2790 | 2790 |
2791 (defun viper-next-line-carefully (arg) | 2791 (defun viper-next-line-carefully (arg) |
2792 (condition-case nil | 2792 (condition-case nil |
2793 ;; do not use forward-line! need to keep column | 2793 ;; do not use forward-line! need to keep column |
2794 (next-line arg) | 2794 (with-no-warnings (next-line arg)) |
2795 (error nil))) | 2795 (error nil))) |
2796 | 2796 |
2797 | 2797 |
2798 | 2798 |
2799 ;;; Word command | 2799 ;;; Word command |
3089 (viper-leave-region-active) | 3089 (viper-leave-region-active) |
3090 (let ((val (viper-p-val arg)) | 3090 (let ((val (viper-p-val arg)) |
3091 (com (viper-getCom arg))) | 3091 (com (viper-getCom arg))) |
3092 (if com (viper-move-marker-locally 'viper-com-point (point))) | 3092 (if com (viper-move-marker-locally 'viper-com-point (point))) |
3093 ;; do not use forward-line! need to keep column | 3093 ;; do not use forward-line! need to keep column |
3094 (next-line val) | 3094 (with-no-warnings (next-line val)) |
3095 (if viper-ex-style-motion | 3095 (if viper-ex-style-motion |
3096 (if (and (eolp) (not (bolp))) (backward-char 1))) | 3096 (if (and (eolp) (not (bolp))) (backward-char 1))) |
3097 (setq this-command 'next-line) | 3097 (setq this-command 'next-line) |
3098 (if com (viper-execute-com 'viper-next-line val com)))) | 3098 (if com (viper-execute-com 'viper-next-line val com)))) |
3099 | 3099 |
3133 (viper-leave-region-active) | 3133 (viper-leave-region-active) |
3134 (let ((val (viper-p-val arg)) | 3134 (let ((val (viper-p-val arg)) |
3135 (com (viper-getCom arg))) | 3135 (com (viper-getCom arg))) |
3136 (if com (viper-move-marker-locally 'viper-com-point (point))) | 3136 (if com (viper-move-marker-locally 'viper-com-point (point))) |
3137 ;; do not use forward-line! need to keep column | 3137 ;; do not use forward-line! need to keep column |
3138 (previous-line val) | 3138 (with-no-warnings (previous-line val)) |
3139 (if viper-ex-style-motion | 3139 (if viper-ex-style-motion |
3140 (if (and (eolp) (not (bolp))) (backward-char 1))) | 3140 (if (and (eolp) (not (bolp))) (backward-char 1))) |
3141 (setq this-command 'previous-line) | 3141 (setq this-command 'previous-line) |
3142 (if com (viper-execute-com 'viper-previous-line val com)))) | 3142 (if com (viper-execute-com 'viper-previous-line val com)))) |
3143 | 3143 |