(vc-svn-registered): Catch all errors.
[bpt/emacs.git] / lisp / ediff-util.el
index 2e24548..9db05ad 100644 (file)
@@ -329,7 +329,7 @@ to invocation.")
            ediff-word-mode-job (ediff-word-mode-job))
 
       ;; Don't delete variants in case of ediff-buffer-* jobs without asking.
-      ;; This is because u may loose work---dangerous.
+      ;; This is because one may loose work---dangerous.
       (if (string-match "buffer" (symbol-name ediff-job-name))
          (setq ediff-keep-variants t))
 
@@ -367,7 +367,8 @@ to invocation.")
                   (ediff-unique-buffer-name "*ediff-merge" "*")))
            (save-excursion
              (set-buffer buffer-C)
-             (insert-buffer buf)
+             (insert-buffer-substring buf)
+             (goto-char (point-min))
              (funcall (ediff-with-current-buffer buf major-mode))
              (widen) ; merge buffer is always widened
              (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t)
@@ -1729,7 +1730,7 @@ With a prefix argument, go forward that many differences."
        (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)
+           (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
                  skip-changed
                  (ediff-skip-merge-region-if-changed-from-default-p n))
            (ediff-install-fine-diff-if-necessary n))
@@ -1744,6 +1745,7 @@ With a prefix argument, go forward that many differences."
                     skip-changed
                     ;; skip difference regions that differ in white space
                     (and ediff-ignore-similar-regions
+                         (ediff-merge-region-is-non-clash n)
                          (or (eq (ediff-no-fine-diffs-p n) t)
                              (and (ediff-merge-job)
                                   (eq (ediff-no-fine-diffs-p n) 'C)))
@@ -1754,7 +1756,7 @@ With a prefix argument, go forward that many differences."
          (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)
+             (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
                    skip-changed
                    (ediff-skip-merge-region-if-changed-from-default-p n))
              (ediff-install-fine-diff-if-necessary n))
@@ -1778,7 +1780,7 @@ With a prefix argument, go back that many differences."
        (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)
+           (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
                  skip-changed
                  (ediff-skip-merge-region-if-changed-from-default-p n))
            (ediff-install-fine-diff-if-necessary n))
@@ -1792,6 +1794,7 @@ With a prefix argument, go back that many differences."
                     skip-changed
                     ;; skip difference regions that differ in white space
                     (and ediff-ignore-similar-regions
+                         (ediff-merge-region-is-non-clash n)
                          (or (eq (ediff-no-fine-diffs-p n) t)
                              (and (ediff-merge-job)
                                   (eq (ediff-no-fine-diffs-p n) 'C)))
@@ -1802,7 +1805,7 @@ With a prefix argument, go back that many differences."
          (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)
+             (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
                    skip-changed
                    (ediff-skip-merge-region-if-changed-from-default-p n))
              (ediff-install-fine-diff-if-necessary n))
@@ -2075,7 +2078,7 @@ ARG is a prefix argument.  If nil, copy the current difference region."
          (ediff-clear-fine-differences n))
       ;; Make sure that the message about saving and how to restore is seen
       ;; by the user
-      (message messg))
+      (message "%s" messg))
     ))
 
 ;; Save Nth diff of buffer BUF-TYPE \(A, B, or C\).
@@ -2111,7 +2114,7 @@ ARG is a prefix argument.  If nil, copy the current difference region."
     (if this-buf-n-th-diff-saved
        (if (yes-or-no-p
             (format
-             "You've previously copied diff region %d to buffer %S.  Confirm "
+             "You've previously copied diff region %d to buffer %S.  Confirm? "
              (1+ n) buf-type))
            t
          (error "Quit"))
@@ -2219,18 +2222,18 @@ a regular expression typed in by the user."
            regexp-A
            (read-string
             (format
-             "Ignore A-regions matching this regexp (default \"%s\"): "
+             "Ignore A-regions matching this regexp (default %s): "
              ediff-regexp-hide-A))
            regexp-B
            (read-string
             (format
-             "Ignore B-regions matching this regexp (default \"%s\"): "
+             "Ignore B-regions matching this regexp (default %s): "
              ediff-regexp-hide-B)))
       (if ediff-3way-comparison-job
          (setq regexp-C
                (read-string
                 (format
-                 "Ignore C-regions matching this regexp (default \"%s\"): "
+                 "Ignore C-regions matching this regexp (default %s): "
                  ediff-regexp-hide-C))))
       (if (eq ediff-hide-regexp-connective 'and)
          (setq msg-connective "BOTH"
@@ -2258,18 +2261,18 @@ a regular expression typed in by the user."
            regexp-A
            (read-string
             (format
-             "Focus on A-regions matching this regexp (default \"%s\"): "
+             "Focus on A-regions matching this regexp (default %s): "
              ediff-regexp-focus-A))
            regexp-B
            (read-string
             (format
-             "Focus on B-regions matching this regexp (default \"%s\"): "
+             "Focus on B-regions matching this regexp (default %s): "
              ediff-regexp-focus-B)))
       (if ediff-3way-comparison-job
          (setq regexp-C
                (read-string
                 (format
-                 "Focus on C-regions matching this regexp (default \"%s\"): "
+                 "Focus on C-regions matching this regexp (default %s): "
                  ediff-regexp-focus-C))))
       (if (eq ediff-focus-regexp-connective 'and)
          (setq msg-connective "BOTH"
@@ -2720,7 +2723,7 @@ only if this merge job is part of a group, i.e., was invoked from within
             (format "Another buffer is visiting file %s. Too dangerous to save the merge buffer"
                     file)))
        (beep)
-       (message warn-message)
+       (message "%s" warn-message)
        (with-output-to-temp-buffer ediff-msg-buffer
          (princ "\n\n")
          (princ warn-message)
@@ -3286,7 +3289,7 @@ Hit \\[ediff-recenter] to reset the windows afterward."
            (princ warn-message)
            (princ "\n\n"))
          (if (y-or-n-p
-              (message warn-message))
+              (message "%s" warn-message))
              (with-current-buffer buff
                (save-buffer)
                (kill-buffer (current-buffer)))