]> code.delx.au - gnu-emacs/blobdiff - lisp/ediff-ptch.el
(vc-diff-switches): New user option.
[gnu-emacs] / lisp / ediff-ptch.el
index 1f1a42477a0f91bf4f793a06d616ab5451bf5a5a..18b2f75b4df00bd1bdf78e87ecc99bbe275ed562 100644 (file)
@@ -287,6 +287,8 @@ program."
                  ;; hence, something wrong
                  (progn
                    (with-output-to-temp-buffer ediff-msg-buffer
+                     (ediff-with-current-buffer standard-output
+                       (fundamental-mode))
                      (princ
                       (format "
 The patch file contains a context diff for
@@ -342,6 +344,8 @@ other files, enter /dev/null
                  (setcar triple file1))
                 ((and f1-exists f2-exists)
                  (with-output-to-temp-buffer ediff-msg-buffer
+                   (ediff-with-current-buffer standard-output
+                     (fundamental-mode))
                    (princ (format "
 Ediff has inferred that
        %s
@@ -361,6 +365,8 @@ Please advice:
                 (f1-exists (setcar triple file1))
                 (t
                  (with-output-to-temp-buffer ediff-msg-buffer
+                   (ediff-with-current-buffer standard-output
+                     (fundamental-mode))
                    (princ "\nEdiff has inferred that")
                    (if (string= file1 file2)
                        (princ (format "
@@ -421,7 +427,7 @@ are two possible targets for this patch.  However, these files do not exist."
 (defun ediff-prompt-for-patch-buffer ()
   (get-buffer
    (read-buffer
-    "Patch is in buffer: "
+    "Buffer that holds the patch: "
     (cond ((save-excursion
             (goto-char (point-min))
             (re-search-forward ediff-context-diff-label-regexp nil t))
@@ -438,7 +444,7 @@ are two possible targets for this patch.  However, these files do not exist."
               (goto-char (point-min))
               (and (re-search-forward ediff-context-diff-label-regexp nil t)
                    (current-buffer)))))
-         (t nil))
+         (t (other-buffer (current-buffer) 'visible-ok)))
     'must-match)))
 
 
@@ -482,7 +488,8 @@ optional argument, then use it."
     (if (< (length ediff-patch-map) 2)
        (ediff-patch-file-internal
         patch-buf
-        (if (and (not (string-match "^/dev/null" (car (car ediff-patch-map))))
+        (if (and ediff-patch-map
+                 (not (string-match "^/dev/null" (car (car ediff-patch-map))))
                  (> (length (car (car ediff-patch-map))) 1))
             (car (car ediff-patch-map))
           filename)
@@ -628,6 +635,8 @@ optional argument, then use it."
              (concat true-source-filename ediff-backup-extension)))
        (progn
          (with-output-to-temp-buffer ediff-msg-buffer
+           (ediff-with-current-buffer standard-output
+             (fundamental-mode))
            (princ (format 
                    "Patch program has failed due to a bad patch file,
 it couldn't apply all hunks, OR
@@ -646,12 +655,12 @@ In particular, check the documentation for `ediff-backup-specs'.
 In any of the above cases, Ediff doesn't compare files automatically.
 However, if the patch was applied partially and the backup file was created,
 you can still examine the changes via M-x ediff-files"
-                          ediff-patch-program
-                          ediff-patch-program
-                          ediff-patch-options
-                          ediff-backup-extension
-                          ediff-backup-specs
-                          )))
+                   ediff-patch-program
+                   ediff-patch-program
+                   ediff-patch-options
+                   ediff-backup-extension
+                   ediff-backup-specs
+                   )))
          (beep 1)
          (if (setq aux-wind (get-buffer-window ediff-msg-buffer))
              (progn