[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v |
Date: |
Sun, 22 Jul 2007 21:28:16 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/07/22 21:28:16
Index: diff-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/diff-mode.el,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- diff-mode.el 22 Jul 2007 21:26:33 -0000 1.104
+++ diff-mode.el 22 Jul 2007 21:28:13 -0000 1.105
@@ -611,9 +611,11 @@
(list (if old (match-string 2) (match-string 4))
(if old (match-string 4) (match-string 2)))))))))
-(defun diff-find-file-name (&optional old prefix)
+(defun diff-find-file-name (&optional old batch prefix)
"Return the file corresponding to the current patch.
Non-nil OLD means that we want the old file.
+Non-nil BATCH means to prefer returning an incorrect answer than to prompt
+the user.
PREFIX is only used internally: don't use it."
(save-excursion
(unless (looking-at diff-file-header-re)
@@ -648,7 +650,10 @@
(boundp 'cvs-pcl-cvs-dirchange-re)
(save-excursion
(re-search-backward cvs-pcl-cvs-dirchange-re nil t))
- (diff-find-file-name old (match-string 1)))
+ (diff-find-file-name old batch (match-string 1)))
+ ;; Invent something, if necessary.
+ (when batch
+ (or (car fs) default-directory))
;; if all else fails, ask the user
(let ((file (read-file-name (format "Use file %s: " (or (first fs) ""))
nil (first fs) t (first fs))))
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v, Stefan Monnier, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v, Stefan Monnier, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v, Stefan Monnier, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v, Stefan Monnier, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v, Miles Bader, 2007/07/26