Show
Ignore:
Timestamp:
11/02/05 00:34:59 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/ediff-ptch.el

    r3894 r3945  
    298298                      (ediff-get-session-objA-name session-info)) 
    299299                     ;; base-dir1 is  the dir part of the 1st file in the patch 
    300                      (base-dir1 (file-name-directory (car proposed-file-names))) 
     300                     (base-dir1 
     301                      (or (file-name-directory (car proposed-file-names)) 
     302                          "")) 
    301303                     ;; directory part of the 2nd file in the patch 
    302                      (base-dir2 (file-name-directory (cdr proposed-file-names))) 
     304                     (base-dir2 
     305                      (or (file-name-directory (cdr proposed-file-names)) 
     306                          "")) 
    303307                     ) 
    304                 ;; If both base-dir1 and base-dir2 are relative, assume that 
     308                ;; If both base-dir1 and base-dir2 are relative and exist, 
     309                ;; assume that 
    305310                ;; these dirs lead to the actual files starting at the present 
    306311                ;; directory. So, we don't strip these relative dirs from the 
    307312                ;; file names. This is a heuristic intended to improve guessing 
    308313                (unless (or (file-name-absolute-p base-dir1) 
    309                             (file-name-absolute-p base-dir2)) 
     314                            (file-name-absolute-p base-dir2) 
     315                            (not (file-exists-p base-dir1)) 
     316                            (not (file-exists-p base-dir2))) 
    310317                  (setq base-dir1 "" 
    311318                        base-dir2 "")) 
     
    378385                )) 
    379386            ediff-patch-map) 
    380     ;; check for the shorter existing file in each pair and discard the other 
    381     ;; one 
     387    ;; Check for the existing files in each pair and discard the nonexisting 
     388    ;; ones. If both exist, ask the user. 
    382389    (mapcar (lambda (session-info) 
    383390              (let* ((file1 (car (ediff-get-session-objA-name session-info)))