(defgroup reftex): Update home page url-link.
[bpt/emacs.git] / lisp / ediff-mult.el
index 0bbd329..b33ad7c 100644 (file)
@@ -648,8 +648,8 @@ behavior."
           (mapcar
            (lambda (elt)
              (ediff-make-new-meta-list-element
-              (concat auxdir1 elt)
-              (concat auxdir2 elt)
+              (expand-file-name (concat auxdir1 elt))
+              (expand-file-name (concat auxdir2 elt))
               (if lis3
                   (progn
                     ;; The following is done because: In merging with
@@ -660,7 +660,7 @@ behavior."
                     ;; the second case, we insert nil.
                     (setq elt (ediff-add-slash-if-directory auxdir3 elt))
                     (if (file-exists-p (concat auxdir3 elt))
-                        (concat auxdir3 elt))))))
+                        (expand-file-name (concat auxdir3 elt)))))))
            common)))
     ;; return result
     (cons common-part difflist)
@@ -716,7 +716,7 @@ behavior."
                                      auxdir1 nil nil
                                      merge-autostore-dir nil)
      (mapcar (lambda (elt) (ediff-make-new-meta-list-element
-                           (concat auxdir1 elt) nil nil))
+                           (expand-file-name (concat auxdir1 elt)) nil nil))
             common))
     ))
 
@@ -1338,7 +1338,10 @@ Useful commands:
        ;; update ediff-meta-list by direct modification
        (nconc meta-list
               (list (ediff-make-new-meta-list-element
-                     otherfile1 otherfile2 otherfile3)))
+                     (expand-file-name otherfile1)
+                     (expand-file-name otherfile2)
+                     (if otherfile3
+                         (expand-file-name otherfile3)))))
       )
     (ediff-update-meta-buffer meta-buf 'must-redraw)
   ))
@@ -1656,22 +1659,26 @@ This operation is defined only for `ediff-directories' and
 multifile patches.  For `ediff-directory-revisions', we insist that
 all marked sessions must be active."
   (interactive)
-  (or (ediff-buffer-live-p ediff-meta-diff-buffer)
-      (setq ediff-meta-diff-buffer
-           (get-buffer-create
-            (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*"))))
-  (ediff-with-current-buffer ediff-meta-diff-buffer
-    (setq buffer-read-only nil)
-    (erase-buffer))
-  (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0)
-      ;; did something
-      (progn
-       (display-buffer ediff-meta-diff-buffer 'not-this-window)
-       (ediff-with-current-buffer ediff-meta-diff-buffer
-         (set-buffer-modified-p nil)
-         (setq buffer-read-only t)))
-    (beep)
-    (message "No marked sessions found")))
+  (let ((coding-system-for-read ediff-coding-system-for-read))
+    (or (ediff-buffer-live-p ediff-meta-diff-buffer)
+       (setq ediff-meta-diff-buffer
+             (get-buffer-create
+              (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*"))))
+    (ediff-with-current-buffer ediff-meta-diff-buffer
+                              (setq buffer-read-only nil)
+                              (erase-buffer))
+    (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0)
+       ;; did something
+       (progn
+         (display-buffer ediff-meta-diff-buffer 'not-this-window)
+         (ediff-with-current-buffer ediff-meta-diff-buffer
+                                    (set-buffer-modified-p nil)
+                                    (setq buffer-read-only t))
+         (if (fboundp 'diff-mode)
+             (with-current-buffer ediff-meta-diff-buffer
+               (diff-mode))))
+      (beep)
+      (message "No marked sessions found"))))
 
 (defun ediff-meta-show-patch ()
   "Show the multi-file patch associated with this group session."