diff options
| author | Michael Kifer | 2005-07-10 18:46:24 +0000 |
|---|---|---|
| committer | Michael Kifer | 2005-07-10 18:46:24 +0000 |
| commit | 8ea74b0e4570fe6e3ee583b0655bf6137d82dc28 (patch) | |
| tree | d1d6a6c3acdc71b8843ee590b05c4e4150567803 | |
| parent | 9a4183e9ea0b4b2d09629652ce3d2d02bff1e647 (diff) | |
| download | emacs-8ea74b0e4570fe6e3ee583b0655bf6137d82dc28.tar.gz emacs-8ea74b0e4570fe6e3ee583b0655bf6137d82dc28.zip | |
* viper-cmd.el (viper--key-maps): new variable.
(viper-normalize-minor-mode-map-alist): use viper--key-maps and
emulation-mode-map-alists.
(viper-envelop-ESC-key): use viper-subseq.
(viper-search-forward/backward/next): disable debug-on-error.
* viper-keym.el (viper-toggle-key,viper-quoted-insert-key,
viper-ESC-key): new defcustoms.
* viper-macs.el (ex-map-read-args): use viper-subseq.
* viper-util.el (viper-key-to-emacs-key): use viper-subseq.
(viper-subseq): copy of subseq from cl.el.
* viper.el (viper-go-away,viper-set-hooks): use
emulation-mode-map-alists, advise self-insert-command, add-minor-mode.
* viper-mous.el (viper-current-frame-saved): use defvar.
* viper-init.el: got rid of -face in face names.
* ediff-diff.el (ediff-extract-diffs,ediff-extract-diffs3):
Make it work with longlines mode
* ediff-mult.el (ediff-meta-mode-hook): new variable.
* ediff-ptch.el (ediff-file-name-sans-prefix): quote regexp.
* ediff-init: got rid of -face in face names.
| -rw-r--r-- | lisp/ChangeLog | 32 | ||||
| -rw-r--r-- | lisp/ediff-diff.el | 122 | ||||
| -rw-r--r-- | lisp/ediff-init.el | 108 | ||||
| -rw-r--r-- | lisp/ediff-mult.el | 9 | ||||
| -rw-r--r-- | lisp/ediff-ptch.el | 2 | ||||
| -rw-r--r-- | lisp/ediff-util.el | 13 | ||||
| -rw-r--r-- | lisp/ediff-vers.el | 5 | ||||
| -rw-r--r-- | lisp/ediff.el | 10 | ||||
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 72 | ||||
| -rw-r--r-- | lisp/emulation/viper-init.el | 30 | ||||
| -rw-r--r-- | lisp/emulation/viper-keym.el | 97 | ||||
| -rw-r--r-- | lisp/emulation/viper-macs.el | 12 | ||||
| -rw-r--r-- | lisp/emulation/viper-mous.el | 2 | ||||
| -rw-r--r-- | lisp/emulation/viper-util.el | 30 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 35 | ||||
| -rw-r--r-- | man/viper.texi | 2 |
16 files changed, 383 insertions, 198 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06cf972aac2..57441880d78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2005-07-10 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 2 | |||
| 3 | * viper-cmd.el (viper--key-maps): new variable. | ||
| 4 | (viper-normalize-minor-mode-map-alist): use viper--key-maps and | ||
| 5 | emulation-mode-map-alists. | ||
| 6 | (viper-envelop-ESC-key): use viper-subseq. | ||
| 7 | (viper-search-forward/backward/next): disable debug-on-error. | ||
| 8 | |||
| 9 | * viper-keym.el (viper-toggle-key,viper-quoted-insert-key, | ||
| 10 | viper-ESC-key): new defcustoms. | ||
| 11 | |||
| 12 | * viper-macs.el (ex-map-read-args): use viper-subseq. | ||
| 13 | |||
| 14 | * viper-util.el (viper-key-to-emacs-key): use viper-subseq. | ||
| 15 | (viper-subseq): copy of subseq from cl.el. | ||
| 16 | |||
| 17 | * viper.el (viper-go-away,viper-set-hooks): use | ||
| 18 | emulation-mode-map-alists, advise self-insert-command, add-minor-mode. | ||
| 19 | |||
| 20 | * viper-mous.el (viper-current-frame-saved): use defvar. | ||
| 21 | |||
| 22 | * viper-init.el: got rid of -face in face names. | ||
| 23 | |||
| 24 | * ediff-diff.el (ediff-extract-diffs,ediff-extract-diffs3): | ||
| 25 | Make it work with longlines mode | ||
| 26 | |||
| 27 | * ediff-mult.el (ediff-meta-mode-hook): new variable. | ||
| 28 | |||
| 29 | * ediff-ptch.el (ediff-file-name-sans-prefix): quote regexp. | ||
| 30 | |||
| 31 | * ediff-init: got rid of -face in face names. | ||
| 32 | |||
| 1 | 2005-07-10 Richard M. Stallman <rms@gnu.org> | 33 | 2005-07-10 Richard M. Stallman <rms@gnu.org> |
| 2 | 34 | ||
| 3 | * emacs-lisp/edebug.el (edebug-enter): Call with-timeout-suspend | 35 | * emacs-lisp/edebug.el (edebug-enter): Call with-timeout-suspend |
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 659c4ffedb0..6d6b36692bc 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -459,24 +459,46 @@ one optional arguments, diff-number to refine.") | |||
| 459 | c-prev c-end) | 459 | c-prev c-end) |
| 460 | ;; else convert lines to points | 460 | ;; else convert lines to points |
| 461 | (ediff-with-current-buffer A-buffer | 461 | (ediff-with-current-buffer A-buffer |
| 462 | (forward-line (- a-begin a-prev)) | 462 | (let ((longlines-mode-val |
| 463 | (setq a-begin-pt (point)) | 463 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 464 | (forward-line (- a-end a-begin)) | 464 | ;; we must disable and then restore longlines-mode |
| 465 | (setq a-end-pt (point) | 465 | (if (eq longlines-mode-val 1) |
| 466 | a-prev a-end)) | 466 | (longlines-mode 0)) |
| 467 | (forward-line (- a-begin a-prev)) | ||
| 468 | (setq a-begin-pt (point)) | ||
| 469 | (forward-line (- a-end a-begin)) | ||
| 470 | (setq a-end-pt (point) | ||
| 471 | a-prev a-end) | ||
| 472 | (if (eq longlines-mode-val 1) | ||
| 473 | (longlines-mode longlines-mode-val)) | ||
| 474 | )) | ||
| 467 | (ediff-with-current-buffer B-buffer | 475 | (ediff-with-current-buffer B-buffer |
| 468 | (forward-line (- b-begin b-prev)) | 476 | (let ((longlines-mode-val |
| 469 | (setq b-begin-pt (point)) | 477 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 470 | (forward-line (- b-end b-begin)) | 478 | (if (eq longlines-mode-val 1) |
| 471 | (setq b-end-pt (point) | 479 | (longlines-mode 0)) |
| 472 | b-prev b-end)) | 480 | (forward-line (- b-begin b-prev)) |
| 481 | (setq b-begin-pt (point)) | ||
| 482 | (forward-line (- b-end b-begin)) | ||
| 483 | (setq b-end-pt (point) | ||
| 484 | b-prev b-end) | ||
| 485 | (if (eq longlines-mode-val 1) | ||
| 486 | (longlines-mode longlines-mode-val)) | ||
| 487 | )) | ||
| 473 | (if (ediff-buffer-live-p C-buffer) | 488 | (if (ediff-buffer-live-p C-buffer) |
| 474 | (ediff-with-current-buffer C-buffer | 489 | (ediff-with-current-buffer C-buffer |
| 475 | (forward-line (- c-begin c-prev)) | 490 | (let ((longlines-mode-val |
| 476 | (setq c-begin-pt (point)) | 491 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 477 | (forward-line (- c-end c-begin)) | 492 | (if (eq longlines-mode-val 1) |
| 478 | (setq c-end-pt (point) | 493 | (longlines-mode 0)) |
| 479 | c-prev c-end))) | 494 | (forward-line (- c-begin c-prev)) |
| 495 | (setq c-begin-pt (point)) | ||
| 496 | (forward-line (- c-end c-begin)) | ||
| 497 | (setq c-end-pt (point) | ||
| 498 | c-prev c-end) | ||
| 499 | (if (eq longlines-mode-val 1) | ||
| 500 | (longlines-mode longlines-mode-val)) | ||
| 501 | ))) | ||
| 480 | (setq diff-list | 502 | (setq diff-list |
| 481 | (nconc | 503 | (nconc |
| 482 | diff-list | 504 | diff-list |
| @@ -1060,30 +1082,59 @@ delimiter regions")) | |||
| 1060 | c-prev c-end) | 1082 | c-prev c-end) |
| 1061 | ;; else convert lines to points | 1083 | ;; else convert lines to points |
| 1062 | (ediff-with-current-buffer A-buffer | 1084 | (ediff-with-current-buffer A-buffer |
| 1063 | (forward-line (- a-begin a-prev)) | 1085 | (let ((longlines-mode-val |
| 1064 | (setq a-begin-pt (point)) | 1086 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 1065 | (forward-line (- a-end a-begin)) | 1087 | ;; we must disable and then restore longlines-mode |
| 1066 | (setq a-end-pt (point) | 1088 | (if (eq longlines-mode-val 1) |
| 1067 | a-prev a-end)) | 1089 | (longlines-mode 0)) |
| 1090 | (forward-line (- a-begin a-prev)) | ||
| 1091 | (setq a-begin-pt (point)) | ||
| 1092 | (forward-line (- a-end a-begin)) | ||
| 1093 | (setq a-end-pt (point) | ||
| 1094 | a-prev a-end) | ||
| 1095 | (if (eq longlines-mode-val 1) | ||
| 1096 | (longlines-mode longlines-mode-val)) | ||
| 1097 | )) | ||
| 1068 | (ediff-with-current-buffer B-buffer | 1098 | (ediff-with-current-buffer B-buffer |
| 1069 | (forward-line (- b-begin b-prev)) | 1099 | (let ((longlines-mode-val |
| 1070 | (setq b-begin-pt (point)) | 1100 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 1071 | (forward-line (- b-end b-begin)) | 1101 | (if (eq longlines-mode-val 1) |
| 1072 | (setq b-end-pt (point) | 1102 | (longlines-mode 0)) |
| 1073 | b-prev b-end)) | 1103 | (forward-line (- b-begin b-prev)) |
| 1104 | (setq b-begin-pt (point)) | ||
| 1105 | (forward-line (- b-end b-begin)) | ||
| 1106 | (setq b-end-pt (point) | ||
| 1107 | b-prev b-end) | ||
| 1108 | (if (eq longlines-mode-val 1) | ||
| 1109 | (longlines-mode longlines-mode-val)) | ||
| 1110 | )) | ||
| 1074 | (ediff-with-current-buffer C-buffer | 1111 | (ediff-with-current-buffer C-buffer |
| 1075 | (forward-line (- c-begin c-prev)) | 1112 | (let ((longlines-mode-val |
| 1076 | (setq c-begin-pt (point)) | 1113 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 1077 | (forward-line (- c-end c-begin)) | 1114 | (if (eq longlines-mode-val 1) |
| 1078 | (setq c-end-pt (point) | 1115 | (longlines-mode 0)) |
| 1079 | c-prev c-end)) | 1116 | (forward-line (- c-begin c-prev)) |
| 1117 | (setq c-begin-pt (point)) | ||
| 1118 | (forward-line (- c-end c-begin)) | ||
| 1119 | (setq c-end-pt (point) | ||
| 1120 | c-prev c-end) | ||
| 1121 | (if (eq longlines-mode-val 1) | ||
| 1122 | (longlines-mode longlines-mode-val)) | ||
| 1123 | )) | ||
| 1080 | (if (ediff-buffer-live-p anc-buffer) | 1124 | (if (ediff-buffer-live-p anc-buffer) |
| 1081 | (ediff-with-current-buffer anc-buffer | 1125 | (ediff-with-current-buffer anc-buffer |
| 1082 | (forward-line (- c-or-anc-begin anc-prev)) | 1126 | (let ((longlines-mode-val |
| 1083 | (setq anc-begin-pt (point)) | 1127 | (if (and (boundp 'longlines-mode) longlines-mode) 1 0))) |
| 1084 | (forward-line (- c-or-anc-end c-or-anc-begin)) | 1128 | (if (eq longlines-mode-val 1) |
| 1085 | (setq anc-end-pt (point) | 1129 | (longlines-mode 0)) |
| 1086 | anc-prev c-or-anc-end))) | 1130 | (forward-line (- c-or-anc-begin anc-prev)) |
| 1131 | (setq anc-begin-pt (point)) | ||
| 1132 | (forward-line (- c-or-anc-end c-or-anc-begin)) | ||
| 1133 | (setq anc-end-pt (point) | ||
| 1134 | anc-prev c-or-anc-end) | ||
| 1135 | (if (eq longlines-mode-val 1) | ||
| 1136 | (longlines-mode longlines-mode-val)) | ||
| 1137 | ))) | ||
| 1087 | (setq diff-list | 1138 | (setq diff-list |
| 1088 | (nconc | 1139 | (nconc |
| 1089 | diff-list | 1140 | diff-list |
| @@ -1425,6 +1476,5 @@ affects only files whose names match the expression." | |||
| 1425 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | 1476 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
| 1426 | ;;; End: | 1477 | ;;; End: |
| 1427 | 1478 | ||
| 1428 | |||
| 1429 | ;;; arch-tag: a86d448e-58d7-4572-a1d9-fdedfa22f648 | 1479 | ;;; arch-tag: a86d448e-58d7-4572-a1d9-fdedfa22f648 |
| 1430 | ;;; ediff-diff.el ends here | 1480 | ;;; ediff-diff.el ends here |
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 18e1a7128f1..8af930ec27e 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -854,10 +854,10 @@ to temp files when Ediff needs to find fine differences." | |||
| 854 | 854 | ||
| 855 | ;; A-list of current-diff-face-* symbols associated with buf types | 855 | ;; A-list of current-diff-face-* symbols associated with buf types |
| 856 | (defconst ediff-current-diff-face-alist | 856 | (defconst ediff-current-diff-face-alist |
| 857 | '((A . ediff-current-diff-face-A) | 857 | '((A . ediff-current-diff-A) |
| 858 | (B . ediff-current-diff-face-B) | 858 | (B . ediff-current-diff-B) |
| 859 | (C . ediff-current-diff-face-C) | 859 | (C . ediff-current-diff-C) |
| 860 | (Ancestor . ediff-current-diff-face-Ancestor))) | 860 | (Ancestor . ediff-current-diff-Ancestor))) |
| 861 | 861 | ||
| 862 | 862 | ||
| 863 | (defun ediff-set-overlay-face (extent face) | 863 | (defun ediff-set-overlay-face (extent face) |
| @@ -915,8 +915,6 @@ to temp files when Ediff needs to find fine differences." | |||
| 915 | (t (:inverse-video t)))) | 915 | (t (:inverse-video t)))) |
| 916 | "Face for highlighting the selected difference in buffer A." | 916 | "Face for highlighting the selected difference in buffer A." |
| 917 | :group 'ediff-highlighting) | 917 | :group 'ediff-highlighting) |
| 918 | ;; backward-compatibility alias | ||
| 919 | (put 'ediff-current-diff-face-A 'face-alias 'ediff-current-diff-A) | ||
| 920 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 918 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 921 | ;; this variable is set to nil, then again to the appropriate face. | 919 | ;; this variable is set to nil, then again to the appropriate face. |
| 922 | (defvar ediff-current-diff-face-A 'ediff-current-diff-A | 920 | (defvar ediff-current-diff-face-A 'ediff-current-diff-A |
| @@ -924,13 +922,13 @@ to temp files when Ediff needs to find fine differences." | |||
| 924 | DO NOT CHANGE this variable. Instead, use the customization | 922 | DO NOT CHANGE this variable. Instead, use the customization |
| 925 | widget to customize the actual face object `ediff-current-diff-A' | 923 | widget to customize the actual face object `ediff-current-diff-A' |
| 926 | this variable represents.") | 924 | this variable represents.") |
| 927 | (ediff-hide-face 'ediff-current-diff-A) | 925 | (ediff-hide-face ediff-current-diff-face-A) |
| 928 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | 926 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. |
| 929 | ;; This means that some user customization may be trashed. | 927 | ;; This means that some user customization may be trashed. |
| 930 | (if (and ediff-xemacs-p | 928 | (if (and ediff-xemacs-p |
| 931 | (ediff-has-face-support-p) | 929 | (ediff-has-face-support-p) |
| 932 | (not (ediff-color-display-p))) | 930 | (not (ediff-color-display-p))) |
| 933 | (copy-face 'modeline 'ediff-current-diff-A)) | 931 | (copy-face 'modeline ediff-current-diff-face-A)) |
| 934 | 932 | ||
| 935 | 933 | ||
| 936 | 934 | ||
| @@ -948,8 +946,6 @@ this variable represents.") | |||
| 948 | (t (:inverse-video t)))) | 946 | (t (:inverse-video t)))) |
| 949 | "Face for highlighting the selected difference in buffer B." | 947 | "Face for highlighting the selected difference in buffer B." |
| 950 | :group 'ediff-highlighting) | 948 | :group 'ediff-highlighting) |
| 951 | ;; backward-compatibility alias | ||
| 952 | (put 'ediff-current-diff-face-B 'face-alias 'ediff-current-diff-B) | ||
| 953 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 949 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 954 | ;; this variable is set to nil, then again to the appropriate face. | 950 | ;; this variable is set to nil, then again to the appropriate face. |
| 955 | (defvar ediff-current-diff-face-B 'ediff-current-diff-B | 951 | (defvar ediff-current-diff-face-B 'ediff-current-diff-B |
| @@ -957,13 +953,13 @@ this variable represents.") | |||
| 957 | this variable. Instead, use the customization | 953 | this variable. Instead, use the customization |
| 958 | widget to customize the actual face `ediff-current-diff-B' | 954 | widget to customize the actual face `ediff-current-diff-B' |
| 959 | this variable represents.") | 955 | this variable represents.") |
| 960 | (ediff-hide-face 'ediff-current-diff-B) | 956 | (ediff-hide-face ediff-current-diff-face-B) |
| 961 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | 957 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. |
| 962 | ;; This means that some user customization may be trashed. | 958 | ;; This means that some user customization may be trashed. |
| 963 | (if (and ediff-xemacs-p | 959 | (if (and ediff-xemacs-p |
| 964 | (ediff-has-face-support-p) | 960 | (ediff-has-face-support-p) |
| 965 | (not (ediff-color-display-p))) | 961 | (not (ediff-color-display-p))) |
| 966 | (copy-face 'modeline 'ediff-current-diff-B)) | 962 | (copy-face 'modeline ediff-current-diff-face-B)) |
| 967 | 963 | ||
| 968 | 964 | ||
| 969 | (defface ediff-current-diff-C | 965 | (defface ediff-current-diff-C |
| @@ -978,8 +974,6 @@ this variable represents.") | |||
| 978 | (t (:inverse-video t)))) | 974 | (t (:inverse-video t)))) |
| 979 | "Face for highlighting the selected difference in buffer C." | 975 | "Face for highlighting the selected difference in buffer C." |
| 980 | :group 'ediff-highlighting) | 976 | :group 'ediff-highlighting) |
| 981 | ;; backward-compatibility alias | ||
| 982 | (put 'ediff-current-diff-face-C 'face-alias 'ediff-current-diff-C) | ||
| 983 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 977 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 984 | ;; this variable is set to nil, then again to the appropriate face. | 978 | ;; this variable is set to nil, then again to the appropriate face. |
| 985 | (defvar ediff-current-diff-face-C 'ediff-current-diff-C | 979 | (defvar ediff-current-diff-face-C 'ediff-current-diff-C |
| @@ -987,13 +981,13 @@ this variable represents.") | |||
| 987 | DO NOT CHANGE this variable. Instead, use the customization | 981 | DO NOT CHANGE this variable. Instead, use the customization |
| 988 | widget to customize the actual face object `ediff-current-diff-C' | 982 | widget to customize the actual face object `ediff-current-diff-C' |
| 989 | this variable represents.") | 983 | this variable represents.") |
| 990 | (ediff-hide-face 'ediff-current-diff-C) | 984 | (ediff-hide-face ediff-current-diff-face-C) |
| 991 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | 985 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. |
| 992 | ;; This means that some user customization may be trashed. | 986 | ;; This means that some user customization may be trashed. |
| 993 | (if (and ediff-xemacs-p | 987 | (if (and ediff-xemacs-p |
| 994 | (ediff-has-face-support-p) | 988 | (ediff-has-face-support-p) |
| 995 | (not (ediff-color-display-p))) | 989 | (not (ediff-color-display-p))) |
| 996 | (copy-face 'modeline 'ediff-current-diff-C)) | 990 | (copy-face 'modeline ediff-current-diff-face-C)) |
| 997 | 991 | ||
| 998 | 992 | ||
| 999 | (defface ediff-current-diff-Ancestor | 993 | (defface ediff-current-diff-Ancestor |
| @@ -1008,8 +1002,6 @@ this variable represents.") | |||
| 1008 | (t (:inverse-video t)))) | 1002 | (t (:inverse-video t)))) |
| 1009 | "Face for highlighting the selected difference in buffer Ancestor." | 1003 | "Face for highlighting the selected difference in buffer Ancestor." |
| 1010 | :group 'ediff-highlighting) | 1004 | :group 'ediff-highlighting) |
| 1011 | ;; backward-compatibility alias | ||
| 1012 | (put 'ediff-current-diff-face-Ancestor 'face-alias 'ediff-current-diff-Ancestor) | ||
| 1013 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1005 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1014 | ;; this variable is set to nil, then again to the appropriate face. | 1006 | ;; this variable is set to nil, then again to the appropriate face. |
| 1015 | (defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-Ancestor | 1007 | (defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-Ancestor |
| @@ -1017,13 +1009,13 @@ this variable represents.") | |||
| 1017 | DO NOT CHANGE this variable. Instead, use the customization | 1009 | DO NOT CHANGE this variable. Instead, use the customization |
| 1018 | widget to customize the actual face object `ediff-current-diff-Ancestor' | 1010 | widget to customize the actual face object `ediff-current-diff-Ancestor' |
| 1019 | this variable represents.") | 1011 | this variable represents.") |
| 1020 | (ediff-hide-face 'ediff-current-diff-Ancestor) | 1012 | (ediff-hide-face ediff-current-diff-face-Ancestor) |
| 1021 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | 1013 | ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. |
| 1022 | ;; This means that some user customization may be trashed. | 1014 | ;; This means that some user customization may be trashed. |
| 1023 | (if (and ediff-xemacs-p | 1015 | (if (and ediff-xemacs-p |
| 1024 | (ediff-has-face-support-p) | 1016 | (ediff-has-face-support-p) |
| 1025 | (not (ediff-color-display-p))) | 1017 | (not (ediff-color-display-p))) |
| 1026 | (copy-face 'modeline 'ediff-current-diff-Ancestor)) | 1018 | (copy-face 'modeline ediff-current-diff-face-Ancestor)) |
| 1027 | 1019 | ||
| 1028 | 1020 | ||
| 1029 | (defface ediff-fine-diff-A | 1021 | (defface ediff-fine-diff-A |
| @@ -1038,8 +1030,6 @@ this variable represents.") | |||
| 1038 | (t (:underline t :stipple "gray3")))) | 1030 | (t (:underline t :stipple "gray3")))) |
| 1039 | "Face for highlighting the refinement of the selected diff in buffer A." | 1031 | "Face for highlighting the refinement of the selected diff in buffer A." |
| 1040 | :group 'ediff-highlighting) | 1032 | :group 'ediff-highlighting) |
| 1041 | ;; backward-compatibility alias | ||
| 1042 | (put 'ediff-fine-diff-face-A 'face-alias 'ediff-fine-diff-A) | ||
| 1043 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1033 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1044 | ;; this variable is set to nil, then again to the appropriate face. | 1034 | ;; this variable is set to nil, then again to the appropriate face. |
| 1045 | (defvar ediff-fine-diff-face-A 'ediff-fine-diff-A | 1035 | (defvar ediff-fine-diff-face-A 'ediff-fine-diff-A |
| @@ -1047,7 +1037,7 @@ this variable represents.") | |||
| 1047 | DO NOT CHANGE this variable. Instead, use the customization | 1037 | DO NOT CHANGE this variable. Instead, use the customization |
| 1048 | widget to customize the actual face object `ediff-fine-diff-A' | 1038 | widget to customize the actual face object `ediff-fine-diff-A' |
| 1049 | this variable represents.") | 1039 | this variable represents.") |
| 1050 | (ediff-hide-face 'ediff-fine-diff-A) | 1040 | (ediff-hide-face ediff-fine-diff-face-A) |
| 1051 | 1041 | ||
| 1052 | (defface ediff-fine-diff-B | 1042 | (defface ediff-fine-diff-B |
| 1053 | (if ediff-emacs-p | 1043 | (if ediff-emacs-p |
| @@ -1061,8 +1051,6 @@ this variable represents.") | |||
| 1061 | (t (:underline t :stipple "gray3")))) | 1051 | (t (:underline t :stipple "gray3")))) |
| 1062 | "Face for highlighting the refinement of the selected diff in buffer B." | 1052 | "Face for highlighting the refinement of the selected diff in buffer B." |
| 1063 | :group 'ediff-highlighting) | 1053 | :group 'ediff-highlighting) |
| 1064 | ;; backward-compatibility alias | ||
| 1065 | (put 'ediff-fine-diff-face-B 'face-alias 'ediff-fine-diff-B) | ||
| 1066 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1054 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1067 | ;; this variable is set to nil, then again to the appropriate face. | 1055 | ;; this variable is set to nil, then again to the appropriate face. |
| 1068 | (defvar ediff-fine-diff-face-B 'ediff-fine-diff-B | 1056 | (defvar ediff-fine-diff-face-B 'ediff-fine-diff-B |
| @@ -1070,7 +1058,7 @@ this variable represents.") | |||
| 1070 | DO NOT CHANGE this variable. Instead, use the customization | 1058 | DO NOT CHANGE this variable. Instead, use the customization |
| 1071 | widget to customize the actual face object `ediff-fine-diff-B' | 1059 | widget to customize the actual face object `ediff-fine-diff-B' |
| 1072 | this variable represents.") | 1060 | this variable represents.") |
| 1073 | (ediff-hide-face 'ediff-fine-diff-B) | 1061 | (ediff-hide-face ediff-fine-diff-face-B) |
| 1074 | 1062 | ||
| 1075 | (defface ediff-fine-diff-C | 1063 | (defface ediff-fine-diff-C |
| 1076 | (if ediff-emacs-p | 1064 | (if ediff-emacs-p |
| @@ -1089,8 +1077,6 @@ this variable represents.") | |||
| 1089 | (t (:underline t :stipple "gray3")))) | 1077 | (t (:underline t :stipple "gray3")))) |
| 1090 | "Face for highlighting the refinement of the selected diff in buffer C." | 1078 | "Face for highlighting the refinement of the selected diff in buffer C." |
| 1091 | :group 'ediff-highlighting) | 1079 | :group 'ediff-highlighting) |
| 1092 | ;; backward-compatibility alias | ||
| 1093 | (put 'ediff-fine-diff-face-C 'face-alias 'ediff-fine-diff-C) | ||
| 1094 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1080 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1095 | ;; this variable is set to nil, then again to the appropriate face. | 1081 | ;; this variable is set to nil, then again to the appropriate face. |
| 1096 | (defvar ediff-fine-diff-face-C 'ediff-fine-diff-C | 1082 | (defvar ediff-fine-diff-face-C 'ediff-fine-diff-C |
| @@ -1098,7 +1084,7 @@ this variable represents.") | |||
| 1098 | DO NOT CHANGE this variable. Instead, use the customization | 1084 | DO NOT CHANGE this variable. Instead, use the customization |
| 1099 | widget to customize the actual face object `ediff-fine-diff-C' | 1085 | widget to customize the actual face object `ediff-fine-diff-C' |
| 1100 | this variable represents.") | 1086 | this variable represents.") |
| 1101 | (ediff-hide-face 'ediff-fine-diff-C) | 1087 | (ediff-hide-face ediff-fine-diff-face-C) |
| 1102 | 1088 | ||
| 1103 | (defface ediff-fine-diff-Ancestor | 1089 | (defface ediff-fine-diff-Ancestor |
| 1104 | (if ediff-emacs-p | 1090 | (if ediff-emacs-p |
| @@ -1114,8 +1100,6 @@ this variable represents.") | |||
| 1114 | At present, this face is not used and no fine differences are computed for the | 1100 | At present, this face is not used and no fine differences are computed for the |
| 1115 | ancestor buffer." | 1101 | ancestor buffer." |
| 1116 | :group 'ediff-highlighting) | 1102 | :group 'ediff-highlighting) |
| 1117 | ;; backward-compatibility alias | ||
| 1118 | (put 'ediff-fine-diff-face-Ancestor 'face-alias 'ediff-fine-diff-Ancestor) | ||
| 1119 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1103 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1120 | ;; this variable is set to nil, then again to the appropriate face. | 1104 | ;; this variable is set to nil, then again to the appropriate face. |
| 1121 | (defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-Ancestor | 1105 | (defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-Ancestor |
| @@ -1123,7 +1107,7 @@ ancestor buffer." | |||
| 1123 | DO NOT CHANGE this variable. Instead, use the customization | 1107 | DO NOT CHANGE this variable. Instead, use the customization |
| 1124 | widget to customize the actual face object `ediff-fine-diff-Ancestor' | 1108 | widget to customize the actual face object `ediff-fine-diff-Ancestor' |
| 1125 | this variable represents.") | 1109 | this variable represents.") |
| 1126 | (ediff-hide-face 'ediff-fine-diff-Ancestor) | 1110 | (ediff-hide-face ediff-fine-diff-face-Ancestor) |
| 1127 | 1111 | ||
| 1128 | ;; Some installs don't have stipple or Stipple. So, try them in turn. | 1112 | ;; Some installs don't have stipple or Stipple. So, try them in turn. |
| 1129 | (defvar stipple-pixmap | 1113 | (defvar stipple-pixmap |
| @@ -1151,8 +1135,6 @@ this variable represents.") | |||
| 1151 | (t (:italic t :stipple ,stipple-pixmap)))) | 1135 | (t (:italic t :stipple ,stipple-pixmap)))) |
| 1152 | "Face for highlighting even-numbered non-current differences in buffer A." | 1136 | "Face for highlighting even-numbered non-current differences in buffer A." |
| 1153 | :group 'ediff-highlighting) | 1137 | :group 'ediff-highlighting) |
| 1154 | ;; backward-compatibility alias | ||
| 1155 | (put 'ediff-even-diff-face-A 'face-alias 'ediff-even-diff-A) | ||
| 1156 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1138 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1157 | ;; this variable is set to nil, then again to the appropriate face. | 1139 | ;; this variable is set to nil, then again to the appropriate face. |
| 1158 | (defvar ediff-even-diff-face-A 'ediff-even-diff-A | 1140 | (defvar ediff-even-diff-face-A 'ediff-even-diff-A |
| @@ -1160,7 +1142,7 @@ this variable represents.") | |||
| 1160 | DO NOT CHANGE this variable. Instead, use the customization | 1142 | DO NOT CHANGE this variable. Instead, use the customization |
| 1161 | widget to customize the actual face object `ediff-even-diff-A' | 1143 | widget to customize the actual face object `ediff-even-diff-A' |
| 1162 | this variable represents.") | 1144 | this variable represents.") |
| 1163 | (ediff-hide-face 'ediff-even-diff-A) | 1145 | (ediff-hide-face ediff-even-diff-face-A) |
| 1164 | 1146 | ||
| 1165 | (defface ediff-even-diff-B | 1147 | (defface ediff-even-diff-B |
| 1166 | (if ediff-emacs-p | 1148 | (if ediff-emacs-p |
| @@ -1174,8 +1156,6 @@ this variable represents.") | |||
| 1174 | (t (:italic t :stipple ,stipple-pixmap)))) | 1156 | (t (:italic t :stipple ,stipple-pixmap)))) |
| 1175 | "Face for highlighting even-numbered non-current differences in buffer B." | 1157 | "Face for highlighting even-numbered non-current differences in buffer B." |
| 1176 | :group 'ediff-highlighting) | 1158 | :group 'ediff-highlighting) |
| 1177 | ;; backward-compatibility alias | ||
| 1178 | (put 'ediff-even-diff-face-B 'face-alias 'ediff-even-diff-B) | ||
| 1179 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1159 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1180 | ;; this variable is set to nil, then again to the appropriate face. | 1160 | ;; this variable is set to nil, then again to the appropriate face. |
| 1181 | (defvar ediff-even-diff-face-B 'ediff-even-diff-B | 1161 | (defvar ediff-even-diff-face-B 'ediff-even-diff-B |
| @@ -1183,7 +1163,7 @@ this variable represents.") | |||
| 1183 | DO NOT CHANGE this variable. Instead, use the customization | 1163 | DO NOT CHANGE this variable. Instead, use the customization |
| 1184 | widget to customize the actual face object `ediff-even-diff-B' | 1164 | widget to customize the actual face object `ediff-even-diff-B' |
| 1185 | this variable represents.") | 1165 | this variable represents.") |
| 1186 | (ediff-hide-face 'ediff-even-diff-B) | 1166 | (ediff-hide-face ediff-even-diff-face-B) |
| 1187 | 1167 | ||
| 1188 | (defface ediff-even-diff-C | 1168 | (defface ediff-even-diff-C |
| 1189 | (if ediff-emacs-p | 1169 | (if ediff-emacs-p |
| @@ -1202,8 +1182,6 @@ this variable represents.") | |||
| 1202 | (t (:italic t :stipple ,stipple-pixmap)))) | 1182 | (t (:italic t :stipple ,stipple-pixmap)))) |
| 1203 | "Face for highlighting even-numbered non-current differences in buffer C." | 1183 | "Face for highlighting even-numbered non-current differences in buffer C." |
| 1204 | :group 'ediff-highlighting) | 1184 | :group 'ediff-highlighting) |
| 1205 | ;; backward-compatibility alias | ||
| 1206 | (put 'ediff-even-diff-face-C 'face-alias 'ediff-even-diff-C) | ||
| 1207 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1185 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1208 | ;; this variable is set to nil, then again to the appropriate face. | 1186 | ;; this variable is set to nil, then again to the appropriate face. |
| 1209 | (defvar ediff-even-diff-face-C 'ediff-even-diff-C | 1187 | (defvar ediff-even-diff-face-C 'ediff-even-diff-C |
| @@ -1211,7 +1189,7 @@ this variable represents.") | |||
| 1211 | DO NOT CHANGE this variable. Instead, use the customization | 1189 | DO NOT CHANGE this variable. Instead, use the customization |
| 1212 | widget to customize the actual face object `ediff-even-diff-C' | 1190 | widget to customize the actual face object `ediff-even-diff-C' |
| 1213 | this variable represents.") | 1191 | this variable represents.") |
| 1214 | (ediff-hide-face 'ediff-even-diff-C) | 1192 | (ediff-hide-face ediff-even-diff-face-C) |
| 1215 | 1193 | ||
| 1216 | (defface ediff-even-diff-Ancestor | 1194 | (defface ediff-even-diff-Ancestor |
| 1217 | (if ediff-emacs-p | 1195 | (if ediff-emacs-p |
| @@ -1230,8 +1208,6 @@ this variable represents.") | |||
| 1230 | (t (:italic t :stipple ,stipple-pixmap)))) | 1208 | (t (:italic t :stipple ,stipple-pixmap)))) |
| 1231 | "Face for highlighting even-numbered non-current differences in the ancestor buffer." | 1209 | "Face for highlighting even-numbered non-current differences in the ancestor buffer." |
| 1232 | :group 'ediff-highlighting) | 1210 | :group 'ediff-highlighting) |
| 1233 | ;; backward-compatibility alias | ||
| 1234 | (put 'ediff-even-diff-face-Ancestor 'face-alias 'ediff-even-diff-Ancestor) | ||
| 1235 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1211 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1236 | ;; this variable is set to nil, then again to the appropriate face. | 1212 | ;; this variable is set to nil, then again to the appropriate face. |
| 1237 | (defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-Ancestor | 1213 | (defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-Ancestor |
| @@ -1239,7 +1215,7 @@ this variable represents.") | |||
| 1239 | DO NOT CHANGE this variable. Instead, use the customization | 1215 | DO NOT CHANGE this variable. Instead, use the customization |
| 1240 | widget to customize the actual face object `ediff-even-diff-Ancestor' | 1216 | widget to customize the actual face object `ediff-even-diff-Ancestor' |
| 1241 | this variable represents.") | 1217 | this variable represents.") |
| 1242 | (ediff-hide-face 'ediff-even-diff-Ancestor) | 1218 | (ediff-hide-face ediff-even-diff-face-Ancestor) |
| 1243 | 1219 | ||
| 1244 | ;; Association between buffer types and even-diff-face symbols | 1220 | ;; Association between buffer types and even-diff-face symbols |
| 1245 | (defconst ediff-even-diff-face-alist | 1221 | (defconst ediff-even-diff-face-alist |
| @@ -1263,8 +1239,6 @@ this variable represents.") | |||
| 1263 | (t (:italic t :stipple "gray1")))) | 1239 | (t (:italic t :stipple "gray1")))) |
| 1264 | "Face for highlighting odd-numbered non-current differences in buffer A." | 1240 | "Face for highlighting odd-numbered non-current differences in buffer A." |
| 1265 | :group 'ediff-highlighting) | 1241 | :group 'ediff-highlighting) |
| 1266 | ;; backward-compatibility alias | ||
| 1267 | (put 'ediff-odd-diff-face-A 'face-alias 'ediff-odd-diff-A) | ||
| 1268 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1242 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1269 | ;; this variable is set to nil, then again to the appropriate face. | 1243 | ;; this variable is set to nil, then again to the appropriate face. |
| 1270 | (defvar ediff-odd-diff-face-A 'ediff-odd-diff-A | 1244 | (defvar ediff-odd-diff-face-A 'ediff-odd-diff-A |
| @@ -1272,7 +1246,7 @@ this variable represents.") | |||
| 1272 | DO NOT CHANGE this variable. Instead, use the customization | 1246 | DO NOT CHANGE this variable. Instead, use the customization |
| 1273 | widget to customize the actual face object `ediff-odd-diff-A' | 1247 | widget to customize the actual face object `ediff-odd-diff-A' |
| 1274 | this variable represents.") | 1248 | this variable represents.") |
| 1275 | (ediff-hide-face 'ediff-odd-diff-A) | 1249 | (ediff-hide-face ediff-odd-diff-face-A) |
| 1276 | 1250 | ||
| 1277 | 1251 | ||
| 1278 | (defface ediff-odd-diff-B | 1252 | (defface ediff-odd-diff-B |
| @@ -1290,8 +1264,6 @@ this variable represents.") | |||
| 1290 | (t (:italic t :stipple "gray1")))) | 1264 | (t (:italic t :stipple "gray1")))) |
| 1291 | "Face for highlighting odd-numbered non-current differences in buffer B." | 1265 | "Face for highlighting odd-numbered non-current differences in buffer B." |
| 1292 | :group 'ediff-highlighting) | 1266 | :group 'ediff-highlighting) |
| 1293 | ;; backward-compatibility alias | ||
| 1294 | (put 'ediff-odd-diff-face-B 'face-alias 'ediff-odd-diff-B) | ||
| 1295 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1267 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1296 | ;; this variable is set to nil, then again to the appropriate face. | 1268 | ;; this variable is set to nil, then again to the appropriate face. |
| 1297 | (defvar ediff-odd-diff-face-B 'ediff-odd-diff-B | 1269 | (defvar ediff-odd-diff-face-B 'ediff-odd-diff-B |
| @@ -1299,7 +1271,7 @@ this variable represents.") | |||
| 1299 | DO NOT CHANGE this variable. Instead, use the customization | 1271 | DO NOT CHANGE this variable. Instead, use the customization |
| 1300 | widget to customize the actual face object `ediff-odd-diff-B' | 1272 | widget to customize the actual face object `ediff-odd-diff-B' |
| 1301 | this variable represents.") | 1273 | this variable represents.") |
| 1302 | (ediff-hide-face 'ediff-odd-diff-B) | 1274 | (ediff-hide-face ediff-odd-diff-face-B) |
| 1303 | 1275 | ||
| 1304 | (defface ediff-odd-diff-C | 1276 | (defface ediff-odd-diff-C |
| 1305 | (if ediff-emacs-p | 1277 | (if ediff-emacs-p |
| @@ -1316,8 +1288,6 @@ this variable represents.") | |||
| 1316 | (t (:italic t :stipple "gray1")))) | 1288 | (t (:italic t :stipple "gray1")))) |
| 1317 | "Face for highlighting odd-numbered non-current differences in buffer C." | 1289 | "Face for highlighting odd-numbered non-current differences in buffer C." |
| 1318 | :group 'ediff-highlighting) | 1290 | :group 'ediff-highlighting) |
| 1319 | ;; backward-compatibility alias | ||
| 1320 | (put 'ediff-odd-diff-face-C 'face-alias 'ediff-odd-diff-C) | ||
| 1321 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1291 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1322 | ;; this variable is set to nil, then again to the appropriate face. | 1292 | ;; this variable is set to nil, then again to the appropriate face. |
| 1323 | (defvar ediff-odd-diff-face-C 'ediff-odd-diff-C | 1293 | (defvar ediff-odd-diff-face-C 'ediff-odd-diff-C |
| @@ -1325,7 +1295,7 @@ this variable represents.") | |||
| 1325 | DO NOT CHANGE this variable. Instead, use the customization | 1295 | DO NOT CHANGE this variable. Instead, use the customization |
| 1326 | widget to customize the actual face object `ediff-odd-diff-C' | 1296 | widget to customize the actual face object `ediff-odd-diff-C' |
| 1327 | this variable represents.") | 1297 | this variable represents.") |
| 1328 | (ediff-hide-face 'ediff-odd-diff-C) | 1298 | (ediff-hide-face ediff-odd-diff-face-C) |
| 1329 | 1299 | ||
| 1330 | (defface ediff-odd-diff-Ancestor | 1300 | (defface ediff-odd-diff-Ancestor |
| 1331 | (if ediff-emacs-p | 1301 | (if ediff-emacs-p |
| @@ -1339,8 +1309,6 @@ this variable represents.") | |||
| 1339 | (t (:italic t :stipple "gray1")))) | 1309 | (t (:italic t :stipple "gray1")))) |
| 1340 | "Face for highlighting odd-numbered non-current differences in the ancestor buffer." | 1310 | "Face for highlighting odd-numbered non-current differences in the ancestor buffer." |
| 1341 | :group 'ediff-highlighting) | 1311 | :group 'ediff-highlighting) |
| 1342 | ;; backward-compatibility alias | ||
| 1343 | (put 'ediff-odd-diff-face-Ancestor 'face-alias 'ediff-odd-diff-Ancestor) | ||
| 1344 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, | 1312 | ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
| 1345 | ;; this variable is set to nil, then again to the appropriate face. | 1313 | ;; this variable is set to nil, then again to the appropriate face. |
| 1346 | (defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-Ancestor | 1314 | (defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-Ancestor |
| @@ -1348,30 +1316,30 @@ this variable represents.") | |||
| 1348 | DO NOT CHANGE this variable. Instead, use the customization | 1316 | DO NOT CHANGE this variable. Instead, use the customization |
| 1349 | widget to customize the actual face object `ediff-odd-diff-Ancestor' | 1317 | widget to customize the actual face object `ediff-odd-diff-Ancestor' |
| 1350 | this variable represents.") | 1318 | this variable represents.") |
| 1351 | (ediff-hide-face 'ediff-odd-diff-Ancestor) | 1319 | (ediff-hide-face ediff-odd-diff-face-Ancestor) |
| 1352 | 1320 | ||
| 1353 | ;; Association between buffer types and odd-diff-face symbols | 1321 | ;; Association between buffer types and odd-diff-face symbols |
| 1354 | (defconst ediff-odd-diff-face-alist | 1322 | (defconst ediff-odd-diff-face-alist |
| 1355 | '((A . ediff-odd-diff-face-A) | 1323 | '((A . ediff-odd-diff-A) |
| 1356 | (B . ediff-odd-diff-face-B) | 1324 | (B . ediff-odd-diff-B) |
| 1357 | (C . ediff-odd-diff-face-C) | 1325 | (C . ediff-odd-diff-C) |
| 1358 | (Ancestor . ediff-odd-diff-face-Ancestor))) | 1326 | (Ancestor . ediff-odd-diff-Ancestor))) |
| 1359 | 1327 | ||
| 1360 | ;; A-list of fine-diff face symbols associated with buffer types | 1328 | ;; A-list of fine-diff face symbols associated with buffer types |
| 1361 | (defconst ediff-fine-diff-face-alist | 1329 | (defconst ediff-fine-diff-face-alist |
| 1362 | '((A . ediff-fine-diff-face-A) | 1330 | '((A . ediff-fine-diff-A) |
| 1363 | (B . ediff-fine-diff-face-B) | 1331 | (B . ediff-fine-diff-B) |
| 1364 | (C . ediff-fine-diff-face-C) | 1332 | (C . ediff-fine-diff-C) |
| 1365 | (Ancestor . ediff-fine-diff-face-Ancestor))) | 1333 | (Ancestor . ediff-fine-diff-Ancestor))) |
| 1366 | 1334 | ||
| 1367 | ;; Help echo | 1335 | ;; Help echo |
| 1368 | (put 'ediff-fine-diff-A 'ediff-help-echo | 1336 | (put ediff-fine-diff-face-A 'ediff-help-echo |
| 1369 | "A `refinement' of the current difference region") | 1337 | "A `refinement' of the current difference region") |
| 1370 | (put 'ediff-fine-diff-B 'ediff-help-echo | 1338 | (put ediff-fine-diff-face-B 'ediff-help-echo |
| 1371 | "A `refinement' of the current difference region") | 1339 | "A `refinement' of the current difference region") |
| 1372 | (put 'ediff-fine-diff-C 'ediff-help-echo | 1340 | (put ediff-fine-diff-face-C 'ediff-help-echo |
| 1373 | "A `refinement' of the current difference region") | 1341 | "A `refinement' of the current difference region") |
| 1374 | (put 'ediff-fine-diff-Ancestor 'ediff-help-echo | 1342 | (put ediff-fine-diff-face-Ancestor 'ediff-help-echo |
| 1375 | "A `refinement' of the current difference region") | 1343 | "A `refinement' of the current difference region") |
| 1376 | 1344 | ||
| 1377 | (add-hook 'ediff-quit-hook 'ediff-cleanup-mess) | 1345 | (add-hook 'ediff-quit-hook 'ediff-cleanup-mess) |
| @@ -1899,6 +1867,8 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 1899 | (set-buffer ,old-buffer) | 1867 | (set-buffer ,old-buffer) |
| 1900 | (set-syntax-table ,old-table))))))) | 1868 | (set-syntax-table ,old-table))))))) |
| 1901 | 1869 | ||
| 1870 | (provide 'ediff-init) | ||
| 1871 | |||
| 1902 | 1872 | ||
| 1903 | 1873 | ||
| 1904 | ;;; Local Variables: | 1874 | ;;; Local Variables: |
| @@ -1907,7 +1877,5 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 1907 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | 1877 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
| 1908 | ;;; End: | 1878 | ;;; End: |
| 1909 | 1879 | ||
| 1910 | (provide 'ediff-init) | ||
| 1911 | |||
| 1912 | ;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 | 1880 | ;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 |
| 1913 | ;;; ediff-init.el ends here | 1881 | ;;; ediff-init.el ends here |
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index c7ad411b4ac..1303d65cf2e 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el | |||
| @@ -205,6 +205,12 @@ Should be a sexp. For instance (car ediff-filtering-regexp-history) or nil." | |||
| 205 | This can be toggled with `ediff-toggle-filename-truncation'." | 205 | This can be toggled with `ediff-toggle-filename-truncation'." |
| 206 | :type 'boolean | 206 | :type 'boolean |
| 207 | :group 'ediff-mult) | 207 | :group 'ediff-mult) |
| 208 | |||
| 209 | (defcustom ediff-meta-mode-hook nil | ||
| 210 | "*Hooks run just after setting up meta mode." | ||
| 211 | :type 'hook | ||
| 212 | :group 'ediff-mult) | ||
| 213 | |||
| 208 | (defcustom ediff-registry-setup-hook nil | 214 | (defcustom ediff-registry-setup-hook nil |
| 209 | "*Hooks run just after the registry control panel is set up." | 215 | "*Hooks run just after the registry control panel is set up." |
| 210 | :type 'hook | 216 | :type 'hook |
| @@ -411,7 +417,8 @@ Commands: | |||
| 411 | (kill-all-local-variables) | 417 | (kill-all-local-variables) |
| 412 | (setq major-mode 'ediff-meta-mode) | 418 | (setq major-mode 'ediff-meta-mode) |
| 413 | (setq mode-name "MetaEdiff") | 419 | (setq mode-name "MetaEdiff") |
| 414 | (run-mode-hooks 'ediff-meta-mode-hook)) | 420 | ;; don't use run-mode-hooks here! |
| 421 | (run-hooks 'ediff-meta-mode-hook)) | ||
| 415 | 422 | ||
| 416 | 423 | ||
| 417 | ;; the keymap for the buffer showing directory differences | 424 | ;; the keymap for the buffer showing directory differences |
diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el index 45b214c0cb3..9176a38c2c9 100644 --- a/lisp/ediff-ptch.el +++ b/lisp/ediff-ptch.el | |||
| @@ -163,7 +163,7 @@ program." | |||
| 163 | ;; returns /dev/null, if can't strip prefix | 163 | ;; returns /dev/null, if can't strip prefix |
| 164 | (defsubst ediff-file-name-sans-prefix (filename prefix) | 164 | (defsubst ediff-file-name-sans-prefix (filename prefix) |
| 165 | (save-match-data | 165 | (save-match-data |
| 166 | (if (string-match (concat "^" prefix) filename) | 166 | (if (string-match (concat "^" (regexp-quote prefix)) filename) |
| 167 | (substring filename (match-end 0)) | 167 | (substring filename (match-end 0)) |
| 168 | (concat "/null/" filename)))) | 168 | (concat "/null/" filename)))) |
| 169 | 169 | ||
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 9434601326c..70b3f304e03 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -117,7 +117,13 @@ Commands: | |||
| 117 | (kill-all-local-variables) | 117 | (kill-all-local-variables) |
| 118 | (setq major-mode 'ediff-mode) | 118 | (setq major-mode 'ediff-mode) |
| 119 | (setq mode-name "Ediff") | 119 | (setq mode-name "Ediff") |
| 120 | (run-mode-hooks 'ediff-mode-hook)) | 120 | ;; We use run-hooks instead of run-mode-hooks for two reasons. |
| 121 | ;; The ediff control buffer is read-only and it is not supposed to be | ||
| 122 | ;; modified by minor modes and such. So, run-mode-hooks doesn't do anything | ||
| 123 | ;; useful here on top of what run-hooks does. | ||
| 124 | ;; Second, changing run-hooks to run-mode-hooks would require an | ||
| 125 | ;; if-statement, since XEmacs doesn't have this. | ||
| 126 | (run-hooks 'ediff-mode-hook)) | ||
| 121 | 127 | ||
| 122 | 128 | ||
| 123 | 129 | ||
| @@ -3788,9 +3794,8 @@ Ediff Control Panel to restore highlighting." | |||
| 3788 | type ediff-current-diff-overlay-alist)) | 3794 | type ediff-current-diff-overlay-alist)) |
| 3789 | (buffer (ediff-get-buffer type)) | 3795 | (buffer (ediff-get-buffer type)) |
| 3790 | (face (face-name | 3796 | (face (face-name |
| 3791 | (symbol-value | 3797 | (ediff-get-symbol-from-alist |
| 3792 | (ediff-get-symbol-from-alist | 3798 | type ediff-current-diff-face-alist)))) |
| 3793 | type ediff-current-diff-face-alist))))) | ||
| 3794 | (set overlay | 3799 | (set overlay |
| 3795 | (ediff-make-bullet-proof-overlay (point-max) (point-max) buffer)) | 3800 | (ediff-make-bullet-proof-overlay (point-max) (point-max) buffer)) |
| 3796 | (ediff-set-overlay-face (symbol-value overlay) face) | 3801 | (ediff-set-overlay-face (symbol-value overlay) face) |
diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el index 653f4017cad..70069cc2193 100644 --- a/lisp/ediff-vers.el +++ b/lisp/ediff-vers.el | |||
| @@ -304,13 +304,14 @@ | |||
| 304 | (if (stringp tmp-file) (delete-file tmp-file)) | 304 | (if (stringp tmp-file) (delete-file tmp-file)) |
| 305 | (if (stringp ancestor-file) (delete-file ancestor-file)))) | 305 | (if (stringp ancestor-file) (delete-file ancestor-file)))) |
| 306 | 306 | ||
| 307 | |||
| 308 | (provide 'ediff-vers) | ||
| 309 | |||
| 307 | ;;; Local Variables: | 310 | ;;; Local Variables: |
| 308 | ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) | 311 | ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
| 309 | ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) | 312 | ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
| 310 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | 313 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
| 311 | ;;; End: | 314 | ;;; End: |
| 312 | 315 | ||
| 313 | (provide 'ediff-vers) | ||
| 314 | |||
| 315 | ;;; arch-tag: bbb34f0c-2a90-426a-a77a-c75f479ebbbf | 316 | ;;; arch-tag: bbb34f0c-2a90-426a-a77a-c75f479ebbbf |
| 316 | ;;; ediff-vers.el ends here | 317 | ;;; ediff-vers.el ends here |
diff --git a/lisp/ediff.el b/lisp/ediff.el index 46b060e29ae..f842e9dec6c 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Keywords: comparing, merging, patching, tools, unix | 7 | ;; Keywords: comparing, merging, patching, tools, unix |
| 8 | 8 | ||
| 9 | (defconst ediff-version "2.80" "The current version of Ediff") | 9 | (defconst ediff-version "2.80" "The current version of Ediff") |
| 10 | (defconst ediff-date "June 3, 2005" "Date of last update") | 10 | (defconst ediff-date "July 8, 2005" "Date of last update") |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| @@ -1526,15 +1526,15 @@ With optional NODE, goes to that node." | |||
| 1526 | (add-to-list 'debug-ignored-errors mess)) | 1526 | (add-to-list 'debug-ignored-errors mess)) |
| 1527 | 1527 | ||
| 1528 | 1528 | ||
| 1529 | (require 'ediff-util) | ||
| 1530 | |||
| 1531 | (run-hooks 'ediff-load-hook) | ||
| 1532 | |||
| 1529 | ;;; Local Variables: | 1533 | ;;; Local Variables: |
| 1530 | ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) | 1534 | ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
| 1531 | ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) | 1535 | ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
| 1532 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | 1536 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
| 1533 | ;;; End: | 1537 | ;;; End: |
| 1534 | 1538 | ||
| 1535 | (require 'ediff-util) | ||
| 1536 | |||
| 1537 | (run-hooks 'ediff-load-hook) | ||
| 1538 | |||
| 1539 | ;;; arch-tag: 97c71396-db02-4f41-8b48-6a51c3348fcc | 1539 | ;;; arch-tag: 97c71396-db02-4f41-8b48-6a51c3348fcc |
| 1540 | ;;; ediff.el ends here | 1540 | ;;; ediff.el ends here |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 4f247f2cd38..ecd5251891c 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -36,6 +36,8 @@ | |||
| 36 | (defvar viper-always) | 36 | (defvar viper-always) |
| 37 | (defvar viper-mode-string) | 37 | (defvar viper-mode-string) |
| 38 | (defvar viper-custom-file-name) | 38 | (defvar viper-custom-file-name) |
| 39 | (defvar viper--key-maps) | ||
| 40 | (defvar viper--intercept-key-maps) | ||
| 39 | (defvar iso-accents-mode) | 41 | (defvar iso-accents-mode) |
| 40 | (defvar quail-mode) | 42 | (defvar quail-mode) |
| 41 | (defvar quail-current-str) | 43 | (defvar quail-current-str) |
| @@ -92,7 +94,7 @@ | |||
| 92 | ;; Variables for defining VI commands | 94 | ;; Variables for defining VI commands |
| 93 | 95 | ||
| 94 | ;; Modifying commands that can be prefixes to movement commands | 96 | ;; Modifying commands that can be prefixes to movement commands |
| 95 | (defconst viper-prefix-commands '(?c ?d ?y ?! ?= ?# ?< ?> ?\")) | 97 | (defvar viper-prefix-commands '(?c ?d ?y ?! ?= ?# ?< ?> ?\")) |
| 96 | ;; define viper-prefix-command-p | 98 | ;; define viper-prefix-command-p |
| 97 | (viper-test-com-defun viper-prefix-command) | 99 | (viper-test-com-defun viper-prefix-command) |
| 98 | 100 | ||
| @@ -440,23 +442,24 @@ | |||
| 440 | ;; This ensures that Viper bindings are in effect, regardless of which minor | 442 | ;; This ensures that Viper bindings are in effect, regardless of which minor |
| 441 | ;; modes were turned on by the user or by other packages. | 443 | ;; modes were turned on by the user or by other packages. |
| 442 | (defun viper-normalize-minor-mode-map-alist () | 444 | (defun viper-normalize-minor-mode-map-alist () |
| 443 | (setq minor-mode-map-alist | 445 | (setq viper--intercept-key-maps |
| 444 | (viper-append-filter-alist | 446 | (list |
| 445 | (list (cons 'viper-vi-intercept-minor-mode viper-vi-intercept-map) | 447 | (cons 'viper-vi-intercept-minor-mode viper-vi-intercept-map) |
| 446 | (cons 'viper-vi-minibuffer-minor-mode viper-minibuffer-map) | 448 | (cons 'viper-insert-intercept-minor-mode viper-insert-intercept-map) |
| 447 | (cons 'viper-vi-local-user-minor-mode viper-vi-local-user-map) | 449 | (cons 'viper-emacs-intercept-minor-mode viper-emacs-intercept-map) |
| 448 | (cons 'viper-vi-kbd-minor-mode viper-vi-kbd-map) | 450 | )) |
| 449 | (cons 'viper-vi-global-user-minor-mode viper-vi-global-user-map) | 451 | (setq viper--key-maps |
| 450 | (cons 'viper-vi-state-modifier-minor-mode | 452 | (list (cons 'viper-vi-minibuffer-minor-mode viper-minibuffer-map) |
| 451 | (if (keymapp | 453 | (cons 'viper-vi-local-user-minor-mode viper-vi-local-user-map) |
| 452 | (cdr (assoc major-mode | 454 | (cons 'viper-vi-kbd-minor-mode viper-vi-kbd-map) |
| 453 | viper-vi-state-modifier-alist))) | 455 | (cons 'viper-vi-global-user-minor-mode viper-vi-global-user-map) |
| 454 | (cdr (assoc major-mode viper-vi-state-modifier-alist)) | 456 | (cons 'viper-vi-state-modifier-minor-mode |
| 455 | viper-empty-keymap)) | 457 | (if (keymapp |
| 456 | (cons 'viper-vi-diehard-minor-mode viper-vi-diehard-map) | 458 | (cdr (assoc major-mode viper-vi-state-modifier-alist))) |
| 457 | (cons 'viper-vi-basic-minor-mode viper-vi-basic-map) | 459 | (cdr (assoc major-mode viper-vi-state-modifier-alist)) |
| 458 | (cons 'viper-insert-intercept-minor-mode | 460 | viper-empty-keymap)) |
| 459 | viper-insert-intercept-map) | 461 | (cons 'viper-vi-diehard-minor-mode viper-vi-diehard-map) |
| 462 | (cons 'viper-vi-basic-minor-mode viper-vi-basic-map) | ||
| 460 | (cons 'viper-replace-minor-mode viper-replace-map) | 463 | (cons 'viper-replace-minor-mode viper-replace-map) |
| 461 | ;; viper-insert-minibuffer-minor-mode must come after | 464 | ;; viper-insert-minibuffer-minor-mode must come after |
| 462 | ;; viper-replace-minor-mode | 465 | ;; viper-replace-minor-mode |
| @@ -476,8 +479,6 @@ | |||
| 476 | viper-empty-keymap)) | 479 | viper-empty-keymap)) |
| 477 | (cons 'viper-insert-diehard-minor-mode viper-insert-diehard-map) | 480 | (cons 'viper-insert-diehard-minor-mode viper-insert-diehard-map) |
| 478 | (cons 'viper-insert-basic-minor-mode viper-insert-basic-map) | 481 | (cons 'viper-insert-basic-minor-mode viper-insert-basic-map) |
| 479 | (cons 'viper-emacs-intercept-minor-mode | ||
| 480 | viper-emacs-intercept-map) | ||
| 481 | (cons 'viper-emacs-local-user-minor-mode | 482 | (cons 'viper-emacs-local-user-minor-mode |
| 482 | viper-emacs-local-user-map) | 483 | viper-emacs-local-user-map) |
| 483 | (cons 'viper-emacs-kbd-minor-mode viper-emacs-kbd-map) | 484 | (cons 'viper-emacs-kbd-minor-mode viper-emacs-kbd-map) |
| @@ -490,8 +491,16 @@ | |||
| 490 | (cdr | 491 | (cdr |
| 491 | (assoc major-mode viper-emacs-state-modifier-alist)) | 492 | (assoc major-mode viper-emacs-state-modifier-alist)) |
| 492 | viper-empty-keymap)) | 493 | viper-empty-keymap)) |
| 493 | ) | 494 | )) |
| 494 | minor-mode-map-alist))) | 495 | |
| 496 | ;; in emacs with emulation-mode-map-alists, nothing needs to be done | ||
| 497 | (unless | ||
| 498 | (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) | ||
| 499 | (setq minor-mode-map-alist | ||
| 500 | (viper-append-filter-alist | ||
| 501 | (append viper--intercept-key-maps viper--key-maps) | ||
| 502 | minor-mode-map-alist))) | ||
| 503 | ) | ||
| 495 | 504 | ||
| 496 | 505 | ||
| 497 | 506 | ||
| @@ -1021,7 +1030,7 @@ as a Meta key and any number of multiple escapes is allowed." | |||
| 1021 | (not viper-translate-all-ESC-keysequences)) | 1030 | (not viper-translate-all-ESC-keysequences)) |
| 1022 | ;; put keys following ESC on the unread list | 1031 | ;; put keys following ESC on the unread list |
| 1023 | ;; and return ESC as the key-sequence | 1032 | ;; and return ESC as the key-sequence |
| 1024 | (viper-set-unread-command-events (subseq keyseq 1)) | 1033 | (viper-set-unread-command-events (viper-subseq keyseq 1)) |
| 1025 | (setq last-input-event event | 1034 | (setq last-input-event event |
| 1026 | keyseq (if viper-emacs-p | 1035 | keyseq (if viper-emacs-p |
| 1027 | "\e" | 1036 | "\e" |
| @@ -1032,7 +1041,7 @@ as a Meta key and any number of multiple escapes is allowed." | |||
| 1032 | (viper-set-unread-command-events | 1041 | (viper-set-unread-command-events |
| 1033 | (vconcat (vector | 1042 | (vconcat (vector |
| 1034 | (character-to-event (event-key first-key))) | 1043 | (character-to-event (event-key first-key))) |
| 1035 | (subseq keyseq 1))) | 1044 | (viper-subseq keyseq 1))) |
| 1036 | (setq last-input-event event | 1045 | (setq last-input-event event |
| 1037 | keyseq (vector (character-to-event ?\e)))) | 1046 | keyseq (vector (character-to-event ?\e)))) |
| 1038 | ((eventp first-key) | 1047 | ((eventp first-key) |
| @@ -3732,7 +3741,8 @@ Null string will repeat previous search." | |||
| 3732 | (interactive "P") | 3741 | (interactive "P") |
| 3733 | (let ((val (viper-P-val arg)) | 3742 | (let ((val (viper-P-val arg)) |
| 3734 | (com (viper-getcom arg)) | 3743 | (com (viper-getcom arg)) |
| 3735 | (old-str viper-s-string)) | 3744 | (old-str viper-s-string) |
| 3745 | debug-on-error) | ||
| 3736 | (setq viper-s-forward t) | 3746 | (setq viper-s-forward t) |
| 3737 | (viper-if-string "/") | 3747 | (viper-if-string "/") |
| 3738 | ;; this is not used at present, but may be used later | 3748 | ;; this is not used at present, but may be used later |
| @@ -3744,7 +3754,8 @@ Null string will repeat previous search." | |||
| 3744 | (if com | 3754 | (if com |
| 3745 | (progn | 3755 | (progn |
| 3746 | (viper-move-marker-locally 'viper-com-point (mark t)) | 3756 | (viper-move-marker-locally 'viper-com-point (mark t)) |
| 3747 | (viper-execute-com 'viper-search-next val com))))) | 3757 | (viper-execute-com 'viper-search-next val com))) |
| 3758 | )) | ||
| 3748 | 3759 | ||
| 3749 | (defun viper-search-backward (arg) | 3760 | (defun viper-search-backward (arg) |
| 3750 | "Search a string backward. | 3761 | "Search a string backward. |
| @@ -3753,7 +3764,8 @@ Null string will repeat previous search." | |||
| 3753 | (interactive "P") | 3764 | (interactive "P") |
| 3754 | (let ((val (viper-P-val arg)) | 3765 | (let ((val (viper-P-val arg)) |
| 3755 | (com (viper-getcom arg)) | 3766 | (com (viper-getcom arg)) |
| 3756 | (old-str viper-s-string)) | 3767 | (old-str viper-s-string) |
| 3768 | debug-on-error) | ||
| 3757 | (setq viper-s-forward nil) | 3769 | (setq viper-s-forward nil) |
| 3758 | (viper-if-string "?") | 3770 | (viper-if-string "?") |
| 3759 | ;; this is not used at present, but may be used later | 3771 | ;; this is not used at present, but may be used later |
| @@ -3858,7 +3870,8 @@ Null string will repeat previous search." | |||
| 3858 | "Repeat previous search." | 3870 | "Repeat previous search." |
| 3859 | (interactive "P") | 3871 | (interactive "P") |
| 3860 | (let ((val (viper-p-val arg)) | 3872 | (let ((val (viper-p-val arg)) |
| 3861 | (com (viper-getcom arg))) | 3873 | (com (viper-getcom arg)) |
| 3874 | debug-on-error) | ||
| 3862 | (if (null viper-s-string) (error viper-NoPrevSearch)) | 3875 | (if (null viper-s-string) (error viper-NoPrevSearch)) |
| 3863 | (viper-search viper-s-string viper-s-forward arg) | 3876 | (viper-search viper-s-string viper-s-forward arg) |
| 3864 | (if com | 3877 | (if com |
| @@ -3870,7 +3883,8 @@ Null string will repeat previous search." | |||
| 3870 | "Repeat previous search in the reverse direction." | 3883 | "Repeat previous search in the reverse direction." |
| 3871 | (interactive "P") | 3884 | (interactive "P") |
| 3872 | (let ((val (viper-p-val arg)) | 3885 | (let ((val (viper-p-val arg)) |
| 3873 | (com (viper-getcom arg))) | 3886 | (com (viper-getcom arg)) |
| 3887 | debug-on-error) | ||
| 3874 | (if (null viper-s-string) (error viper-NoPrevSearch)) | 3888 | (if (null viper-s-string) (error viper-NoPrevSearch)) |
| 3875 | (viper-search viper-s-string (not viper-s-forward) arg) | 3889 | (viper-search viper-s-string (not viper-s-forward) arg) |
| 3876 | (if com | 3890 | (if com |
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 6e188f21a9d..8d9aed94770 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -855,15 +855,13 @@ Related buffers can be cycled through via :R and :P commands." | |||
| 855 | (t (:underline t :stipple "gray3"))) | 855 | (t (:underline t :stipple "gray3"))) |
| 856 | "*Face used to flash out the search pattern." | 856 | "*Face used to flash out the search pattern." |
| 857 | :group 'viper-highlighting) | 857 | :group 'viper-highlighting) |
| 858 | ;; backward-compatibility alias | ||
| 859 | (put 'viper-search-face 'face-alias 'viper-search) | ||
| 860 | ;; An internal variable. Viper takes the face from here. | 858 | ;; An internal variable. Viper takes the face from here. |
| 861 | (defvar viper-search-face 'viper-search | 859 | (defvar viper-search-face 'viper-search |
| 862 | "Face used to flash out the search pattern. | 860 | "Face used to flash out the search pattern. |
| 863 | DO NOT CHANGE this variable. Instead, use the customization widget | 861 | DO NOT CHANGE this variable. Instead, use the customization widget |
| 864 | to customize the actual face object `viper-search-face' | 862 | to customize the actual face object `viper-search' |
| 865 | this variable represents.") | 863 | this variable represents.") |
| 866 | (viper-hide-face 'viper-search) | 864 | (viper-hide-face viper-search-face) |
| 867 | 865 | ||
| 868 | 866 | ||
| 869 | (defface viper-replace-overlay | 867 | (defface viper-replace-overlay |
| @@ -871,15 +869,13 @@ this variable represents.") | |||
| 871 | (t (:underline t :stipple "gray3"))) | 869 | (t (:underline t :stipple "gray3"))) |
| 872 | "*Face for highlighting replace regions on a window display." | 870 | "*Face for highlighting replace regions on a window display." |
| 873 | :group 'viper-highlighting) | 871 | :group 'viper-highlighting) |
| 874 | ;; backward-compatibility alias | ||
| 875 | (put 'viper-replace-overlay-face 'face-alias 'viper-replace-overlay) | ||
| 876 | ;; An internal variable. Viper takes the face from here. | 872 | ;; An internal variable. Viper takes the face from here. |
| 877 | (defvar viper-replace-overlay-face 'viper-replace-overlay | 873 | (defvar viper-replace-overlay-face 'viper-replace-overlay |
| 878 | "Face for highlighting replace regions on a window display. | 874 | "Face for highlighting replace regions on a window display. |
| 879 | DO NOT CHANGE this variable. Instead, use the customization widget | 875 | DO NOT CHANGE this variable. Instead, use the customization widget |
| 880 | to customize the actual face object `viper-replace-overlay-face' | 876 | to customize the actual face object `viper-replace-overlay' |
| 881 | this variable represents.") | 877 | this variable represents.") |
| 882 | (viper-hide-face 'viper-replace-overlay) | 878 | (viper-hide-face viper-replace-overlay-face) |
| 883 | 879 | ||
| 884 | 880 | ||
| 885 | (defface viper-minibuffer-emacs | 881 | (defface viper-minibuffer-emacs |
| @@ -887,15 +883,13 @@ this variable represents.") | |||
| 887 | (t (:weight bold))) | 883 | (t (:weight bold))) |
| 888 | "Face used in the Minibuffer when it is in Emacs state." | 884 | "Face used in the Minibuffer when it is in Emacs state." |
| 889 | :group 'viper-highlighting) | 885 | :group 'viper-highlighting) |
| 890 | ;; backward-compatibility alias | ||
| 891 | (put 'viper-minibuffer-emacs-face 'face-alias 'viper-minibuffer-emacs) | ||
| 892 | ;; An internal variable. Viper takes the face from here. | 886 | ;; An internal variable. Viper takes the face from here. |
| 893 | (defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs | 887 | (defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs |
| 894 | "Face used in the Minibuffer when it is in Emacs state. | 888 | "Face used in the Minibuffer when it is in Emacs state. |
| 895 | DO NOT CHANGE this variable. Instead, use the customization widget | 889 | DO NOT CHANGE this variable. Instead, use the customization widget |
| 896 | to customize the actual face object `viper-minibuffer-emacs-face' | 890 | to customize the actual face object `viper-minibuffer-emacs' |
| 897 | this variable represents.") | 891 | this variable represents.") |
| 898 | (viper-hide-face 'viper-minibuffer-emacs) | 892 | (viper-hide-face viper-minibuffer-emacs-face) |
| 899 | 893 | ||
| 900 | 894 | ||
| 901 | (defface viper-minibuffer-insert | 895 | (defface viper-minibuffer-insert |
| @@ -903,15 +897,13 @@ this variable represents.") | |||
| 903 | (t (:slant italic))) | 897 | (t (:slant italic))) |
| 904 | "Face used in the Minibuffer when it is in Insert state." | 898 | "Face used in the Minibuffer when it is in Insert state." |
| 905 | :group 'viper-highlighting) | 899 | :group 'viper-highlighting) |
| 906 | ;; backward-compatibility alias | ||
| 907 | (put 'viper-minibuffer-insert-face 'face-alias 'viper-minibuffer-insert) | ||
| 908 | ;; An internal variable. Viper takes the face from here. | 900 | ;; An internal variable. Viper takes the face from here. |
| 909 | (defvar viper-minibuffer-insert-face 'viper-minibuffer-insert | 901 | (defvar viper-minibuffer-insert-face 'viper-minibuffer-insert |
| 910 | "Face used in the Minibuffer when it is in Insert state. | 902 | "Face used in the Minibuffer when it is in Insert state. |
| 911 | DO NOT CHANGE this variable. Instead, use the customization widget | 903 | DO NOT CHANGE this variable. Instead, use the customization widget |
| 912 | to customize the actual face object `viper-minibuffer-insert-face' | 904 | to customize the actual face object `viper-minibuffer-insert' |
| 913 | this variable represents.") | 905 | this variable represents.") |
| 914 | (viper-hide-face 'viper-minibuffer-insert) | 906 | (viper-hide-face viper-minibuffer-insert-face) |
| 915 | 907 | ||
| 916 | 908 | ||
| 917 | (defface viper-minibuffer-vi | 909 | (defface viper-minibuffer-vi |
| @@ -919,15 +911,13 @@ this variable represents.") | |||
| 919 | (t (:inverse-video t))) | 911 | (t (:inverse-video t))) |
| 920 | "Face used in the Minibuffer when it is in Vi state." | 912 | "Face used in the Minibuffer when it is in Vi state." |
| 921 | :group 'viper-highlighting) | 913 | :group 'viper-highlighting) |
| 922 | ;; backward-compatibility alias | ||
| 923 | (put 'viper-minibuffer-vi-face 'face-alias 'viper-minibuffer-vi) | ||
| 924 | ;; An internal variable. Viper takes the face from here. | 914 | ;; An internal variable. Viper takes the face from here. |
| 925 | (defvar viper-minibuffer-vi-face 'viper-minibuffer-vi | 915 | (defvar viper-minibuffer-vi-face 'viper-minibuffer-vi |
| 926 | "Face used in the Minibuffer when it is in Vi state. | 916 | "Face used in the Minibuffer when it is in Vi state. |
| 927 | DO NOT CHANGE this variable. Instead, use the customization widget | 917 | DO NOT CHANGE this variable. Instead, use the customization widget |
| 928 | to customize the actual face object `viper-minibuffer-vi-face' | 918 | to customize the actual face object `viper-minibuffer-vi' |
| 929 | this variable represents.") | 919 | this variable represents.") |
| 930 | (viper-hide-face 'viper-minibuffer-vi) | 920 | (viper-hide-face viper-minibuffer-vi-face) |
| 931 | 921 | ||
| 932 | ;; the current face to be used in the minibuffer | 922 | ;; the current face to be used in the minibuffer |
| 933 | (viper-deflocalvar | 923 | (viper-deflocalvar |
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index e83cf14776f..1bbf3dce2c2 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el | |||
| @@ -50,25 +50,6 @@ | |||
| 50 | 50 | ||
| 51 | ;;; Variables | 51 | ;;; Variables |
| 52 | 52 | ||
| 53 | (defcustom viper-toggle-key "\C-z" | ||
| 54 | "The key used to change states from emacs to Vi and back. | ||
| 55 | In insert mode, this key also functions as Meta. | ||
| 56 | Must be set in .viper file or prior to loading Viper. | ||
| 57 | This setting cannot be changed interactively." | ||
| 58 | :type 'string | ||
| 59 | :group 'viper) | ||
| 60 | |||
| 61 | (defcustom viper-quoted-insert-key "\C-v" | ||
| 62 | "The key used to quote special characters when inserting them in Insert state." | ||
| 63 | :type 'string | ||
| 64 | :group 'viper) | ||
| 65 | |||
| 66 | (defcustom viper-ESC-key "\e" | ||
| 67 | "Key used to ESC. | ||
| 68 | Must be set in .viper file or prior to loading Viper. | ||
| 69 | This setting cannot be changed interactively." | ||
| 70 | :type 'string | ||
| 71 | :group 'viper) | ||
| 72 | 53 | ||
| 73 | ;;; Emacs keys in other states. | 54 | ;;; Emacs keys in other states. |
| 74 | 55 | ||
| @@ -176,6 +157,78 @@ viper-insert-basic-map. Not recommended, except for novice users.") | |||
| 176 | ;; and, after .viper is loaded, we add this keymap to viper-vi-basic-map. | 157 | ;; and, after .viper is loaded, we add this keymap to viper-vi-basic-map. |
| 177 | (defvar viper-mode-map (make-sparse-keymap)) | 158 | (defvar viper-mode-map (make-sparse-keymap)) |
| 178 | 159 | ||
| 160 | ;; Some important keys used in viper | ||
| 161 | (defcustom viper-toggle-key [(control ?z)] ; "\C-z" | ||
| 162 | "The key used to change states from emacs to Vi and back. | ||
| 163 | In insert mode, this key also functions as Meta. | ||
| 164 | |||
| 165 | Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]." | ||
| 166 | :type 'sexp | ||
| 167 | :group 'viper | ||
| 168 | :set (lambda (symbol value) | ||
| 169 | (let ((old-value (if (boundp 'viper-toggle-key) | ||
| 170 | viper-toggle-key | ||
| 171 | [(control ?z)]))) | ||
| 172 | (mapcar | ||
| 173 | (lambda (buf) | ||
| 174 | (save-excursion | ||
| 175 | (set-buffer buf) | ||
| 176 | (when (and (boundp 'viper-insert-basic-map) | ||
| 177 | (keymapp viper-insert-basic-map)) | ||
| 178 | (when old-value | ||
| 179 | (define-key viper-insert-basic-map old-value nil)) | ||
| 180 | (define-key viper-insert-basic-map value 'viper-escape-to-vi)) | ||
| 181 | (when (and (boundp 'viper-vi-intercept-map) | ||
| 182 | (keymapp viper-vi-intercept-map)) | ||
| 183 | (when old-value | ||
| 184 | (define-key viper-vi-intercept-map old-value nil)) | ||
| 185 | (define-key | ||
| 186 | viper-vi-intercept-map value 'viper-toggle-key-action)) | ||
| 187 | (when (and (boundp 'viper-emacs-intercept-map) | ||
| 188 | (keymapp viper-emacs-intercept-map)) | ||
| 189 | (define-key viper-emacs-intercept-map old-value nil) | ||
| 190 | (define-key | ||
| 191 | viper-emacs-intercept-map value 'viper-change-state-to-vi)) | ||
| 192 | )) | ||
| 193 | (buffer-list)) | ||
| 194 | (set-default symbol value) | ||
| 195 | ))) | ||
| 196 | |||
| 197 | (defcustom viper-quoted-insert-key "\C-v" | ||
| 198 | "The key used to quote special characters when inserting them in Insert state." | ||
| 199 | :type 'string | ||
| 200 | :group 'viper) | ||
| 201 | |||
| 202 | (defcustom viper-ESC-key [(escape)] ; "\e" | ||
| 203 | "Key used to ESC. | ||
| 204 | Enter as a sexp. Examples: \"\\e\", [(escape)]." | ||
| 205 | :type 'sexp | ||
| 206 | :group 'viper | ||
| 207 | :set (lambda (symbol value) | ||
| 208 | (let ((old-value (if (boundp 'viper-ESC-key) | ||
| 209 | viper-ESC-key | ||
| 210 | [(escape)]))) | ||
| 211 | (mapcar | ||
| 212 | (lambda (buf) | ||
| 213 | (save-excursion | ||
| 214 | (set-buffer buf) | ||
| 215 | (when (and (boundp 'viper-insert-intercept-map) | ||
| 216 | (keymapp viper-insert-intercept-map)) | ||
| 217 | (when old-value | ||
| 218 | (define-key viper-insert-intercept-map old-value nil)) | ||
| 219 | (define-key | ||
| 220 | viper-insert-intercept-map value 'viper-intercept-ESC-key)) | ||
| 221 | (when (and (boundp 'viper-vi-intercept-map) | ||
| 222 | (keymapp viper-vi-intercept-map)) | ||
| 223 | (when old-value | ||
| 224 | (define-key viper-vi-intercept-map old-value nil)) | ||
| 225 | (define-key | ||
| 226 | viper-vi-intercept-map value 'viper-intercept-ESC-key)) | ||
| 227 | )) | ||
| 228 | (buffer-list)) | ||
| 229 | (set-default symbol value) | ||
| 230 | ))) | ||
| 231 | |||
| 179 | 232 | ||
| 180 | ;;; Variables used by minor modes | 233 | ;;; Variables used by minor modes |
| 181 | 234 | ||
| @@ -197,6 +250,10 @@ viper-insert-basic-map. Not recommended, except for novice users.") | |||
| 197 | ;; to its Emacs state in various major modes. | 250 | ;; to its Emacs state in various major modes. |
| 198 | (defvar viper-emacs-state-modifier-alist nil) | 251 | (defvar viper-emacs-state-modifier-alist nil) |
| 199 | 252 | ||
| 253 | ;; The list of viper keymaps. Set by viper-normalize-minor-mode-map-alist | ||
| 254 | (viper-deflocalvar viper--key-maps nil) | ||
| 255 | (viper-deflocalvar viper--intercept-key-maps nil) | ||
| 256 | |||
| 200 | ;; Tells viper-add-local-keys to create a new viper-vi-local-user-map for new | 257 | ;; Tells viper-add-local-keys to create a new viper-vi-local-user-map for new |
| 201 | ;; buffers. Not a user option. | 258 | ;; buffers. Not a user option. |
| 202 | (viper-deflocalvar viper-need-new-vi-local-map t "") | 259 | (viper-deflocalvar viper-need-new-vi-local-map t "") |
| @@ -509,7 +566,7 @@ Usage: | |||
| 509 | 566 | ||
| 510 | (defun viper-zap-local-keys () | 567 | (defun viper-zap-local-keys () |
| 511 | "Unconditionally reset Viper viper-*-local-user-map's. | 568 | "Unconditionally reset Viper viper-*-local-user-map's. |
| 512 | Rarely useful, but if u made a mistake by switching to a mode that adds | 569 | Rarely useful, but if you made a mistake by switching to a mode that adds |
| 513 | undesirable local keys, e.g., comint-mode, then this function can restore | 570 | undesirable local keys, e.g., comint-mode, then this function can restore |
| 514 | sanity." | 571 | sanity." |
| 515 | (interactive) | 572 | (interactive) |
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index 8a3ce5db9eb..6d79ddec043 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el | |||
| @@ -178,7 +178,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., | |||
| 178 | (if (member | 178 | (if (member |
| 179 | key | 179 | key |
| 180 | '(?\b ?\d '^? '^H (control h) (control \?) backspace delete)) | 180 | '(?\b ?\d '^? '^H (control h) (control \?) backspace delete)) |
| 181 | (setq key-seq (subseq key-seq 0 (- (length key-seq) 2)))) | 181 | (setq key-seq (viper-subseq key-seq 0 (- (length key-seq) 2)))) |
| 182 | (setq message | 182 | (setq message |
| 183 | (format | 183 | (format |
| 184 | ":map%s %s" | 184 | ":map%s %s" |
| @@ -242,9 +242,9 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., | |||
| 242 | (cond ((member | 242 | (cond ((member |
| 243 | key | 243 | key |
| 244 | '(?\b ?\d '^? '^H (control h) (control \?) backspace delete)) | 244 | '(?\b ?\d '^? '^H (control h) (control \?) backspace delete)) |
| 245 | (setq key-seq (subseq key-seq 0 (- (length key-seq) 2)))) | 245 | (setq key-seq (viper-subseq key-seq 0 (- (length key-seq) 2)))) |
| 246 | ((member key '(tab (control i) ?\t)) | 246 | ((member key '(tab (control i) ?\t)) |
| 247 | (setq key-seq (subseq key-seq 0 (1- (length key-seq)))) | 247 | (setq key-seq (viper-subseq key-seq 0 (1- (length key-seq)))) |
| 248 | (setq message | 248 | (setq message |
| 249 | (format | 249 | (format |
| 250 | ":unmap%s %s" | 250 | ":unmap%s %s" |
| @@ -618,7 +618,7 @@ name from there." | |||
| 618 | 618 | ||
| 619 | (if (null macro-alist-elt) | 619 | (if (null macro-alist-elt) |
| 620 | (setq macro-alist-elt (car next-best-match) | 620 | (setq macro-alist-elt (car next-best-match) |
| 621 | unmatched-suffix (subseq event-seq (cdr next-best-match)))) | 621 | unmatched-suffix (viper-subseq event-seq (cdr next-best-match)))) |
| 622 | 622 | ||
| 623 | (cond ((null macro-alist-elt)) | 623 | (cond ((null macro-alist-elt)) |
| 624 | ((setq macro-body (viper-kbd-buf-definition macro-alist-elt))) | 624 | ((setq macro-body (viper-kbd-buf-definition macro-alist-elt))) |
| @@ -701,7 +701,7 @@ name from there." | |||
| 701 | (let ((len1 (length seq1)) | 701 | (let ((len1 (length seq1)) |
| 702 | (len2 (length seq2))) | 702 | (len2 (length seq2))) |
| 703 | (if (<= len1 len2) | 703 | (if (<= len1 len2) |
| 704 | (equal seq1 (subseq seq2 0 len1))))) | 704 | (equal seq1 (viper-subseq seq2 0 len1))))) |
| 705 | 705 | ||
| 706 | ;; find the longest common prefix | 706 | ;; find the longest common prefix |
| 707 | (defun viper-common-seq-prefix (&rest seqs) | 707 | (defun viper-common-seq-prefix (&rest seqs) |
| @@ -766,7 +766,7 @@ name from there." | |||
| 766 | (setq macro-def (car lis) | 766 | (setq macro-def (car lis) |
| 767 | def-len (length (car macro-def))) | 767 | def-len (length (car macro-def))) |
| 768 | (if (and (>= str-len def-len) | 768 | (if (and (>= str-len def-len) |
| 769 | (equal (car macro-def) (subseq str 0 def-len))) | 769 | (equal (car macro-def) (viper-subseq str 0 def-len))) |
| 770 | (if (or (viper-kbd-buf-definition macro-def) | 770 | (if (or (viper-kbd-buf-definition macro-def) |
| 771 | (viper-kbd-mode-definition macro-def) | 771 | (viper-kbd-mode-definition macro-def) |
| 772 | (viper-kbd-global-definition macro-def)) | 772 | (viper-kbd-global-definition macro-def)) |
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 503cd145796..77c5f844567 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | (defvar viper-frame-of-focus nil) | 65 | (defvar viper-frame-of-focus nil) |
| 66 | 66 | ||
| 67 | ;; Frame that was selected before the switch-frame event. | 67 | ;; Frame that was selected before the switch-frame event. |
| 68 | (defconst viper-current-frame-saved (selected-frame)) | 68 | (defvar viper-current-frame-saved (selected-frame)) |
| 69 | 69 | ||
| 70 | (defcustom viper-surrounding-word-function 'viper-surrounding-word | 70 | (defcustom viper-surrounding-word-function 'viper-surrounding-word |
| 71 | "*Function that determines what constitutes a word for clicking events. | 71 | "*Function that determines what constitutes a word for clicking events. |
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index 2d713df6ef6..d6fe9b43a64 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | (defvar viper-syntax-preference) | 41 | (defvar viper-syntax-preference) |
| 42 | (defvar viper-saved-mark) | 42 | (defvar viper-saved-mark) |
| 43 | 43 | ||
| 44 | (require 'cl) | ||
| 45 | (require 'ring) | 44 | (require 'ring) |
| 46 | 45 | ||
| 47 | (if noninteractive | 46 | (if noninteractive |
| @@ -1068,7 +1067,7 @@ | |||
| 1068 | (t key))) | 1067 | (t key))) |
| 1069 | 1068 | ||
| 1070 | ((listp key) | 1069 | ((listp key) |
| 1071 | (setq modifiers (subseq key 0 (1- (length key))) | 1070 | (setq modifiers (viper-subseq key 0 (1- (length key))) |
| 1072 | base-key (viper-seq-last-elt key) | 1071 | base-key (viper-seq-last-elt key) |
| 1073 | base-key-name (symbol-name base-key) | 1072 | base-key-name (symbol-name base-key) |
| 1074 | char-p (= (length base-key-name) 1)) | 1073 | char-p (= (length base-key-name) 1)) |
| @@ -1503,6 +1502,33 @@ This option is appropriate if you like Emacs-style words." | |||
| 1503 | )) | 1502 | )) |
| 1504 | 1503 | ||
| 1505 | 1504 | ||
| 1505 | ;; this is copied from cl-extra.el | ||
| 1506 | ;; Return the subsequence of SEQ from START to END. | ||
| 1507 | ;; If END is omitted, it defaults to the length of the sequence. | ||
| 1508 | ;; If START or END is negative, it counts from the end. | ||
| 1509 | (defun viper-subseq (seq start &optional end) | ||
| 1510 | (if (stringp seq) (substring seq start end) | ||
| 1511 | (let (len) | ||
| 1512 | (and end (< end 0) (setq end (+ end (setq len (length seq))))) | ||
| 1513 | (if (< start 0) (setq start (+ start (or len (setq len (length seq)))))) | ||
| 1514 | (cond ((listp seq) | ||
| 1515 | (if (> start 0) (setq seq (nthcdr start seq))) | ||
| 1516 | (if end | ||
| 1517 | (let ((res nil)) | ||
| 1518 | (while (>= (setq end (1- end)) start) | ||
| 1519 | (push (pop seq) res)) | ||
| 1520 | (nreverse res)) | ||
| 1521 | (copy-sequence seq))) | ||
| 1522 | (t | ||
| 1523 | (or end (setq end (or len (length seq)))) | ||
| 1524 | (let ((res (make-vector (max (- end start) 0) nil)) | ||
| 1525 | (i 0)) | ||
| 1526 | (while (< start end) | ||
| 1527 | (aset res i (aref seq start)) | ||
| 1528 | (setq i (1+ i) start (1+ start))) | ||
| 1529 | res)))))) | ||
| 1530 | |||
| 1531 | |||
| 1506 | 1532 | ||
| 1507 | (provide 'viper-util) | 1533 | (provide 'viper-util) |
| 1508 | 1534 | ||
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index fe65cb69cbb..3a95fa26835 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 8 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 9 | ;; Keywords: emulations | 9 | ;; Keywords: emulations |
| 10 | 10 | ||
| 11 | (defconst viper-version "3.11.4 of February 19, 2005" | 11 | (defconst viper-version "3.11.5 of July 8, 2005" |
| 12 | "The current version of Viper") | 12 | "The current version of Viper") |
| 13 | 13 | ||
| 14 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| @@ -320,6 +320,7 @@ | |||
| 320 | ;; end pacifier | 320 | ;; end pacifier |
| 321 | 321 | ||
| 322 | (require 'viper-init) | 322 | (require 'viper-init) |
| 323 | (require 'viper-keym) | ||
| 323 | 324 | ||
| 324 | ;; better be defined before Viper custom group. | 325 | ;; better be defined before Viper custom group. |
| 325 | (defvar viper-custom-file-name (convert-standard-filename "~/.viper") | 326 | (defvar viper-custom-file-name (convert-standard-filename "~/.viper") |
| @@ -691,6 +692,12 @@ remains buffer-local." | |||
| 691 | 692 | ||
| 692 | (setq viper-mode nil) | 693 | (setq viper-mode nil) |
| 693 | 694 | ||
| 695 | (when (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) | ||
| 696 | (setq emulation-mode-map-alists | ||
| 697 | (delq 'viper--intercept-key-maps | ||
| 698 | (delq 'viper--key-maps emulation-mode-map-alists)) | ||
| 699 | )) | ||
| 700 | |||
| 694 | (viper-delocalize-var 'viper-vi-minibuffer-minor-mode) | 701 | (viper-delocalize-var 'viper-vi-minibuffer-minor-mode) |
| 695 | (viper-delocalize-var 'viper-insert-minibuffer-minor-mode) | 702 | (viper-delocalize-var 'viper-insert-minibuffer-minor-mode) |
| 696 | (viper-delocalize-var 'viper-vi-intercept-minor-mode) | 703 | (viper-delocalize-var 'viper-vi-intercept-minor-mode) |
| @@ -874,9 +881,27 @@ remains buffer-local." | |||
| 874 | "Switch to emacs state while reading password." | 881 | "Switch to emacs state while reading password." |
| 875 | (viper-change-state-to-emacs))) | 882 | (viper-change-state-to-emacs))) |
| 876 | 883 | ||
| 884 | (defadvice self-insert-command (around viper-self-insert-ad activate) | ||
| 885 | "Ignore all self-inserting keys in the vi-state." | ||
| 886 | (if (and (eq viper-current-state 'vi-state) (interactive-p)) | ||
| 887 | (beep 1) | ||
| 888 | ad-do-it | ||
| 889 | )) | ||
| 890 | |||
| 891 | (when (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) | ||
| 892 | ;; needs to be as early as possible | ||
| 893 | (add-to-ordered-list | ||
| 894 | 'emulation-mode-map-alists 'viper--intercept-key-maps 100) | ||
| 895 | ;; needs to be after cua-mode | ||
| 896 | (add-to-ordered-list 'emulation-mode-map-alists 'viper--key-maps 500) | ||
| 897 | ) | ||
| 898 | |||
| 877 | ;; Emacs shell, ange-ftp, and comint-based modes | 899 | ;; Emacs shell, ange-ftp, and comint-based modes |
| 878 | (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint | 900 | (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint |
| 879 | 901 | ||
| 902 | (add-hook 'eshell-mode-hook | ||
| 903 | (lambda () (setq viper-auto-indent nil))) | ||
| 904 | |||
| 880 | (viper-set-emacs-state-searchstyle-macros nil 'dired-mode) ; dired | 905 | (viper-set-emacs-state-searchstyle-macros nil 'dired-mode) ; dired |
| 881 | (viper-set-emacs-state-searchstyle-macros nil 'tar-mode) ; tar | 906 | (viper-set-emacs-state-searchstyle-macros nil 'tar-mode) ; tar |
| 882 | (viper-set-emacs-state-searchstyle-macros nil 'mh-folder-mode) ; mhe | 907 | (viper-set-emacs-state-searchstyle-macros nil 'mh-folder-mode) ; mhe |
| @@ -1058,6 +1083,14 @@ remains buffer-local." | |||
| 1058 | (define-key viper-insert-intercept-map "\C-x)" nil) | 1083 | (define-key viper-insert-intercept-map "\C-x)" nil) |
| 1059 | (define-key viper-emacs-intercept-map "\C-x)" nil)) | 1084 | (define-key viper-emacs-intercept-map "\C-x)" nil)) |
| 1060 | 1085 | ||
| 1086 | (defadvice add-minor-mode (after | ||
| 1087 | viper-advice-add-minor-mode | ||
| 1088 | (toggle name &optional keymap after toggle-fun) | ||
| 1089 | activate) | ||
| 1090 | "Run viper-normalize-minor-mode-map-alist after adding a minor mode." | ||
| 1091 | (viper-normalize-minor-mode-map-alist) | ||
| 1092 | (setq-default minor-mode-map-alist minor-mode-map-alist)) | ||
| 1093 | |||
| 1061 | ;; catch frame switching event | 1094 | ;; catch frame switching event |
| 1062 | (if (viper-window-display-p) | 1095 | (if (viper-window-display-p) |
| 1063 | (if viper-xemacs-p | 1096 | (if viper-xemacs-p |
diff --git a/man/viper.texi b/man/viper.texi index 7b3a888c8ca..0156c4c6387 100644 --- a/man/viper.texi +++ b/man/viper.texi | |||
| @@ -4502,6 +4502,7 @@ kin@@isi.com (Kin Cho), | |||
| 4502 | kwzh@@gnu.org (Karl Heuer), | 4502 | kwzh@@gnu.org (Karl Heuer), |
| 4503 | lindstro@@biostat.wisc.edu (Mary Lindstrom), | 4503 | lindstro@@biostat.wisc.edu (Mary Lindstrom), |
| 4504 | lektu@@terra.es (Juanma Barranquero), | 4504 | lektu@@terra.es (Juanma Barranquero), |
| 4505 | lennart.borgman.073@@student.lu.se (Lennart Borgman), | ||
| 4505 | minakaji@@osaka.email.ne.jp (Mikio Nakajima), | 4506 | minakaji@@osaka.email.ne.jp (Mikio Nakajima), |
| 4506 | Mark.Bordas@@East.Sun.COM (Mark Bordas), | 4507 | Mark.Bordas@@East.Sun.COM (Mark Bordas), |
| 4507 | meyering@@comco.com (Jim Meyering), | 4508 | meyering@@comco.com (Jim Meyering), |
| @@ -4519,6 +4520,7 @@ sawdey@@lcse.umn.edu (Aaron Sawdey), | |||
| 4519 | simonb@@prl.philips.co.uk (Simon Blanchard), | 4520 | simonb@@prl.philips.co.uk (Simon Blanchard), |
| 4520 | spadgett1@@nc.rr.com (Samuel Padgett), | 4521 | spadgett1@@nc.rr.com (Samuel Padgett), |
| 4521 | stephen@@farrell.org (Stephen Farrell), | 4522 | stephen@@farrell.org (Stephen Farrell), |
| 4523 | storm@@cua.dk (Kim F. Storm), | ||
| 4522 | sudish@@MindSpring.COM (Sudish Joseph), | 4524 | sudish@@MindSpring.COM (Sudish Joseph), |
| 4523 | schwab@@issan.informatik.uni-dortmund.de (Andreas Schwab) | 4525 | schwab@@issan.informatik.uni-dortmund.de (Andreas Schwab) |
| 4524 | terra@@diku.dk (Morten Welinder), | 4526 | terra@@diku.dk (Morten Welinder), |