aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kifer1997-09-30 01:13:53 +0000
committerMichael Kifer1997-09-30 01:13:53 +0000
commit8e41a31c5d691dc844994f080ff21baa1863fcde (patch)
treef1874e1eeb0ad6235de22f60ca1eba2c700e07aa
parent991667f86e871f9fbae87cc696de53778a1775c0 (diff)
downloademacs-8e41a31c5d691dc844994f080ff21baa1863fcde.tar.gz
emacs-8e41a31c5d691dc844994f080ff21baa1863fcde.zip
new version
-rw-r--r--lisp/ediff-init.el96
-rw-r--r--lisp/ediff-merg.el6
-rw-r--r--lisp/ediff-util.el20
-rw-r--r--lisp/ediff.el4
-rw-r--r--lisp/emulation/viper-cmd.el43
-rw-r--r--lisp/emulation/viper-ex.el29
-rw-r--r--lisp/emulation/viper-init.el90
-rw-r--r--lisp/emulation/viper.el17
8 files changed, 208 insertions, 97 deletions
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el
index 9ca1400a8cd..184a8ae5f93 100644
--- a/lisp/ediff-init.el
+++ b/lisp/ediff-init.el
@@ -877,7 +877,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
877 :group 'ediff-highlighting) 877 :group 'ediff-highlighting)
878;; An internal variable. Ediff takes the face from here. When unhighlighting, 878;; An internal variable. Ediff takes the face from here. When unhighlighting,
879;; this variable is set to nil, then again to the appropriate face. 879;; this variable is set to nil, then again to the appropriate face.
880(defvar ediff-current-diff-face-A 'ediff-current-diff-face-A) 880(defvar ediff-current-diff-face-A 'ediff-current-diff-face-A
881 "Face for highlighting the selected difference in buffer A.
882DO NOT CHANGE this variable. Instead, use the customization
883widget to customize the actual face object `ediff-current-diff-face-A'
884this variable represents.")
881(ediff-hide-face 'ediff-current-diff-face-A) 885(ediff-hide-face 'ediff-current-diff-face-A)
882;; Until custom.el for XEmacs starts supporting :inverse-video we do this. 886;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
883;; This means that some user customization may be trashed. 887;; This means that some user customization may be trashed.
@@ -913,7 +917,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
913 :group 'ediff-highlighting) 917 :group 'ediff-highlighting)
914;; An internal variable. Ediff takes the face from here. When unhighlighting, 918;; An internal variable. Ediff takes the face from here. When unhighlighting,
915;; 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.
916(defvar ediff-current-diff-face-B 'ediff-current-diff-face-B) 920(defvar ediff-current-diff-face-B 'ediff-current-diff-face-B
921 "Face for highlighting the selected difference in buffer B.
922 this variable. Instead, use the customization
923widget to customize the actual face `ediff-current-diff-face-B'
924this variable represents.")
917(ediff-hide-face 'ediff-current-diff-face-B) 925(ediff-hide-face 'ediff-current-diff-face-B)
918;; 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.
919;; This means that some user customization may be trashed. 927;; This means that some user customization may be trashed.
@@ -947,7 +955,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
947 :group 'ediff-highlighting) 955 :group 'ediff-highlighting)
948;; An internal variable. Ediff takes the face from here. When unhighlighting, 956;; An internal variable. Ediff takes the face from here. When unhighlighting,
949;; this variable is set to nil, then again to the appropriate face. 957;; this variable is set to nil, then again to the appropriate face.
950(defvar ediff-current-diff-face-C 'ediff-current-diff-face-C) 958(defvar ediff-current-diff-face-C 'ediff-current-diff-face-C
959 "Face for highlighting the selected difference in buffer C.
960DO NOT CHANGE this variable. Instead, use the customization
961widget to customize the actual face object `ediff-current-diff-face-C'
962this variable represents.")
951(ediff-hide-face 'ediff-current-diff-face-C) 963(ediff-hide-face 'ediff-current-diff-face-C)
952;; Until custom.el for XEmacs starts supporting :inverse-video we do this. 964;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
953;; This means that some user customization may be trashed. 965;; This means that some user customization may be trashed.
@@ -973,7 +985,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
973 :group 'ediff-highlighting) 985 :group 'ediff-highlighting)
974;; An internal variable. Ediff takes the face from here. When unhighlighting, 986;; An internal variable. Ediff takes the face from here. When unhighlighting,
975;; this variable is set to nil, then again to the appropriate face. 987;; this variable is set to nil, then again to the appropriate face.
976(defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-face-Ancestor) 988(defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-face-Ancestor
989 "Face for highlighting the selected difference in buffer Ancestor.
990DO NOT CHANGE this variable. Instead, use the customization
991widget to customize the actual face object `ediff-current-diff-face-Ancestor'
992this variable represents.")
977(ediff-hide-face 'ediff-current-diff-face-Ancestor) 993(ediff-hide-face 'ediff-current-diff-face-Ancestor)
978;; Until custom.el for XEmacs starts supporting :inverse-video we do this. 994;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
979;; This means that some user customization may be trashed. 995;; This means that some user customization may be trashed.
@@ -1015,7 +1031,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
1015 :group 'ediff-highlighting) 1031 :group 'ediff-highlighting)
1016;; An internal variable. Ediff takes the face from here. When unhighlighting, 1032;; An internal variable. Ediff takes the face from here. When unhighlighting,
1017;; this variable is set to nil, then again to the appropriate face. 1033;; this variable is set to nil, then again to the appropriate face.
1018(defvar ediff-fine-diff-face-A 'ediff-fine-diff-face-A) 1034(defvar ediff-fine-diff-face-A 'ediff-fine-diff-face-A
1035 "Face for highlighting the fine differences in buffer A.
1036DO NOT CHANGE this variable. Instead, use the customization
1037widget to customize the actual face object `ediff-fine-diff-face-A'
1038this variable represents.")
1019(ediff-hide-face 'ediff-fine-diff-face-A) 1039(ediff-hide-face 'ediff-fine-diff-face-A)
1020;; Until custom.el for XEmacs starts supporting :stipple we do this. 1040;; Until custom.el for XEmacs starts supporting :stipple we do this.
1021;; This means that some use customization may be trashed. 1041;; This means that some use customization may be trashed.
@@ -1047,7 +1067,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
1047 :group 'ediff-highlighting) 1067 :group 'ediff-highlighting)
1048;; An internal variable. Ediff takes the face from here. When unhighlighting, 1068;; An internal variable. Ediff takes the face from here. When unhighlighting,
1049;; this variable is set to nil, then again to the appropriate face. 1069;; this variable is set to nil, then again to the appropriate face.
1050(defvar ediff-fine-diff-face-B 'ediff-fine-diff-face-B) 1070(defvar ediff-fine-diff-face-B 'ediff-fine-diff-face-B
1071 "Face for highlighting the fine differences in buffer B.
1072DO NOT CHANGE this variable. Instead, use the customization
1073widget to customize the actual face object `ediff-fine-diff-face-B'
1074this variable represents.")
1051(ediff-hide-face 'ediff-fine-diff-face-B) 1075(ediff-hide-face 'ediff-fine-diff-face-B)
1052;; Until custom.el for XEmacs starts supporting :stipple we do this. 1076;; Until custom.el for XEmacs starts supporting :stipple we do this.
1053;; This means that some use customization may be trashed. 1077;; This means that some use customization may be trashed.
@@ -1080,7 +1104,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
1080 :group 'ediff-highlighting) 1104 :group 'ediff-highlighting)
1081;; An internal variable. Ediff takes the face from here. When unhighlighting, 1105;; An internal variable. Ediff takes the face from here. When unhighlighting,
1082;; this variable is set to nil, then again to the appropriate face. 1106;; this variable is set to nil, then again to the appropriate face.
1083(defvar ediff-fine-diff-face-C 'ediff-fine-diff-face-C) 1107(defvar ediff-fine-diff-face-C 'ediff-fine-diff-face-C
1108 "Face for highlighting the fine differences in buffer C.
1109DO NOT CHANGE this variable. Instead, use the customization
1110widget to customize the actual face object `ediff-fine-diff-face-C'
1111this variable represents.")
1084(ediff-hide-face 'ediff-fine-diff-face-C) 1112(ediff-hide-face 'ediff-fine-diff-face-C)
1085;; Until custom.el for XEmacs starts supporting :stipple we do this. 1113;; Until custom.el for XEmacs starts supporting :stipple we do this.
1086;; This means that some use customization may be trashed. 1114;; This means that some use customization may be trashed.
@@ -1114,7 +1142,11 @@ ancestor buffer."
1114 :group 'ediff-highlighting) 1142 :group 'ediff-highlighting)
1115;; An internal variable. Ediff takes the face from here. When unhighlighting, 1143;; An internal variable. Ediff takes the face from here. When unhighlighting,
1116;; this variable is set to nil, then again to the appropriate face. 1144;; this variable is set to nil, then again to the appropriate face.
1117(defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-face-Ancestor) 1145(defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-face-Ancestor
1146 "Face for highlighting the fine differences in buffer Ancestor.
1147DO NOT CHANGE this variable. Instead, use the customization
1148widget to customize the actual face object `ediff-fine-diff-face-Ancestor'
1149this variable represents.")
1118(ediff-hide-face 'ediff-fine-diff-face-Ancestor) 1150(ediff-hide-face 'ediff-fine-diff-face-Ancestor)
1119;; Until custom.el for XEmacs starts supporting :stipple we do this. 1151;; Until custom.el for XEmacs starts supporting :stipple we do this.
1120;; This means that some use customization may be trashed. 1152;; This means that some use customization may be trashed.
@@ -1149,7 +1181,11 @@ ancestor buffer."
1149 :group 'ediff-highlighting) 1181 :group 'ediff-highlighting)
1150;; An internal variable. Ediff takes the face from here. When unhighlighting, 1182;; An internal variable. Ediff takes the face from here. When unhighlighting,
1151;; this variable is set to nil, then again to the appropriate face. 1183;; this variable is set to nil, then again to the appropriate face.
1152(defvar ediff-even-diff-face-A 'ediff-even-diff-face-A) 1184(defvar ediff-even-diff-face-A 'ediff-even-diff-face-A
1185 "Face for highlighting even-numbered non-current differences in buffer A.
1186DO NOT CHANGE this variable. Instead, use the customization
1187widget to customize the actual face object `ediff-even-diff-face-A'
1188this variable represents.")
1153(ediff-hide-face 'ediff-even-diff-face-A) 1189(ediff-hide-face 'ediff-even-diff-face-A)
1154;; Until custom.el for XEmacs starts supporting :stipple we do this. 1190;; Until custom.el for XEmacs starts supporting :stipple we do this.
1155;; This means that some use customization may be trashed. 1191;; This means that some use customization may be trashed.
@@ -1183,7 +1219,11 @@ ancestor buffer."
1183 :group 'ediff-highlighting) 1219 :group 'ediff-highlighting)
1184;; An internal variable. Ediff takes the face from here. When unhighlighting, 1220;; An internal variable. Ediff takes the face from here. When unhighlighting,
1185;; this variable is set to nil, then again to the appropriate face. 1221;; this variable is set to nil, then again to the appropriate face.
1186(defvar ediff-even-diff-face-B 'ediff-even-diff-face-B) 1222(defvar ediff-even-diff-face-B 'ediff-even-diff-face-B
1223 "Face for highlighting even-numbered non-current differences in buffer B.
1224DO NOT CHANGE this variable. Instead, use the customization
1225widget to customize the actual face object `ediff-even-diff-face-B'
1226this variable represents.")
1187(ediff-hide-face 'ediff-even-diff-face-B) 1227(ediff-hide-face 'ediff-even-diff-face-B)
1188;; Until custom.el for XEmacs starts supporting :stipple we do this. 1228;; Until custom.el for XEmacs starts supporting :stipple we do this.
1189;; This means that some use customization may be trashed. 1229;; This means that some use customization may be trashed.
@@ -1212,7 +1252,11 @@ ancestor buffer."
1212 :group 'ediff-highlighting) 1252 :group 'ediff-highlighting)
1213;; An internal variable. Ediff takes the face from here. When unhighlighting, 1253;; An internal variable. Ediff takes the face from here. When unhighlighting,
1214;; this variable is set to nil, then again to the appropriate face. 1254;; this variable is set to nil, then again to the appropriate face.
1215(defvar ediff-even-diff-face-C 'ediff-even-diff-face-C) 1255(defvar ediff-even-diff-face-C 'ediff-even-diff-face-C
1256 "Face for highlighting even-numbered non-current differences in buffer C.
1257DO NOT CHANGE this variable. Instead, use the customization
1258widget to customize the actual face object `ediff-even-diff-face-C'
1259this variable represents.")
1216(ediff-hide-face 'ediff-even-diff-face-C) 1260(ediff-hide-face 'ediff-even-diff-face-C)
1217;; Until custom.el for XEmacs starts supporting :stipple we do this. 1261;; Until custom.el for XEmacs starts supporting :stipple we do this.
1218;; This means that some use customization may be trashed. 1262;; This means that some use customization may be trashed.
@@ -1242,7 +1286,11 @@ ancestor buffer."
1242 :group 'ediff-highlighting) 1286 :group 'ediff-highlighting)
1243;; An internal variable. Ediff takes the face from here. When unhighlighting, 1287;; An internal variable. Ediff takes the face from here. When unhighlighting,
1244;; this variable is set to nil, then again to the appropriate face. 1288;; this variable is set to nil, then again to the appropriate face.
1245(defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-face-Ancestor) 1289(defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-face-Ancestor
1290 "Face for highlighting even-numbered non-current differences in buffer Ancestor.
1291DO NOT CHANGE this variable. Instead, use the customization
1292widget to customize the actual face object `ediff-even-diff-face-Ancestor'
1293this variable represents.")
1246(ediff-hide-face 'ediff-even-diff-face-Ancestor) 1294(ediff-hide-face 'ediff-even-diff-face-Ancestor)
1247;; Until custom.el for XEmacs starts supporting :stipple we do this. 1295;; Until custom.el for XEmacs starts supporting :stipple we do this.
1248;; This means that some use customization may be trashed. 1296;; This means that some use customization may be trashed.
@@ -1284,7 +1332,11 @@ ancestor buffer."
1284 :group 'ediff-highlighting) 1332 :group 'ediff-highlighting)
1285;; An internal variable. Ediff takes the face from here. When unhighlighting, 1333;; An internal variable. Ediff takes the face from here. When unhighlighting,
1286;; this variable is set to nil, then again to the appropriate face. 1334;; this variable is set to nil, then again to the appropriate face.
1287(defvar ediff-odd-diff-face-A 'ediff-odd-diff-face-A) 1335(defvar ediff-odd-diff-face-A 'ediff-odd-diff-face-A
1336 "Face for highlighting odd-numbered non-current differences in buffer A.
1337DO NOT CHANGE this variable. Instead, use the customization
1338widget to customize the actual face object `ediff-odd-diff-face-A'
1339this variable represents.")
1288(ediff-hide-face 'ediff-odd-diff-face-A) 1340(ediff-hide-face 'ediff-odd-diff-face-A)
1289;; Until custom.el for XEmacs starts supporting :stipple we do this. 1341;; Until custom.el for XEmacs starts supporting :stipple we do this.
1290;; This means that some use customization may be trashed. 1342;; This means that some use customization may be trashed.
@@ -1319,7 +1371,11 @@ ancestor buffer."
1319 :group 'ediff-highlighting) 1371 :group 'ediff-highlighting)
1320;; An internal variable. Ediff takes the face from here. When unhighlighting, 1372;; An internal variable. Ediff takes the face from here. When unhighlighting,
1321;; this variable is set to nil, then again to the appropriate face. 1373;; this variable is set to nil, then again to the appropriate face.
1322(defvar ediff-odd-diff-face-B 'ediff-odd-diff-face-B) 1374(defvar ediff-odd-diff-face-B 'ediff-odd-diff-face-B
1375 "Face for highlighting odd-numbered non-current differences in buffer B.
1376DO NOT CHANGE this variable. Instead, use the customization
1377widget to customize the actual face object `ediff-odd-diff-face-B'
1378this variable represents.")
1323(ediff-hide-face 'ediff-odd-diff-face-B) 1379(ediff-hide-face 'ediff-odd-diff-face-B)
1324;; Until custom.el for XEmacs starts supporting :stipple we do this. 1380;; Until custom.el for XEmacs starts supporting :stipple we do this.
1325;; This means that some use customization may be trashed. 1381;; This means that some use customization may be trashed.
@@ -1347,7 +1403,11 @@ ancestor buffer."
1347 :group 'ediff-highlighting) 1403 :group 'ediff-highlighting)
1348;; An internal variable. Ediff takes the face from here. When unhighlighting, 1404;; An internal variable. Ediff takes the face from here. When unhighlighting,
1349;; this variable is set to nil, then again to the appropriate face. 1405;; this variable is set to nil, then again to the appropriate face.
1350(defvar ediff-odd-diff-face-C 'ediff-odd-diff-face-C) 1406(defvar ediff-odd-diff-face-C 'ediff-odd-diff-face-C
1407 "Face for highlighting odd-numbered non-current differences in buffer C.
1408DO NOT CHANGE this variable. Instead, use the customization
1409widget to customize the actual face object `ediff-odd-diff-face-C'
1410this variable represents.")
1351(ediff-hide-face 'ediff-odd-diff-face-C) 1411(ediff-hide-face 'ediff-odd-diff-face-C)
1352;; Until custom.el for XEmacs starts supporting :stipple we do this. 1412;; Until custom.el for XEmacs starts supporting :stipple we do this.
1353;; This means that some use customization may be trashed. 1413;; This means that some use customization may be trashed.
@@ -1375,7 +1435,11 @@ ancestor buffer."
1375 :group 'ediff-highlighting) 1435 :group 'ediff-highlighting)
1376;; An internal variable. Ediff takes the face from here. When unhighlighting, 1436;; An internal variable. Ediff takes the face from here. When unhighlighting,
1377;; this variable is set to nil, then again to the appropriate face. 1437;; this variable is set to nil, then again to the appropriate face.
1378(defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-face-Ancestor) 1438(defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-face-Ancestor
1439 "Face for highlighting odd-numbered non-current differences in buffer Ancestor.
1440DO NOT CHANGE this variable. Instead, use the customization
1441widget to customize the actual face object `ediff-odd-diff-face-Ancestor'
1442this variable represents.")
1379(ediff-hide-face 'ediff-odd-diff-face-Ancestor) 1443(ediff-hide-face 'ediff-odd-diff-face-Ancestor)
1380;; Until custom.el for XEmacs starts supporting :stipple we do this. 1444;; Until custom.el for XEmacs starts supporting :stipple we do this.
1381;; This means that some use customization may be trashed. 1445;; This means that some use customization may be trashed.
diff --git a/lisp/ediff-merg.el b/lisp/ediff-merg.el
index 142d9fc9ac2..f77d17ea7d5 100644
--- a/lisp/ediff-merg.el
+++ b/lisp/ediff-merg.el
@@ -81,6 +81,12 @@ STRING3
81This means that regions that have status prefer-A or prefer-B will be 81This means that regions that have status prefer-A or prefer-B will be
82skiped over. Nil means show all regions.") 82skiped over. Nil means show all regions.")
83 83
84;; If ediff-show-clashes-only, check if there is no clash between the ancestor
85;; and one of the variants.
86(defsubst ediff-merge-region-is-non-clash (n)
87 (and ediff-show-clashes-only
88 (string-match "prefer" (or (ediff-get-state-of-merge n) ""))))
89
84 90
85(defsubst ediff-get-combined-region (n) 91(defsubst ediff-get-combined-region (n)
86 (concat (nth 0 ediff-combination-pattern) "\n" 92 (concat (nth 0 ediff-combination-pattern) "\n"
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 4d0dc828c7d..0887bec863e 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -1586,20 +1586,20 @@ With a prefix argument, go forward that many differences."
1586 (if (< ediff-current-difference ediff-number-of-differences) 1586 (if (< ediff-current-difference ediff-number-of-differences)
1587 (let ((n (min ediff-number-of-differences 1587 (let ((n (min ediff-number-of-differences
1588 (+ ediff-current-difference arg))) 1588 (+ ediff-current-difference arg)))
1589 regexp-skip) 1589 non-clash-skip regexp-skip)
1590 1590
1591 (ediff-visible-region) 1591 (ediff-visible-region)
1592 (or (>= n ediff-number-of-differences) 1592 (or (>= n ediff-number-of-differences)
1593 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) 1593 (setq regexp-skip (funcall ediff-skip-diff-region-function n))
1594 ;; this won't exec if regexp-skip is t
1595 (setq non-clash-skip (ediff-merge-region-is-non-clash n))
1594 (ediff-install-fine-diff-if-necessary n)) 1596 (ediff-install-fine-diff-if-necessary n))
1595 (while (and (< n ediff-number-of-differences) 1597 (while (and (< n ediff-number-of-differences)
1596 (or 1598 (or
1597 ;; regexp skip 1599 ;; regexp skip
1598 regexp-skip 1600 regexp-skip
1599 ;; skip clashes, if necessary 1601 ;; skip clashes, if necessary
1600 (and ediff-show-clashes-only 1602 non-clash-skip
1601 (string-match "prefer"
1602 (or (ediff-get-state-of-merge n) "")))
1603 ;; skip difference regions that differ in white space 1603 ;; skip difference regions that differ in white space
1604 (and ediff-ignore-similar-regions 1604 (and ediff-ignore-similar-regions
1605 (eq (ediff-no-fine-diffs-p n) t)))) 1605 (eq (ediff-no-fine-diffs-p n) t))))
@@ -1608,6 +1608,8 @@ With a prefix argument, go forward that many differences."
1608 (message "Skipped over region %d and counting ..." n)) 1608 (message "Skipped over region %d and counting ..." n))
1609 (or (>= n ediff-number-of-differences) 1609 (or (>= n ediff-number-of-differences)
1610 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) 1610 (setq regexp-skip (funcall ediff-skip-diff-region-function n))
1611 ;; this won't exec if regexp-skip is t
1612 (setq non-clash-skip (ediff-merge-region-is-non-clash n))
1611 (ediff-install-fine-diff-if-necessary n)) 1613 (ediff-install-fine-diff-if-necessary n))
1612 ) 1614 )
1613 (message "") 1615 (message "")
@@ -1623,20 +1625,20 @@ With a prefix argument, go back that many differences."
1623 (ediff-barf-if-not-control-buffer) 1625 (ediff-barf-if-not-control-buffer)
1624 (if (> ediff-current-difference -1) 1626 (if (> ediff-current-difference -1)
1625 (let ((n (max -1 (- ediff-current-difference arg))) 1627 (let ((n (max -1 (- ediff-current-difference arg)))
1626 regexp-skip) 1628 non-clash-skip regexp-skip)
1627 1629
1628 (ediff-visible-region) 1630 (ediff-visible-region)
1629 (or (< n 0) 1631 (or (< n 0)
1630 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) 1632 (setq regexp-skip (funcall ediff-skip-diff-region-function n))
1633 ;; this won't exec if regexp-skip is t
1634 (setq non-clash-skip (ediff-merge-region-is-non-clash n))
1631 (ediff-install-fine-diff-if-necessary n)) 1635 (ediff-install-fine-diff-if-necessary n))
1632 (while (and (> n -1) 1636 (while (and (> n -1)
1633 (or 1637 (or
1634 ;; regexp skip 1638 ;; regexp skip
1635 regexp-skip 1639 regexp-skip
1636 ;; skip clashes, if necessary 1640 ;; skip clashes, if necessary
1637 (and ediff-show-clashes-only 1641 non-clash-skip
1638 (string-match "prefer"
1639 (or (ediff-get-state-of-merge n) "")))
1640 ;; skip difference regions that differ in white space 1642 ;; skip difference regions that differ in white space
1641 (and ediff-ignore-similar-regions 1643 (and ediff-ignore-similar-regions
1642 (eq (ediff-no-fine-diffs-p n) t)))) 1644 (eq (ediff-no-fine-diffs-p n) t))))
@@ -1645,6 +1647,8 @@ With a prefix argument, go back that many differences."
1645 (setq n (1- n)) 1647 (setq n (1- n))
1646 (or (< n 0) 1648 (or (< n 0)
1647 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) 1649 (setq regexp-skip (funcall ediff-skip-diff-region-function n))
1650 ;; this won't exec if regexp-skip is t
1651 (setq non-clash-skip (ediff-merge-region-is-non-clash n))
1648 (ediff-install-fine-diff-if-necessary n)) 1652 (ediff-install-fine-diff-if-necessary n))
1649 ) 1653 )
1650 (message "") 1654 (message "")
diff --git a/lisp/ediff.el b/lisp/ediff.el
index 2cbbc90164b..829a6bc68cd 100644
--- a/lisp/ediff.el
+++ b/lisp/ediff.el
@@ -6,8 +6,8 @@
6;; Created: February 2, 1994 6;; Created: February 2, 1994
7;; Keywords: comparing, merging, patching, version control. 7;; Keywords: comparing, merging, patching, version control.
8 8
9(defconst ediff-version "2.67" "The current version of Ediff") 9(defconst ediff-version "2.671" "The current version of Ediff")
10(defconst ediff-date "September 3, 1997" "Date of last update") 10(defconst ediff-date "September 23, 1997" "Date of last update")
11 11
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 53f12d7e34d..51de44bee54 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1814,7 +1814,7 @@ suffixes, the user is asked to confirm.
1814 1814
1815To turn this feature off, set this variable to nil." 1815To turn this feature off, set this variable to nil."
1816 :type '(repeat string) 1816 :type '(repeat string)
1817 :group 'viper) 1817 :group 'viper-misc)
1818 1818
1819 1819
1820;; Try to add a suitable suffix to files whose name ends with a `.' 1820;; Try to add a suitable suffix to files whose name ends with a `.'
@@ -3230,7 +3230,8 @@ controlled by the sign of prefix numeric value."
3230(defun viper-forward-sentence (arg) 3230(defun viper-forward-sentence (arg)
3231 "Forward sentence." 3231 "Forward sentence."
3232 (interactive "P") 3232 (interactive "P")
3233 (push-mark nil t) 3233 (or (eq last-command this-command)
3234 (push-mark nil t))
3234 (let ((val (viper-p-val arg)) 3235 (let ((val (viper-p-val arg))
3235 (com (viper-getcom arg))) 3236 (com (viper-getcom arg)))
3236 (if com (viper-move-marker-locally 'viper-com-point (point))) 3237 (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3240,7 +3241,8 @@ controlled by the sign of prefix numeric value."
3240(defun viper-backward-sentence (arg) 3241(defun viper-backward-sentence (arg)
3241 "Backward sentence." 3242 "Backward sentence."
3242 (interactive "P") 3243 (interactive "P")
3243 (push-mark nil t) 3244 (or (eq last-command this-command)
3245 (push-mark nil t))
3244 (let ((val (viper-p-val arg)) 3246 (let ((val (viper-p-val arg))
3245 (com (viper-getcom arg))) 3247 (com (viper-getcom arg)))
3246 (if com (viper-move-marker-locally 'viper-com-point (point))) 3248 (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3250,7 +3252,8 @@ controlled by the sign of prefix numeric value."
3250(defun viper-forward-paragraph (arg) 3252(defun viper-forward-paragraph (arg)
3251 "Forward paragraph." 3253 "Forward paragraph."
3252 (interactive "P") 3254 (interactive "P")
3253 (push-mark nil t) 3255 (or (eq last-command this-command)
3256 (push-mark nil t))
3254 (let ((val (viper-p-val arg)) 3257 (let ((val (viper-p-val arg))
3255 (com (viper-getCom arg))) 3258 (com (viper-getCom arg)))
3256 (if com (viper-move-marker-locally 'viper-com-point (point))) 3259 (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3263,7 +3266,8 @@ controlled by the sign of prefix numeric value."
3263(defun viper-backward-paragraph (arg) 3266(defun viper-backward-paragraph (arg)
3264 "Backward paragraph." 3267 "Backward paragraph."
3265 (interactive "P") 3268 (interactive "P")
3266 (push-mark nil t) 3269 (or (eq last-command this-command)
3270 (push-mark nil t))
3267 (let ((val (viper-p-val arg)) 3271 (let ((val (viper-p-val arg))
3268 (com (viper-getCom arg))) 3272 (com (viper-getCom arg)))
3269 (if com (viper-move-marker-locally 'viper-com-point (point))) 3273 (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3274,8 +3278,7 @@ controlled by the sign of prefix numeric value."
3274 (viper-execute-com 'viper-backward-paragraph nil com) 3278 (viper-execute-com 'viper-backward-paragraph nil com)
3275 (backward-char 1))))) 3279 (backward-char 1)))))
3276 3280
3277;; should be mode-specific etc. 3281;; should be mode-specific
3278
3279(defun viper-prev-heading (arg) 3282(defun viper-prev-heading (arg)
3280 (interactive "P") 3283 (interactive "P")
3281 (let ((val (viper-p-val arg)) 3284 (let ((val (viper-p-val arg))
@@ -4288,13 +4291,10 @@ One can use `` and '' to temporarily jump 1 step back."
4288 (view-register (downcase reg))) 4291 (view-register (downcase reg)))
4289 ((viper-valid-register reg '(digit)) 4292 ((viper-valid-register reg '(digit))
4290 (let ((text (current-kill (- reg ?1) 'do-not-rotate))) 4293 (let ((text (current-kill (- reg ?1) 'do-not-rotate)))
4291 (save-excursion 4294 (with-output-to-temp-buffer " *viper-info*"
4292 (set-buffer (get-buffer-create "*Output*")) 4295 (princ (format "Register %c contains the string:\n" reg))
4293 (delete-region (point-min) (point-max)) 4296 (princ text))
4294 (insert (format "Register %c contains the string:\n" reg)) 4297 ))
4295 (insert text)
4296 (goto-char (point-min)))
4297 (display-buffer "*Output*")))
4298 ((= ?\] reg) 4298 ((= ?\] reg)
4299 (viper-next-heading arg)) 4299 (viper-next-heading arg))
4300 (t (error 4300 (t (error
@@ -4310,14 +4310,12 @@ One can use `` and '' to temporarily jump 1 step back."
4310 (viper-heading-end arg)) 4310 (viper-heading-end arg))
4311 ((viper-valid-register reg '(letter)) 4311 ((viper-valid-register reg '(letter))
4312 (let* ((val (get-register (1+ (- reg ?a)))) 4312 (let* ((val (get-register (1+ (- reg ?a))))
4313 (buf (if (not val) 4313 (buf (if (not (markerp val))
4314 (error viper-EmptyTextmarker reg) 4314 (error viper-EmptyTextmarker reg)
4315 (marker-buffer val))) 4315 (marker-buffer val)))
4316 (pos (marker-position val)) 4316 (pos (marker-position val))
4317 line-no text (s pos) (e pos)) 4317 line-no text (s pos) (e pos))
4318 (save-excursion 4318 (with-output-to-temp-buffer " *viper-info*"
4319 (set-buffer (get-buffer-create "*Output*"))
4320 (delete-region (point-min) (point-max))
4321 (if (and buf pos) 4319 (if (and buf pos)
4322 (progn 4320 (progn
4323 (save-excursion 4321 (save-excursion
@@ -4339,15 +4337,14 @@ One can use `` and '' to temporarily jump 1 step back."
4339 (setq text (format "%s<%c>%s" 4337 (setq text (format "%s<%c>%s"
4340 (substring text 0 (- pos s)) 4338 (substring text 0 (- pos s))
4341 reg (substring text (- pos s))))) 4339 reg (substring text (- pos s)))))
4342 (insert 4340 (princ
4343 (format 4341 (format
4344 "Textmarker `%c' is in buffer `%s' at line %d.\n" 4342 "Textmarker `%c' is in buffer `%s' at line %d.\n"
4345 reg (buffer-name buf) line-no)) 4343 reg (buffer-name buf) line-no))
4346 (insert (format "Here is some text around %c:\n\n %s" 4344 (princ (format "Here is some text around %c:\n\n %s"
4347 reg text))) 4345 reg text)))
4348 (insert (format viper-EmptyTextmarker reg))) 4346 (princ (format viper-EmptyTextmarker reg))))
4349 (goto-char (point-min))) 4347 ))
4350 (display-buffer "*Output*")))
4351 (t (error viper-InvalidTextmarker reg))))) 4348 (t (error viper-InvalidTextmarker reg)))))
4352 4349
4353 4350
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 4d3b8fd0921..a08b75ce4e6 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -107,8 +107,10 @@
107;; List of addresses passed to Ex command 107;; List of addresses passed to Ex command
108(defvar ex-addresses nil) 108(defvar ex-addresses nil)
109 109
110;; It seems that this flag is used only for `#', `print', and `list', which 110;; This flag is supposed to be set only by `#', `print', and `list',
111;; aren't implemented. Check later. 111;; none of which is implemented. So, it and the pices of the code it
112;; controls are dead weight. We keep it just in case this might be
113;; needed in the future.
112(defvar ex-flag nil) 114(defvar ex-flag nil)
113 115
114;; "buffer" where Ex commands keep deleted data. 116;; "buffer" where Ex commands keep deleted data.
@@ -1134,16 +1136,16 @@ reversed."
1134 (copy-region-as-kill (point) (mark t))) 1136 (copy-region-as-kill (point) (mark t)))
1135 (if ex-flag 1137 (if ex-flag
1136 (progn 1138 (progn
1137 (with-output-to-temp-buffer "*copy text*" 1139 (with-output-to-temp-buffer " *copy text*"
1138 (princ 1140 (princ
1139 (if (or del-flag ex-g-flag ex-g-variant) 1141 (if (or del-flag ex-g-flag ex-g-variant)
1140 (current-kill 0) 1142 (current-kill 0)
1141 (buffer-substring (point) (mark t))))) 1143 (buffer-substring (point) (mark t)))))
1142 (condition-case nil 1144 (condition-case nil
1143 (progn 1145 (progn
1144 (read-string "[Hit return to continue] ") 1146 (read-string "[Hit return to confirm] ")
1145 (save-excursion (kill-buffer "*copy text*"))) 1147 (save-excursion (kill-buffer " *copy text*")))
1146 (quit (save-excursion (kill-buffer "*copy text*")) 1148 (quit (save-excursion (kill-buffer " *copy text*"))
1147 (signal 'quit nil)))))) 1149 (signal 'quit nil))))))
1148 (if (= address 0) 1150 (if (= address 0)
1149 (goto-char (point-min)) 1151 (goto-char (point-min))
@@ -1172,7 +1174,7 @@ reversed."
1172 (with-output-to-temp-buffer " *delete text*" 1174 (with-output-to-temp-buffer " *delete text*"
1173 (princ (buffer-substring (point) (mark t)))) 1175 (princ (buffer-substring (point) (mark t))))
1174 (condition-case nil 1176 (condition-case nil
1175 (read-string "[Hit return to continue] ") 1177 (read-string "[Hit return to confirm] ")
1176 (quit 1178 (quit
1177 (save-excursion (kill-buffer " *delete text*")) 1179 (save-excursion (kill-buffer " *delete text*"))
1178 (error ""))) 1180 (error "")))
@@ -1349,14 +1351,14 @@ reversed."
1349 (if ex-flag 1351 (if ex-flag
1350 ;; show text to be joined and ask for confirmation 1352 ;; show text to be joined and ask for confirmation
1351 (progn 1353 (progn
1352 (with-output-to-temp-buffer " *text*" 1354 (with-output-to-temp-buffer " *join text*"
1353 (princ (buffer-substring (point) (mark t)))) 1355 (princ (buffer-substring (point) (mark t))))
1354 (condition-case nil 1356 (condition-case nil
1355 (progn 1357 (progn
1356 (read-string "[Hit return to continue] ") 1358 (read-string "[Hit return to confirm] ")
1357 (ex-line-subr com (point) (mark t))) 1359 (ex-line-subr com (point) (mark t)))
1358 (quit (ding))) 1360 (quit (ding)))
1359 (save-excursion (kill-buffer " *text*"))) 1361 (save-excursion (kill-buffer " *join text*")))
1360 (ex-line-subr com (point) (mark t))) 1362 (ex-line-subr com (point) (mark t)))
1361 (setq point (point))) 1363 (setq point (point)))
1362 (goto-char (1- point)) 1364 (goto-char (1- point))
@@ -2115,10 +2117,9 @@ Please contact your system administrator. "
2115 (message (concat file " " info)) 2117 (message (concat file " " info))
2116 (save-window-excursion 2118 (save-window-excursion
2117 (with-output-to-temp-buffer " *viper-info*" 2119 (with-output-to-temp-buffer " *viper-info*"
2118 (princ (concat "\n" 2120 (princ (concat "\n" file "\n\n\t" info "\n\n")))
2119 file "\n\n\t" info 2121 (let ((inhibit-quit t))
2120 "\n\n\nPress any key to continue...\n\n"))) 2122 (viper-set-unread-command-events (viper-read-event)))
2121 (viper-read-event)
2122 (kill-buffer " *viper-info*"))) 2123 (kill-buffer " *viper-info*")))
2123 )) 2124 ))
2124 2125
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 4da276c881d..bd1bddfebb0 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -51,16 +51,17 @@
51(defun viper-window-display-p () 51(defun viper-window-display-p ()
52 (and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc))))) 52 (and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc)))))
53 53
54(defcustom viper-ms-style-os-p (memq system-type '(ms-dos windows-nt windows-95)) 54(defcustom viper-ms-style-os-p (memq system-type
55 '(ms-dos windows-nt windows-95))
55 "Tells if Emacs is running under an MS-style OS: ms-dos, windows-nt, W95." 56 "Tells if Emacs is running under an MS-style OS: ms-dos, windows-nt, W95."
56 :type 'boolean 57 :type 'boolean
57 :tag "Is it Microsoft-made OS?" 58 :tag "Is it Microsoft-made OS?"
58 :group 'viper) 59 :group 'viper-misc)
59(defcustom viper-vms-os-p (memq system-type '(vax-vms axp-vms)) 60(defcustom viper-vms-os-p (memq system-type '(vax-vms axp-vms))
60 "Tells if Emacs is running under VMS." 61 "Tells if Emacs is running under VMS."
61 :type 'boolean 62 :type 'boolean
62 :tag "Is it VMS?" 63 :tag "Is it VMS?"
63 :group 'viper) 64 :group 'viper-misc)
64 65
65(defcustom viper-force-faces nil 66(defcustom viper-force-faces nil
66 "If t, Viper will think that it is running on a display that supports faces. 67 "If t, Viper will think that it is running on a display that supports faces.
@@ -68,7 +69,7 @@ This is provided as a temporary relief for users of graphics-capable terminals
68that Viper doesn't know about. 69that Viper doesn't know about.
69In all likelihood, you don't need to bother with this setting." 70In all likelihood, you don't need to bother with this setting."
70 :type 'boolean 71 :type 'boolean
71 :group 'viper) 72 :group 'viper-highlighting)
72 73
73(defun viper-has-face-support-p () 74(defun viper-has-face-support-p ()
74 (cond ((viper-window-display-p)) 75 (cond ((viper-window-display-p))
@@ -470,7 +471,7 @@ color displays. By default, the delimiters are used only on TTYs."
470This is a list where Viper keeps the history of previously inserted pieces of 471This is a list where Viper keeps the history of previously inserted pieces of
471text." 472text."
472 :type 'integer 473 :type 'integer
473 :group 'viper) 474 :group 'viper-misc)
474;; The insertion ring. 475;; The insertion ring.
475(defvar viper-insertion-ring nil) 476(defvar viper-insertion-ring nil)
476;; This is temp insertion ring. Used to do rotation for display purposes. 477;; This is temp insertion ring. Used to do rotation for display purposes.
@@ -481,7 +482,7 @@ text."
481(defcustom viper-command-ring-size 14 482(defcustom viper-command-ring-size 14
482 "The size of history of Vi commands repeatable with dot." 483 "The size of history of Vi commands repeatable with dot."
483 :type 'integer 484 :type 'integer
484 :group 'viper) 485 :group 'viper-misc)
485;; The command ring. 486;; The command ring.
486(defvar viper-command-ring nil) 487(defvar viper-command-ring nil)
487;; This is temp command ring. Used to do rotation for display purposes. 488;; This is temp command ring. Used to do rotation for display purposes.
@@ -494,7 +495,7 @@ text."
494Setting this too high may slow down your typing. Setting this value too low 495Setting this too high may slow down your typing. Setting this value too low
495will make it hard to use Vi-stile timeout macros." 496will make it hard to use Vi-stile timeout macros."
496 :type 'integer 497 :type 'integer
497 :group 'viper) 498 :group 'viper-misc)
498 499
499(defcustom viper-ESC-keyseq-timeout (if (viper-window-display-p) 500(defcustom viper-ESC-keyseq-timeout (if (viper-window-display-p)
500 0 viper-fast-keyseq-timeout) 501 0 viper-fast-keyseq-timeout)
@@ -503,7 +504,7 @@ Setting this too high may slow down switching from insert to vi state. Setting
503this value too low will make it impossible to use function keys in insert mode 504this value too low will make it impossible to use function keys in insert mode
504on a dumb terminal." 505on a dumb terminal."
505 :type 'integer 506 :type 'integer
506 :group 'viper) 507 :group 'viper-misc)
507 508
508;; Modes and related variables 509;; Modes and related variables
509 510
@@ -612,6 +613,11 @@ to a new place after repeating previous Vi command."
612 613
613;;; Variables for Moves and Searches 614;;; Variables for Moves and Searches
614 615
616(defgroup viper-search nil
617 "Variables that define the search and query-replace behavior of Viper."
618 :prefix "viper-"
619 :group 'viper)
620
615;; For use by `;' command. 621;; For use by `;' command.
616(defvar viper-f-char nil) 622(defvar viper-f-char nil)
617 623
@@ -638,13 +644,13 @@ to a new place after repeating previous Vi command."
638(defcustom viper-case-fold-search nil 644(defcustom viper-case-fold-search nil
639 "*If not nil, search ignores cases." 645 "*If not nil, search ignores cases."
640 :type 'boolean 646 :type 'boolean
641 :group 'viper) 647 :group 'viper-search)
642 648
643(defcustom viper-re-search t 649(defcustom viper-re-search t
644 "*If not nil, search is regexp search, otherwise vanilla search." 650 "*If not nil, search is regexp search, otherwise vanilla search."
645 :type 'boolean 651 :type 'boolean
646 :tag "Regexp Search" 652 :tag "Regexp Search"
647 :group 'viper) 653 :group 'viper-search)
648 654
649(defcustom viper-search-scroll-threshold 2 655(defcustom viper-search-scroll-threshold 2
650 "*If search lands within this threshnold from the window top/bottom, 656 "*If search lands within this threshnold from the window top/bottom,
@@ -652,19 +658,19 @@ the window will be scrolled up or down appropriately, to reveal context.
652If you want Viper search to behave as usual in Vi, set this variable to a 658If you want Viper search to behave as usual in Vi, set this variable to a
653negative number." 659negative number."
654 :type 'boolean 660 :type 'boolean
655 :group 'viper) 661 :group 'viper-search)
656 662
657(defcustom viper-re-query-replace t 663(defcustom viper-re-query-replace t
658 "*If t then do regexp replace, if nil then do string replace." 664 "*If t then do regexp replace, if nil then do string replace."
659 :type 'boolean 665 :type 'boolean
660 :tag "Regexp Query Replace" 666 :tag "Regexp Query Replace"
661 :group 'viper) 667 :group 'viper-search)
662 668
663(defcustom viper-re-replace t 669(defcustom viper-re-replace t
664 "*If t, do regexp replace. nil means do string replace." 670 "*If t, do regexp replace. nil means do string replace."
665 :type 'boolean 671 :type 'boolean
666 :tag "Regexp Replace" 672 :tag "Regexp Replace"
667 :group 'viper) 673 :group 'viper-search)
668 674
669(defcustom viper-parse-sexp-ignore-comments t 675(defcustom viper-parse-sexp-ignore-comments t
670 "*If t, `%' ignores the parentheses that occur inside comments." 676 "*If t, `%' ignores the parentheses that occur inside comments."
@@ -707,20 +713,20 @@ If nil, the cursor will move backwards without deleting anything."
707(defcustom viper-buffer-search-char nil 713(defcustom viper-buffer-search-char nil
708 "*Key used for buffer-searching. Must be a character type, e.g., ?g." 714 "*Key used for buffer-searching. Must be a character type, e.g., ?g."
709 :type '(choice (const nil) character) 715 :type '(choice (const nil) character)
710 :group 'viper) 716 :group 'viper-search)
711 717
712(defcustom viper-search-wrap-around-t t 718(defcustom viper-search-wrap-around-t t
713 "*If t, search wraps around." 719 "*If t, search wraps around."
714 :type 'boolean 720 :type 'boolean
715 :tag "Search Wraps Around" 721 :tag "Search Wraps Around"
716 :group 'viper) 722 :group 'viper-search)
717 723
718(viper-deflocalvar viper-related-files-and-buffers-ring nil "") 724(viper-deflocalvar viper-related-files-and-buffers-ring nil "")
719(defcustom viper-related-files-and-buffers-ring nil 725(defcustom viper-related-files-and-buffers-ring nil
720 "*List of file and buffer names that are considered to be related to the current buffer. 726 "*List of file and buffer names that are considered to be related to the current buffer.
721Related buffers can be cycled through via :R and :P commands." 727Related buffers can be cycled through via :R and :P commands."
722 :type 'boolean 728 :type 'boolean
723 :group 'viper) 729 :group 'viper-misc)
724(put 'viper-related-files-and-buffers-ring 'permanent-local t) 730(put 'viper-related-files-and-buffers-ring 'permanent-local t)
725 731
726;; Used to find out if we are done with searching the current buffer. 732;; Used to find out if we are done with searching the current buffer.
@@ -826,7 +832,11 @@ Related buffers can be cycled through via :R and :P commands."
826 "*Face used to flash out the search pattern." 832 "*Face used to flash out the search pattern."
827 :group 'viper-highlighting) 833 :group 'viper-highlighting)
828;; An internal variable. Viper takes the face from here. 834;; An internal variable. Viper takes the face from here.
829(defvar viper-search-face 'viper-search-face) 835(defvar viper-search-face 'viper-search-face
836 "Face used to flash out the search pattern.
837DO NOT CHANGE this variable. Instead, use the customization widget
838to customize the actual face object `viper-search-face'
839this variable represents.")
830(viper-hide-face 'viper-search-face) 840(viper-hide-face 'viper-search-face)
831 841
832;;(defvar viper-replace-overlay-face 842;;(defvar viper-replace-overlay-face
@@ -852,7 +862,11 @@ Related buffers can be cycled through via :R and :P commands."
852 "*Face for highlighting replace regions on a window display." 862 "*Face for highlighting replace regions on a window display."
853 :group 'viper-highlighting) 863 :group 'viper-highlighting)
854;; An internal variable. Viper takes the face from here. 864;; An internal variable. Viper takes the face from here.
855(defvar viper-replace-overlay-face 'viper-replace-overlay-face) 865(defvar viper-replace-overlay-face 'viper-replace-overlay-face
866 "Face for highlighting replace regions on a window display.
867DO NOT CHANGE this variable. Instead, use the customization widget
868to customize the actual face object `viper-replace-overlay-face'
869this variable represents.")
856(viper-hide-face 'viper-replace-overlay-face) 870(viper-hide-face 'viper-replace-overlay-face)
857 871
858;;(defvar viper-minibuffer-emacs-face 872;;(defvar viper-minibuffer-emacs-face
@@ -887,7 +901,11 @@ Related buffers can be cycled through via :R and :P commands."
887 "Face used in the Minibuffer when it is in Emacs state." 901 "Face used in the Minibuffer when it is in Emacs state."
888 :group 'viper-highlighting) 902 :group 'viper-highlighting)
889;; An internal variable. Viper takes the face from here. 903;; An internal variable. Viper takes the face from here.
890(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face) 904(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face
905 "Face used in the Minibuffer when it is in Emacs state.
906DO NOT CHANGE this variable. Instead, use the customization widget
907to customize the actual face object `viper-minibuffer-emacs-face'
908this variable represents.")
891(viper-hide-face 'viper-minibuffer-emacs-face) 909(viper-hide-face 'viper-minibuffer-emacs-face)
892 910
893;;(defvar viper-minibuffer-insert-face 911;;(defvar viper-minibuffer-insert-face
@@ -920,7 +938,11 @@ Related buffers can be cycled through via :R and :P commands."
920 "Face used in the Minibuffer when it is in Insert state." 938 "Face used in the Minibuffer when it is in Insert state."
921 :group 'viper-highlighting) 939 :group 'viper-highlighting)
922;; An internal variable. Viper takes the face from here. 940;; An internal variable. Viper takes the face from here.
923(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face) 941(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face
942 "Face used in the Minibuffer when it is in Insert state.
943DO NOT CHANGE this variable. Instead, use the customization widget
944to customize the actual face object `viper-minibuffer-insert-face'
945this variable represents.")
924(viper-hide-face 'viper-minibuffer-insert-face) 946(viper-hide-face 'viper-minibuffer-insert-face)
925 947
926;;(defvar viper-minibuffer-vi-face 948;;(defvar viper-minibuffer-vi-face
@@ -945,11 +967,16 @@ Related buffers can be cycled through via :R and :P commands."
945 "Face used in the Minibuffer when it is in Vi state." 967 "Face used in the Minibuffer when it is in Vi state."
946 :group 'viper-highlighting) 968 :group 'viper-highlighting)
947;; An internal variable. Viper takes the face from here. 969;; An internal variable. Viper takes the face from here.
948(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face) 970(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face
971 "Face used in the Minibuffer when it is in Vi state.
972DO NOT CHANGE this variable. Instead, use the customization widget
973to customize the actual face object `viper-minibuffer-vi-face'
974this variable represents.")
949(viper-hide-face 'viper-minibuffer-vi-face) 975(viper-hide-face 'viper-minibuffer-vi-face)
950 976
951;; the current face to be used in the minibuffer 977;; the current face to be used in the minibuffer
952(viper-deflocalvar viper-minibuffer-current-face viper-minibuffer-emacs-face "") 978(viper-deflocalvar
979 viper-minibuffer-current-face viper-minibuffer-emacs-face "")
953 980
954 981
955;;; Miscellaneous 982;;; Miscellaneous
@@ -960,12 +987,12 @@ Related buffers can be cycled through via :R and :P commands."
960(defcustom viper-spell-function 'ispell-region 987(defcustom viper-spell-function 'ispell-region
961 "Spell function used by #s<move> command to spell." 988 "Spell function used by #s<move> command to spell."
962 :type 'function 989 :type 'function
963 :group 'viper) 990 :group 'viper-misc)
964 991
965(defcustom viper-tags-file-name "TAGS" 992(defcustom viper-tags-file-name "TAGS"
966 "The tags file used by Viper." 993 "The tags file used by Viper."
967 :type 'string 994 :type 'string
968 :group 'viper) 995 :group 'viper-misc)
969 996
970;; Minibuffer 997;; Minibuffer
971 998
@@ -995,27 +1022,32 @@ Should be set in `~/.viper' file."
995 "Mode line tag identifying the Replace mode of Viper.") 1022 "Mode line tag identifying the Replace mode of Viper.")
996 1023
997 1024
1025(defgroup viper-hooks nil
1026 "Viper hooks."
1027 :prefix "viper-"
1028 :group 'viper)
1029
998(defcustom viper-vi-state-hook nil 1030(defcustom viper-vi-state-hook nil
999 "*Hooks run just before the switch to Vi mode is completed." 1031 "*Hooks run just before the switch to Vi mode is completed."
1000 :type 'hook 1032 :type 'hook
1001 :group 'viper) 1033 :group 'viper-hooks)
1002(defcustom viper-insert-state-hook nil 1034(defcustom viper-insert-state-hook nil
1003 "*Hooks run just before the switch to Insert mode is completed." 1035 "*Hooks run just before the switch to Insert mode is completed."
1004 :type 'hook 1036 :type 'hook
1005 :group 'viper) 1037 :group 'viper-hooks)
1006(defcustom viper-replace-state-hook nil 1038(defcustom viper-replace-state-hook nil
1007 "*Hooks run just before the switch to Replace mode is completed." 1039 "*Hooks run just before the switch to Replace mode is completed."
1008 :type 'hook 1040 :type 'hook
1009 :group 'viper) 1041 :group 'viper-hooks)
1010(defcustom viper-emacs-state-hook nil 1042(defcustom viper-emacs-state-hook nil
1011 "*Hooks run just before the switch to Emacs mode is completed." 1043 "*Hooks run just before the switch to Emacs mode is completed."
1012 :type 'hook 1044 :type 'hook
1013 :group 'viper) 1045 :group 'viper-hooks)
1014 1046
1015(defcustom viper-load-hook nil 1047(defcustom viper-load-hook nil
1016 "Hooks run just after loading Viper." 1048 "Hooks run just after loading Viper."
1017 :type 'hook 1049 :type 'hook
1018 :group 'viper) 1050 :group 'viper-hooks)
1019 1051
1020 1052
1021;;; Local Variables: 1053;;; Local Variables:
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 699319b8c6f..cd821cf83a8 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -8,7 +8,7 @@
8 8
9;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. 9;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
10 10
11(defconst viper-version "3.00 (Polyglot) of August 18, 1997" 11(defconst viper-version "3.001 (Polyglot) of September 23, 1997"
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.
@@ -334,6 +334,12 @@ defaults to `~/.viper'."
334 334
335(require 'viper-cmd) 335(require 'viper-cmd)
336 336
337(defgroup viper-misc nil
338 "Miscellaneous Viper customization."
339 :prefix "viper-"
340 :group 'viper)
341
342
337(defcustom viper-always t 343(defcustom viper-always t
338 "Non-nil means, arrange for vi-state to be a default when appropriate. 344 "Non-nil means, arrange for vi-state to be a default when appropriate.
339This is different from `viper-mode' variable in that `viper-mode' determines 345This is different from `viper-mode' variable in that `viper-mode' determines
@@ -341,7 +347,7 @@ whether to use Viper in the first place, while `viper-always', if nil, lets
341user decide when to invoke Viper in a major mode." 347user decide when to invoke Viper in a major mode."
342 :type 'boolean 348 :type 'boolean
343 :tag "Always Invoke Viper" 349 :tag "Always Invoke Viper"
344 :group 'viper) 350 :group 'viper-misc)
345 351
346;; Non-viper variables that need to be saved in case the user decides to 352;; Non-viper variables that need to be saved in case the user decides to
347;; de-viperize emacs. 353;; de-viperize emacs.
@@ -357,10 +363,11 @@ If t, viperize emacs. If nil -- don't. If `ask', ask the user.
357This variable is used primatily when Viper is being loaded. 363This variable is used primatily when Viper is being loaded.
358 364
359Must be set in `~/.emacs' before Viper is loaded. 365Must be set in `~/.emacs' before Viper is loaded.
360DO NOT set this variable interactively." 366DO NOT set this variable interactively, unless you are using the customization
367widget."
361 :type '(choice (const nil) (const t) (const ask)) 368 :type '(choice (const nil) (const t) (const ask))
362 :tag "Set Viper Mode on Loading" 369 :tag "Set Viper Mode on Loading"
363 :group 'viper) 370 :group 'viper-misc)
364 371
365(defcustom viper-non-vi-major-modes 372(defcustom viper-non-vi-major-modes
366 '(custom-mode dired-mode efs-mode internal-ange-ftp-mode tar-mode 373 '(custom-mode dired-mode efs-mode internal-ange-ftp-mode tar-mode
@@ -371,7 +378,7 @@ Viper automatically augments this list with some obvious modes, such as
371`dired-mode', `tar-mode', etc. So, don't put a mode on this list, unless 378`dired-mode', `tar-mode', etc. So, don't put a mode on this list, unless
372it comes up in a wrong Viper state." 379it comes up in a wrong Viper state."
373 :type '(repeat symbol) 380 :type '(repeat symbol)
374 :group 'viper) 381 :group 'viper-misc)
375 382
376 383
377 384