]> git.eshelyaron.com Git - emacs.git/commitdiff
new version
authorMichael Kifer <kifer@cs.stonybrook.edu>
Tue, 30 Sep 1997 01:13:53 +0000 (01:13 +0000)
committerMichael Kifer <kifer@cs.stonybrook.edu>
Tue, 30 Sep 1997 01:13:53 +0000 (01:13 +0000)
lisp/ediff-init.el
lisp/ediff-merg.el
lisp/ediff-util.el
lisp/ediff.el
lisp/emulation/viper-cmd.el
lisp/emulation/viper-ex.el
lisp/emulation/viper-init.el
lisp/emulation/viper.el

index 9ca1400a8cdb19823a11d711b3422bb6dcb87c29..184a8ae5f93940710fd81619c6ab22bdb469b7d7 100644 (file)
@@ -877,7 +877,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-current-diff-face-A 'ediff-current-diff-face-A)
+(defvar ediff-current-diff-face-A 'ediff-current-diff-face-A
+  "Face for highlighting the selected difference in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-current-diff-face-A'
+this variable represents.")
 (ediff-hide-face 'ediff-current-diff-face-A)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; 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."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-current-diff-face-B 'ediff-current-diff-face-B)
+(defvar ediff-current-diff-face-B 'ediff-current-diff-face-B
+  "Face for highlighting the selected difference in buffer B.
+ this variable. Instead, use the customization
+widget to customize the actual face `ediff-current-diff-face-B'
+this variable represents.")
 (ediff-hide-face 'ediff-current-diff-face-B)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; 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."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-current-diff-face-C 'ediff-current-diff-face-C)
+(defvar ediff-current-diff-face-C 'ediff-current-diff-face-C
+  "Face for highlighting the selected difference in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-current-diff-face-C'
+this variable represents.")
 (ediff-hide-face 'ediff-current-diff-face-C)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; 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."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-face-Ancestor)
+(defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-face-Ancestor
+  "Face for highlighting the selected difference in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-current-diff-face-Ancestor'
+this variable represents.")
 (ediff-hide-face 'ediff-current-diff-face-Ancestor)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; 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."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-fine-diff-face-A 'ediff-fine-diff-face-A)
+(defvar ediff-fine-diff-face-A 'ediff-fine-diff-face-A
+  "Face for highlighting the fine differences in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-face-A'
+this variable represents.")
 (ediff-hide-face 'ediff-fine-diff-face-A)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; 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."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-fine-diff-face-B 'ediff-fine-diff-face-B)
+(defvar ediff-fine-diff-face-B 'ediff-fine-diff-face-B
+  "Face for highlighting the fine differences in buffer B.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-face-B'
+this variable represents.")
 (ediff-hide-face 'ediff-fine-diff-face-B)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; 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."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-fine-diff-face-C 'ediff-fine-diff-face-C)
+(defvar ediff-fine-diff-face-C 'ediff-fine-diff-face-C
+  "Face for highlighting the fine differences in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-face-C'
+this variable represents.")
 (ediff-hide-face 'ediff-fine-diff-face-C)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1114,7 +1142,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-face-Ancestor)
+(defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-face-Ancestor
+  "Face for highlighting the fine differences in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-face-Ancestor'
+this variable represents.")
 (ediff-hide-face 'ediff-fine-diff-face-Ancestor)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1149,7 +1181,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-even-diff-face-A 'ediff-even-diff-face-A)
+(defvar ediff-even-diff-face-A 'ediff-even-diff-face-A
+  "Face for highlighting even-numbered non-current differences in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-face-A'
+this variable represents.")
 (ediff-hide-face 'ediff-even-diff-face-A)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1183,7 +1219,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-even-diff-face-B 'ediff-even-diff-face-B)
+(defvar ediff-even-diff-face-B 'ediff-even-diff-face-B
+  "Face for highlighting even-numbered non-current differences in buffer B.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-face-B'
+this variable represents.")
 (ediff-hide-face 'ediff-even-diff-face-B)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1212,7 +1252,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-even-diff-face-C 'ediff-even-diff-face-C)
+(defvar ediff-even-diff-face-C 'ediff-even-diff-face-C
+  "Face for highlighting even-numbered non-current differences in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-face-C'
+this variable represents.")
 (ediff-hide-face 'ediff-even-diff-face-C)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1242,7 +1286,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-face-Ancestor)
+(defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-face-Ancestor
+  "Face for highlighting even-numbered non-current differences in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-face-Ancestor'
+this variable represents.")
 (ediff-hide-face 'ediff-even-diff-face-Ancestor)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1284,7 +1332,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-odd-diff-face-A 'ediff-odd-diff-face-A)
+(defvar ediff-odd-diff-face-A 'ediff-odd-diff-face-A
+  "Face for highlighting odd-numbered non-current differences in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-face-A'
+this variable represents.")
 (ediff-hide-face 'ediff-odd-diff-face-A)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1319,7 +1371,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-odd-diff-face-B 'ediff-odd-diff-face-B)
+(defvar ediff-odd-diff-face-B 'ediff-odd-diff-face-B
+  "Face for highlighting odd-numbered non-current differences in buffer B.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-face-B'
+this variable represents.")
 (ediff-hide-face 'ediff-odd-diff-face-B)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1347,7 +1403,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-odd-diff-face-C 'ediff-odd-diff-face-C)
+(defvar ediff-odd-diff-face-C 'ediff-odd-diff-face-C
+  "Face for highlighting odd-numbered non-current differences in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-face-C'
+this variable represents.")
 (ediff-hide-face 'ediff-odd-diff-face-C)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
@@ -1375,7 +1435,11 @@ ancestor buffer."
   :group 'ediff-highlighting)
 ;; An internal variable. Ediff takes the face from here. When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
-(defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-face-Ancestor)
+(defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-face-Ancestor
+  "Face for highlighting odd-numbered non-current differences in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-face-Ancestor'
+this variable represents.")
 (ediff-hide-face 'ediff-odd-diff-face-Ancestor)
 ;; Until custom.el for XEmacs starts supporting :stipple we do this.
 ;; This means that some use customization may be trashed.
index 142d9fc9ac2d45e532689169c54f3d24bb88f040..f77d17ea7d5705bd8841469d1a3748787e6923a3 100644 (file)
@@ -81,6 +81,12 @@ STRING3
 This means that regions that have status prefer-A or prefer-B will be
 skiped over. Nil means show all regions.")
 
+;; If ediff-show-clashes-only, check if there is no clash between the ancestor
+;; and one of the variants.
+(defsubst ediff-merge-region-is-non-clash (n)
+  (and ediff-show-clashes-only
+       (string-match "prefer" (or (ediff-get-state-of-merge n) ""))))
+
        
 (defsubst ediff-get-combined-region (n)
   (concat (nth 0 ediff-combination-pattern) "\n"
index 4d0dc828c7d76304e82395a985f4a6a34666b71f..0887bec863e5f19aa2921c822f9168cfbefa3918 100644 (file)
@@ -1586,20 +1586,20 @@ With a prefix argument, go forward that many differences."
   (if (< ediff-current-difference ediff-number-of-differences)
       (let ((n (min ediff-number-of-differences
                    (+ ediff-current-difference arg)))
-           regexp-skip)
+           non-clash-skip regexp-skip)
            
        (ediff-visible-region)
        (or (>= n ediff-number-of-differences)
            (setq regexp-skip (funcall ediff-skip-diff-region-function n))
+           ;; this won't exec if regexp-skip is t
+           (setq non-clash-skip (ediff-merge-region-is-non-clash n))
            (ediff-install-fine-diff-if-necessary n))
        (while (and (< n ediff-number-of-differences)
                    (or
                     ;; regexp skip
                     regexp-skip
                     ;; skip clashes, if necessary
-                    (and ediff-show-clashes-only
-                         (string-match "prefer"
-                                       (or (ediff-get-state-of-merge n) "")))
+                    non-clash-skip
                     ;; skip difference regions that differ in white space
                     (and ediff-ignore-similar-regions
                          (eq (ediff-no-fine-diffs-p n) t))))
@@ -1608,6 +1608,8 @@ With a prefix argument, go forward that many differences."
              (message "Skipped over region %d and counting ..."  n))
          (or (>= n ediff-number-of-differences)
              (setq regexp-skip (funcall ediff-skip-diff-region-function n))
+             ;; this won't exec if regexp-skip is t
+             (setq non-clash-skip (ediff-merge-region-is-non-clash n))
              (ediff-install-fine-diff-if-necessary n))
          )
        (message "")
@@ -1623,20 +1625,20 @@ With a prefix argument, go back that many differences."
   (ediff-barf-if-not-control-buffer)
   (if (> ediff-current-difference -1)
       (let ((n (max -1 (- ediff-current-difference arg)))
-           regexp-skip)
+           non-clash-skip regexp-skip)
            
        (ediff-visible-region)
        (or (< n 0)
            (setq regexp-skip (funcall ediff-skip-diff-region-function n))
+           ;; this won't exec if regexp-skip is t
+           (setq non-clash-skip (ediff-merge-region-is-non-clash n))
            (ediff-install-fine-diff-if-necessary n))
        (while (and (> n -1)
                    (or
                     ;; regexp skip
                     regexp-skip
                     ;; skip clashes, if necessary
-                    (and ediff-show-clashes-only
-                         (string-match "prefer"
-                                       (or (ediff-get-state-of-merge n) "")))
+                    non-clash-skip
                     ;; skip difference regions that differ in white space
                     (and ediff-ignore-similar-regions
                          (eq (ediff-no-fine-diffs-p n) t))))
@@ -1645,6 +1647,8 @@ With a prefix argument, go back that many differences."
          (setq n (1- n))
          (or (< n 0)
              (setq regexp-skip (funcall ediff-skip-diff-region-function n))
+             ;; this won't exec if regexp-skip is t
+             (setq non-clash-skip (ediff-merge-region-is-non-clash n))
              (ediff-install-fine-diff-if-necessary n))
          )
        (message "")
index 2cbbc90164b91fefbc3ec4eba9819962276c3938..829a6bc68cd279afa3b37ce95c2776b53c437f6a 100644 (file)
@@ -6,8 +6,8 @@
 ;; Created: February 2, 1994
 ;; Keywords: comparing, merging, patching, version control.
 
-(defconst ediff-version "2.67" "The current version of Ediff")
-(defconst ediff-date "September 3, 1997" "Date of last update")  
+(defconst ediff-version "2.671" "The current version of Ediff")
+(defconst ediff-date "September 23, 1997" "Date of last update")  
 
 
 ;; This file is part of GNU Emacs.
index 53f12d7e34df262f7b451346ff2aa25a4863efd5..51de44bee54f715c5224bd35f7a86a4828143695 100644 (file)
@@ -1814,7 +1814,7 @@ suffixes, the user is asked to confirm.
 
 To turn this feature off, set this variable to nil."
   :type '(repeat string)
-  :group 'viper)
+  :group 'viper-misc)
     
 
 ;; 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."
 (defun viper-forward-sentence (arg)
   "Forward sentence."
   (interactive "P")
-  (push-mark nil t) 
+  (or (eq last-command this-command)
+      (push-mark nil t))
   (let ((val (viper-p-val arg))
        (com (viper-getcom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3240,7 +3241,8 @@ controlled by the sign of prefix numeric value."
 (defun viper-backward-sentence (arg)
   "Backward sentence."
   (interactive "P")
-  (push-mark nil t) 
+  (or (eq last-command this-command)
+      (push-mark nil t))
   (let ((val (viper-p-val arg))
        (com (viper-getcom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3250,7 +3252,8 @@ controlled by the sign of prefix numeric value."
 (defun viper-forward-paragraph (arg)
   "Forward paragraph."
   (interactive "P")
-  (push-mark nil t) 
+  (or (eq last-command this-command)
+      (push-mark nil t))
   (let ((val (viper-p-val arg))
        (com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3263,7 +3266,8 @@ controlled by the sign of prefix numeric value."
 (defun viper-backward-paragraph (arg)
   "Backward paragraph."
   (interactive "P")
-  (push-mark nil t) 
+  (or (eq last-command this-command)
+      (push-mark nil t))
   (let ((val (viper-p-val arg))
        (com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
@@ -3274,8 +3278,7 @@ controlled by the sign of prefix numeric value."
          (viper-execute-com 'viper-backward-paragraph nil com)
          (backward-char 1)))))
 
-;; should be mode-specific etc.
-
+;; should be mode-specific
 (defun viper-prev-heading (arg)
   (interactive "P")
   (let ((val (viper-p-val arg))
@@ -4288,13 +4291,10 @@ One can use `` and '' to temporarily jump 1 step back."
           (view-register (downcase reg)))
          ((viper-valid-register reg '(digit))
           (let ((text (current-kill (- reg ?1) 'do-not-rotate)))
-            (save-excursion 
-              (set-buffer (get-buffer-create "*Output*"))
-              (delete-region (point-min) (point-max))
-              (insert (format "Register %c contains the string:\n" reg))
-              (insert text)
-              (goto-char (point-min)))
-            (display-buffer "*Output*")))
+            (with-output-to-temp-buffer " *viper-info*"
+              (princ (format "Register %c contains the string:\n" reg))
+              (princ text))
+            ))
          ((= ?\] reg)
           (viper-next-heading arg))
          (t (error
@@ -4310,14 +4310,12 @@ One can use `` and '' to temporarily jump 1 step back."
           (viper-heading-end arg))
          ((viper-valid-register reg '(letter))
           (let* ((val (get-register (1+ (- reg ?a))))
-                 (buf (if (not val) 
+                 (buf (if (not (markerp val))
                           (error viper-EmptyTextmarker reg)
                         (marker-buffer val)))
                  (pos (marker-position val))
                  line-no text (s pos) (e pos))
-            (save-excursion 
-              (set-buffer (get-buffer-create "*Output*"))
-              (delete-region (point-min) (point-max))
+            (with-output-to-temp-buffer " *viper-info*"
               (if (and buf pos)
                   (progn
                     (save-excursion 
@@ -4339,15 +4337,14 @@ One can use `` and '' to temporarily jump 1 step back."
                       (setq text (format "%s<%c>%s" 
                                          (substring text 0 (- pos s)) 
                                          reg (substring text (- pos s)))))
-                    (insert
+                    (princ
                      (format
                       "Textmarker `%c' is in buffer `%s' at line %d.\n"
                                     reg (buffer-name buf) line-no))
-                    (insert (format "Here is some text around %c:\n\n %s" 
+                    (princ (format "Here is some text around %c:\n\n %s" 
                                     reg text)))
-                (insert (format viper-EmptyTextmarker reg)))
-              (goto-char (point-min)))
-            (display-buffer "*Output*")))
+                (princ (format viper-EmptyTextmarker reg))))
+            ))
          (t (error viper-InvalidTextmarker reg)))))
   
 
index 4d3b8fd0921c7fd17db7501f71252c583997beeb..a08b75ce4e639382e2bc9b906784c36e103087e6 100644 (file)
 ;; List of addresses passed to Ex command
 (defvar ex-addresses nil)
 
-;; It seems that this flag is used only for `#', `print', and `list', which
-;; aren't implemented. Check later.
+;; This flag is supposed to be set only by `#', `print', and `list',
+;; none of which is implemented. So, it and the pices of the code it
+;; controls are dead weight. We keep it just in case this might be
+;; needed in the future.
 (defvar ex-flag nil)
 
 ;; "buffer" where Ex commands keep deleted data.
@@ -1134,16 +1136,16 @@ reversed."
        (copy-region-as-kill (point) (mark t)))
       (if ex-flag
          (progn
-           (with-output-to-temp-buffer "*copy text*"
+           (with-output-to-temp-buffer " *copy text*"
              (princ
               (if (or del-flag ex-g-flag ex-g-variant)
                   (current-kill 0)
                 (buffer-substring (point) (mark t)))))
            (condition-case nil
                (progn
-                 (read-string "[Hit return to continue] ")
-                 (save-excursion (kill-buffer "*copy text*")))
-             (quit (save-excursion (kill-buffer "*copy text*"))
+                 (read-string "[Hit return to confirm] ")
+                 (save-excursion (kill-buffer " *copy text*")))
+             (quit (save-excursion (kill-buffer " *copy text*"))
                    (signal 'quit nil))))))
     (if (= address 0)
        (goto-char (point-min))
@@ -1172,7 +1174,7 @@ reversed."
            (with-output-to-temp-buffer " *delete text*"
              (princ (buffer-substring (point) (mark t))))
            (condition-case nil
-               (read-string "[Hit return to continue] ")
+               (read-string "[Hit return to confirm] ")
              (quit
               (save-excursion (kill-buffer " *delete text*"))
               (error "")))
@@ -1349,14 +1351,14 @@ reversed."
       (if ex-flag
          ;; show text to be joined and ask for confirmation
          (progn
-           (with-output-to-temp-buffer " *text*"
+           (with-output-to-temp-buffer " *join text*"
              (princ (buffer-substring (point) (mark t))))
            (condition-case nil
                (progn
-                 (read-string "[Hit return to continue] ")
+                 (read-string "[Hit return to confirm] ")
                  (ex-line-subr com (point) (mark t)))
              (quit (ding)))
-           (save-excursion (kill-buffer " *text*")))
+           (save-excursion (kill-buffer " *join text*")))
        (ex-line-subr com (point) (mark t)))
       (setq point (point)))
     (goto-char (1- point))
@@ -2115,10 +2117,9 @@ Please contact your system administrator. "
        (message (concat file " " info))
       (save-window-excursion
        (with-output-to-temp-buffer " *viper-info*"
-         (princ (concat "\n"
-                        file "\n\n\t" info
-                        "\n\n\nPress any key to continue...\n\n")))
-       (viper-read-event)
+         (princ (concat "\n" file "\n\n\t" info "\n\n")))
+       (let ((inhibit-quit t))
+         (viper-set-unread-command-events (viper-read-event)))
        (kill-buffer " *viper-info*")))
     ))
 
index 4da276c881d30ddd033011ba3ef080250e7ee887..bd1bddfebb013ffaf3fa468f1e06229cdb6b7d26 100644 (file)
 (defun viper-window-display-p ()
   (and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc)))))
 
-(defcustom viper-ms-style-os-p (memq system-type '(ms-dos windows-nt windows-95))
+(defcustom viper-ms-style-os-p (memq system-type
+                                    '(ms-dos windows-nt windows-95))
   "Tells if Emacs is running under an MS-style OS: ms-dos, windows-nt, W95."
   :type 'boolean
   :tag "Is it Microsoft-made OS?"
-  :group 'viper)
+  :group 'viper-misc)
 (defcustom viper-vms-os-p (memq system-type '(vax-vms axp-vms))
   "Tells if Emacs is running under VMS."
   :type 'boolean
   :tag "Is it VMS?"
-  :group 'viper)
+  :group 'viper-misc)
 
 (defcustom viper-force-faces nil
   "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
 that Viper doesn't know about.
 In all likelihood, you don't need to bother with this setting."
   :type 'boolean
-  :group 'viper)
+  :group 'viper-highlighting)
 
 (defun viper-has-face-support-p ()
   (cond ((viper-window-display-p))
@@ -470,7 +471,7 @@ color displays. By default, the delimiters are used only on TTYs."
 This is a list where Viper keeps the history of previously inserted pieces of
 text."
   :type 'integer
-  :group 'viper)
+  :group 'viper-misc)
 ;; The insertion ring.
 (defvar viper-insertion-ring nil)
 ;; This is temp insertion ring. Used to do rotation for display purposes.
@@ -481,7 +482,7 @@ text."
 (defcustom viper-command-ring-size 14
   "The size of history of Vi commands repeatable with dot."
   :type 'integer
-  :group 'viper)
+  :group 'viper-misc)
 ;; The command ring.
 (defvar viper-command-ring nil)
 ;; This is temp command ring. Used to do rotation for display purposes.
@@ -494,7 +495,7 @@ text."
 Setting this too high may slow down your typing. Setting this value too low
 will make it hard to use Vi-stile timeout macros."
   :type 'integer
-  :group 'viper)
+  :group 'viper-misc)
 
 (defcustom viper-ESC-keyseq-timeout (if (viper-window-display-p)
                                      0 viper-fast-keyseq-timeout)
@@ -503,7 +504,7 @@ Setting this too high may slow down switching from insert to vi state. Setting
 this value too low will make it impossible to use function keys in insert mode
 on a dumb terminal."
   :type 'integer
-  :group 'viper)
+  :group 'viper-misc)
 
 ;; Modes and related variables
 
@@ -612,6 +613,11 @@ to a new place after repeating previous Vi command."
 
 ;;; Variables for Moves and Searches
 
+(defgroup viper-search nil
+  "Variables that define the search and query-replace behavior of Viper."
+  :prefix "viper-"
+  :group 'viper)
+
 ;; For use by `;' command.
 (defvar viper-f-char nil)
 
@@ -638,13 +644,13 @@ to a new place after repeating previous Vi command."
 (defcustom viper-case-fold-search nil
   "*If not nil, search ignores cases."
   :type 'boolean
-  :group 'viper)
+  :group 'viper-search)
 
 (defcustom viper-re-search t
   "*If not nil, search is regexp search, otherwise vanilla search."
   :type 'boolean
   :tag "Regexp Search"
-  :group 'viper)
+  :group 'viper-search)
 
 (defcustom viper-search-scroll-threshold 2
   "*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.
 If you want Viper search to behave as usual in Vi, set this variable to a
 negative number."
   :type 'boolean
-  :group 'viper)
+  :group 'viper-search)
 
 (defcustom viper-re-query-replace t
   "*If t then do regexp replace, if nil then do string replace."
   :type 'boolean
   :tag "Regexp Query Replace"
-  :group 'viper)
+  :group 'viper-search)
 
 (defcustom viper-re-replace t
   "*If t, do regexp replace. nil means do string replace."
   :type 'boolean
   :tag "Regexp Replace"
-  :group 'viper)
+  :group 'viper-search)
 
 (defcustom viper-parse-sexp-ignore-comments t
   "*If t, `%' ignores the parentheses that occur inside comments."
@@ -707,20 +713,20 @@ If nil, the cursor will move backwards without deleting anything."
 (defcustom viper-buffer-search-char nil
   "*Key used for buffer-searching. Must be a character type, e.g., ?g."
   :type '(choice (const nil) character)
-  :group 'viper)
+  :group 'viper-search)
 
 (defcustom viper-search-wrap-around-t t
   "*If t, search wraps around."
   :type 'boolean
   :tag "Search Wraps Around"
-  :group 'viper)
+  :group 'viper-search)
   
 (viper-deflocalvar viper-related-files-and-buffers-ring nil "")
 (defcustom viper-related-files-and-buffers-ring nil
   "*List of file and buffer names that are considered to be related to the current buffer.
 Related buffers can be cycled through via :R and :P commands."
   :type 'boolean
-  :group 'viper)
+  :group 'viper-misc)
 (put 'viper-related-files-and-buffers-ring 'permanent-local t)
 
 ;; 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."
   "*Face used to flash out the search pattern."
   :group 'viper-highlighting)
 ;; An internal variable. Viper takes the face from here.
-(defvar viper-search-face 'viper-search-face)
+(defvar viper-search-face 'viper-search-face
+  "Face used to flash out the search pattern.
+DO NOT CHANGE this variable. Instead, use the customization widget
+to customize the actual face object `viper-search-face'
+this variable represents.")
 (viper-hide-face 'viper-search-face)
   
 ;;(defvar viper-replace-overlay-face
@@ -852,7 +862,11 @@ Related buffers can be cycled through via :R and :P commands."
   "*Face for highlighting replace regions on a window display."
   :group 'viper-highlighting)
 ;; An internal variable. Viper takes the face from here.
-(defvar viper-replace-overlay-face 'viper-replace-overlay-face)
+(defvar viper-replace-overlay-face 'viper-replace-overlay-face
+  "Face for highlighting replace regions on a window display.
+DO NOT CHANGE this variable. Instead, use the customization widget
+to customize the actual face object `viper-replace-overlay-face'
+this variable represents.")
 (viper-hide-face 'viper-replace-overlay-face)
 
 ;;(defvar viper-minibuffer-emacs-face
@@ -887,7 +901,11 @@ Related buffers can be cycled through via :R and :P commands."
   "Face used in the Minibuffer when it is in Emacs state."
   :group 'viper-highlighting)
 ;; An internal variable. Viper takes the face from here.
-(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face)
+(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face
+  "Face used in the Minibuffer when it is in Emacs state.
+DO NOT CHANGE this variable. Instead, use the customization widget
+to customize the actual face object `viper-minibuffer-emacs-face'
+this variable represents.")
 (viper-hide-face 'viper-minibuffer-emacs-face)
     
 ;;(defvar viper-minibuffer-insert-face
@@ -920,7 +938,11 @@ Related buffers can be cycled through via :R and :P commands."
   "Face used in the Minibuffer when it is in Insert state."
   :group 'viper-highlighting)
 ;; An internal variable. Viper takes the face from here.
-(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face)
+(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face
+  "Face used in the Minibuffer when it is in Insert state.
+DO NOT CHANGE this variable. Instead, use the customization widget
+to customize the actual face object `viper-minibuffer-insert-face'
+this variable represents.")
 (viper-hide-face 'viper-minibuffer-insert-face)
     
 ;;(defvar viper-minibuffer-vi-face
@@ -945,11 +967,16 @@ Related buffers can be cycled through via :R and :P commands."
   "Face used in the Minibuffer when it is in Vi state."
   :group 'viper-highlighting)
 ;; An internal variable. Viper takes the face from here.
-(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face)
+(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face
+  "Face used in the Minibuffer when it is in Vi state.
+DO NOT CHANGE this variable. Instead, use the customization widget
+to customize the actual face object `viper-minibuffer-vi-face'
+this variable represents.")
 (viper-hide-face 'viper-minibuffer-vi-face)
     
 ;; the current face to be used in the minibuffer
-(viper-deflocalvar viper-minibuffer-current-face viper-minibuffer-emacs-face "")
+(viper-deflocalvar
+  viper-minibuffer-current-face viper-minibuffer-emacs-face "")
 
 \f
 ;;; Miscellaneous
@@ -960,12 +987,12 @@ Related buffers can be cycled through via :R and :P commands."
 (defcustom viper-spell-function 'ispell-region
   "Spell function used by #s<move> command to spell."
   :type 'function
-  :group 'viper)
+  :group 'viper-misc)
 
 (defcustom viper-tags-file-name "TAGS"
   "The tags file used by Viper."
   :type 'string
-  :group 'viper)
+  :group 'viper-misc)
 
 ;; Minibuffer
 
@@ -995,27 +1022,32 @@ Should be set in `~/.viper' file."
   "Mode line tag identifying the Replace mode of Viper.")
 
 
+(defgroup viper-hooks nil
+  "Viper hooks."
+  :prefix "viper-"
+  :group 'viper)
+
 (defcustom viper-vi-state-hook nil
   "*Hooks run just before the switch to Vi mode is completed."
   :type 'hook
-  :group 'viper)
+  :group 'viper-hooks)
 (defcustom viper-insert-state-hook nil
   "*Hooks run just before the switch to Insert mode is completed."
   :type 'hook
-  :group 'viper)
+  :group 'viper-hooks)
 (defcustom viper-replace-state-hook nil
   "*Hooks run just before the switch to Replace mode is completed."
   :type 'hook
-  :group 'viper)
+  :group 'viper-hooks)
 (defcustom viper-emacs-state-hook nil
   "*Hooks run just before the switch to Emacs mode is completed."
   :type 'hook
-  :group 'viper)
+  :group 'viper-hooks)
   
 (defcustom viper-load-hook nil
   "Hooks run just after loading Viper."
   :type 'hook
-  :group 'viper)
+  :group 'viper-hooks)
   
 
 ;;; Local Variables:
index 699319b8c6f495a135dbc77f0ead595c16924084..cd821cf83a8eabc395949ad233f9a41b45ef3326 100644 (file)
@@ -8,7 +8,7 @@
 
 ;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
-(defconst viper-version "3.00 (Polyglot) of August 18, 1997"
+(defconst viper-version "3.001 (Polyglot) of September 23, 1997"
   "The current version of Viper")
 
 ;; This file is part of GNU Emacs.
@@ -334,6 +334,12 @@ defaults to `~/.viper'."
 
 (require 'viper-cmd)
 
+(defgroup viper-misc nil
+  "Miscellaneous Viper customization."
+  :prefix "viper-"
+  :group 'viper)
+
+
 (defcustom viper-always t
   "Non-nil means, arrange for vi-state to be a default when appropriate.
 This 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
 user decide when to invoke Viper in a major mode."
   :type 'boolean
   :tag "Always Invoke Viper"
-  :group 'viper)
+  :group 'viper-misc)
 
 ;; Non-viper variables that need to be saved in case the user decides to
 ;; de-viperize emacs.
@@ -357,10 +363,11 @@ If t, viperize emacs. If nil -- don't. If `ask', ask the user.
 This variable is used primatily when Viper is being loaded.
 
 Must be set in `~/.emacs' before Viper is loaded.
-DO NOT set this variable interactively."
+DO NOT set this variable interactively, unless you are using the customization
+widget."
   :type '(choice (const nil) (const t) (const ask))
   :tag "Set Viper Mode on Loading"
-  :group 'viper)
+  :group 'viper-misc)
 
 (defcustom viper-non-vi-major-modes
   '(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
 `dired-mode', `tar-mode', etc.  So, don't put a mode on this list, unless 
 it comes up in a wrong Viper state."
   :type '(repeat symbol)
-  :group 'viper)
+  :group 'viper-misc)
 
 
 \f