Show
Ignore:
Timestamp:
09/18/06 20:48:14 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/diff-mode.el

    r4111 r4166  
    12601260             msg line-offset))) 
    12611261 
     1262(defvar diff-apply-hunk-to-backup-file nil) 
    12621263 
    12631264(defun diff-apply-hunk (&optional reverse) 
     
    12761277     ((null line-offset) 
    12771278      (error "Can't find the text to patch")) 
     1279     ((with-current-buffer buf 
     1280        (and buffer-file-name 
     1281             (backup-file-name-p buffer-file-name) 
     1282             (not diff-apply-hunk-to-backup-file) 
     1283             (not (set (make-local-variable 'diff-apply-hunk-to-backup-file) 
     1284                       (yes-or-no-p (format "Really apply this hunk to %s? " 
     1285                                            (file-name-nondirectory 
     1286                                             buffer-file-name))))))) 
     1287      (error (substitute-command-keys 
     1288              (format "Use %s\\[diff-apply-hunk] to apply it to the other file" 
     1289                      (if (not reverse) "\\[universal-argument] "))))) 
    12781290     ((and switched 
    12791291           ;; A reversed patch was detected, perhaps apply it in reverse.