]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/ediff.el
; Merge from origin/emacs-25
[gnu-emacs] / lisp / vc / ediff.el
index 5418039143fededb6b2316503dc5a2c4a2706eec..a4244c941d217d0b249724e07baed8a6443ee267 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ediff.el --- a comprehensive visual interface to diff & patch
 
-;; Copyright (C) 1994-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Created: February 2, 1994
@@ -963,7 +963,7 @@ If WIND-B is nil, use window next to WIND-A."
 ;;;###autoload
 (defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks)
   "Run Ediff on a pair of regions in specified buffers.
-Regions \(i.e., point and mark\) can be set in advance or marked interactively.
+Regions (i.e., point and mark) can be set in advance or marked interactively.
 This function is effective only for relatively small regions, up to 200
 lines.  For large regions, use `ediff-regions-linewise'."
   (interactive
@@ -1003,7 +1003,7 @@ lines.  For large regions, use `ediff-regions-linewise'."
 ;;;###autoload
 (defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks)
   "Run Ediff on a pair of regions in specified buffers.
-Regions \(i.e., point and mark\) can be set in advance or marked interactively.
+Regions (i.e., point and mark) can be set in advance or marked interactively.
 Each region is enlarged to contain full lines.
 This function is effective for large regions, over 100-200
 lines.  For small regions, use `ediff-regions-wordwise'."
@@ -1294,7 +1294,7 @@ buffer."
   (let (rev1 rev2)
     (setq rev1
          (read-string
-          (format
+          (format-message
            "Version 1 to merge (default %s's working version): "
            (if (stringp file)
                (file-name-nondirectory file) "current buffer")))
@@ -1326,7 +1326,7 @@ buffer."
   (let (rev1 rev2 ancestor-rev)
     (setq rev1
          (read-string
-          (format
+          (format-message
            "Version 1 to merge (default %s's working version): "
            (if (stringp file)
                (file-name-nondirectory file) "current buffer")))
@@ -1338,7 +1338,7 @@ buffer."
                (file-name-nondirectory file) "current buffer")))
          ancestor-rev
          (read-string
-          (format
+          (format-message
            "Ancestor version (default %s's base revision): "
            (if (stringp file)
                (file-name-nondirectory file) "current buffer"))))
@@ -1367,7 +1367,8 @@ buffer. If odd -- assume it is in a file."
     (require 'ediff-ptch)
     (setq patch-buf
          (ediff-get-patch-buffer
-          (if arg (prefix-numeric-value arg)) patch-buf))
+          (and arg (prefix-numeric-value arg))
+           (and patch-buf (get-buffer patch-buf))))
     (setq source-dir (cond (ediff-use-last-dir ediff-last-dir-patch)
                           ((and (not ediff-patch-default-directory)
                                 (buffer-file-name patch-buf))
@@ -1401,9 +1402,8 @@ patch. If not given, the user is prompted according to the prefix argument."
         (if arg (prefix-numeric-value arg)) patch-buf))
   (ediff-patch-buffer-internal
    patch-buf
-   (read-buffer
-    "Which buffer to patch? "
-    (ediff-other-buffer patch-buf))))
+   (read-buffer "Which buffer to patch? " (ediff-other-buffer patch-buf)
+                'require-match)))
 
 
 ;;;###autoload