User: michaelk
Date: 06/08/25 18:43:20
Modified: packages/xemacs-packages/ediff ediff.texi ediff.el
ediff-wind.el ediff-vers.el ediff-mult.el
ediff-diff.el ChangeLog
Log:
* ediff-mult.el (ediff-intersect-directories,
ediff-get-directory-files-under-revision, ediff-dir-diff-copy-file):
always expand filenames.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
Revision Changes Path
1.35 +18 -8 XEmacs/packages/xemacs-packages/ediff/ediff.texi
Index: ediff.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff.texi,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -r1.34 -r1.35
--- ediff.texi 2006/02/19 03:35:17 1.34
+++ ediff.texi 2006/08/25 16:43:17 1.35
@@ -26,7 +26,7 @@ This file documents Ediff, a comprehensi
and patch utilities.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -135,7 +135,7 @@ The architecture and the interface are,
@chapter Major Entry Points
When Ediff starts up, it displays a small control window, which accepts the
-Ediff commands and two or three windows displaying the files to be compared
+Ediff commands, and two or three windows displaying the files to be compared
or merged. The control window can be in its own small frame or it can be
part of a bigger frame that displays other buffers. In any case, it is
important that the control window be active (i.e., be the one receiving the
@@ -829,7 +829,7 @@ identical to its default setting, as ori
instance, if Ediff is merging according to the `combined' policy, then the
merge region is skipped over if it is different from the combination of the
regions in buffers A and B. (Warning: swapping buffers A and B will confuse
-things in this respect). If the merge region is marked as `prefer-A' then
+things in this respect.) If the merge region is marked as `prefer-A' then
this region will be skipped if it differs from the current difference
region in buffer A, etc.
@@ -1455,7 +1455,7 @@ the control frame.
To start Ediff with an iconified Control Panel, you should set this
variable to @code{t} and @code{ediff-prefer-long-help-message} to
@code{nil} (@pxref{Quick Help Customization}). This behavior is useful
-only if icons are allowed to accept keybord input (which depend on the
+only if icons are allowed to accept keyboard input (which depends on the
window manager and other factors).
@end table
@@ -1599,8 +1599,6 @@ problem.
@vindex ediff-ignore-case
Finally, Ediff can be told to ignore the case of the letters. This behavior
can be toggled with @kbd{#c} and it is controlled with three variables:
-Toggle case sensitivity in the diff program. All diffs are recomputed.
-Case sensitivity is controlled by the variables
@code{ediff-ignore-case-option}, @code{ediff-ignore-case-option3}, and
@code{ediff-ignore-case}.
@@ -1616,6 +1614,9 @@ The variable @code{ediff-ignore-case} co
ignoring letter case or not. It can be set in @file{.emacs} using
@code{setq-default}.
+When case sensitivity is toggled, all difference
+regions are recomputed.
+
@node Highlighting Difference Regions, Narrowing, Selective Browsing, Customization
@section Highlighting Difference Regions
@@ -1682,7 +1683,7 @@ Ediff uses faces to highlight difference
@item ediff-highlight-all-diffs
@vindex ediff-highlight-all-diffs
-Indicates whether---on a windowind display---Ediff should highlight
+Indicates whether---on a windowing display---Ediff should highlight
differences using inserted strings (as on text-only terminals) or using
colors and highlighting. Normally, Ediff highlights all differences, but
the selected difference is highlighted more visibly. One can cycle through
@@ -1721,7 +1722,7 @@ some Lisp code in @file{~/.emacs}. For
@end example
@noindent
-would use the pre-defined fase @code{bold-italic} to highlight the current
+would use the pre-defined face @code{bold-italic} to highlight the current
difference region in buffer A (this face is not a good choice, by the way).
If you are unhappy with just @emph{some} of the aspects of the default
@@ -2318,6 +2319,14 @@ prior to starting Ediff, so Ediff just p
Using @code{ediff-cleanup-hook}, one can make Ediff delete the variants
unconditionally (e.g., by making @code{ediff-janitor} into one of these hooks).
+
+@item ediff-keep-tmp-versions
+@vindex @code{ediff-keep-tmp-versions}
+Default is @code{nil}. If @code{t}, the versions of the files being
+compared or merged using operations such as @code{ediff-revision} or
+@code{ediff-merge-revisions} are not deleted on exit. The normal action is
+to clean up and delete these version files.
+
@item ediff-grab-mouse
@vindex @code{ediff-grab-mouse}
Default is @code{t}. Normally, Ediff grabs mouse and puts it in its
@@ -2459,6 +2468,7 @@ Karl Heuer (kwzh@(a)gnu.org),
(jaffe@(a)chipmunk.cita.utoronto.ca),
David Karr (dkarr@(a)nmo.gtegsc.com),
Norbert Kiesel (norbert@(a)i3.informatik.rwth-aachen.de),
+Steffen Kilb (skilb@(a)gmx.net),
Leigh L Klotz (klotz@(a)adoc.xerox.com),
Fritz Knabe (Fritz.Knabe@(a)ecrc.de),
Heinz Knutzen (hk@(a)informatik.uni-kiel.d400.de),
1.34 +69 -79 XEmacs/packages/xemacs-packages/ediff/ediff.el
Index: ediff.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff.el,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- ediff.el 2006/02/19 03:35:17 1.33
+++ ediff.el 2006/08/25 16:43:18 1.34
@@ -210,12 +210,11 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1)))
)))
(ediff-files-internal file-A
@@ -246,25 +245,22 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons
- (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "File C to compare"
(setq dir-C (if ediff-use-last-dir
ediff-last-dir-C
(file-name-directory ff)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory ff)
- dir-C))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory ff)
+ dir-C)))
(ediff-get-default-file-name ff 2)))
)))
(ediff-files-internal file-A
@@ -504,12 +500,13 @@ expression; only file names that match t
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil))
- (ediff-read-file-name "Directory B to compare:"
- (if ediff-use-last-dir
- ediff-last-dir-B
- (ediff-strip-last-dir f))
- nil)
+ (list (setq f (read-directory-name
+ "Directory A to compare:" dir-A nil 'must-match))
+ (read-directory-name "Directory B to compare:"
+ (if ediff-use-last-dir
+ ediff-last-dir-B
+ (ediff-strip-last-dir f))
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -536,8 +533,8 @@ names. Only the files that are under re
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
)
- (list (ediff-read-file-name
- "Directory to compare with revision:" dir-A nil)
+ (list (read-directory-name
+ "Directory to compare with revision:" dir-A nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -565,17 +562,17 @@ regular expression; only file names that
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil))
- (setq f (ediff-read-file-name "Directory B to compare:"
- (if ediff-use-last-dir
- ediff-last-dir-B
- (ediff-strip-last-dir f))
- nil))
- (ediff-read-file-name "Directory C to compare:"
- (if ediff-use-last-dir
- ediff-last-dir-C
- (ediff-strip-last-dir f))
- nil)
+ (list (setq f (read-directory-name "Directory A to compare:" dir-A nil))
+ (setq f (read-directory-name "Directory B to compare:"
+ (if ediff-use-last-dir
+ ediff-last-dir-B
+ (ediff-strip-last-dir f))
+ nil 'must-match))
+ (read-directory-name "Directory C to compare:"
+ (if ediff-use-last-dir
+ ediff-last-dir-C
+ (ediff-strip-last-dir f))
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -601,12 +598,13 @@ expression; only file names that match t
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil))
- (ediff-read-file-name "Directory B to merge:"
- (if ediff-use-last-dir
- ediff-last-dir-B
- (ediff-strip-last-dir f))
- nil)
+ (list (setq f (read-directory-name "Directory A to merge:"
+ dir-A nil 'must-match))
+ (read-directory-name "Directory B to merge:"
+ (if ediff-use-last-dir
+ ediff-last-dir-B
+ (ediff-strip-last-dir f))
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -637,17 +635,17 @@ only file names that match the regexp ar
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil))
- (setq f (ediff-read-file-name "Directory B to merge:"
+ (list (setq f (read-directory-name "Directory A to merge:" dir-A nil))
+ (setq f (read-directory-name "Directory B to merge:"
(if ediff-use-last-dir
ediff-last-dir-B
(ediff-strip-last-dir f))
- nil))
- (ediff-read-file-name "Ancestor directory:"
+ nil 'must-match))
+ (read-directory-name "Ancestor directory:"
(if ediff-use-last-dir
ediff-last-dir-C
(ediff-strip-last-dir f))
- nil)
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -673,8 +671,8 @@ names. Only the files that are under re
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
)
- (list (ediff-read-file-name
- "Directory to merge with revisions:" dir-A nil)
+ (list (read-directory-name
+ "Directory to merge with revisions:" dir-A nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -703,8 +701,9 @@ names. Only the files that are under re
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
)
- (list (ediff-read-file-name
- "Directory to merge with revisions and ancestors:" dir-A nil)
+ (list (read-directory-name
+ "Directory to merge with revisions and ancestors:"
+ dir-A nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -737,11 +736,6 @@ names. Only the files that are under re
(defun ediff-directories-internal (dir1 dir2 dir3 regexp action jobname
&optional startup-hooks
merge-autostore-dir)
- ;; ediff-read-file-name is set to attach a previously entered file name if
- ;; the currently entered file is a directory. This code takes care of that.
- (setq dir1 (if (file-directory-p dir1) dir1 (file-name-directory dir1))
- dir2 (if (file-directory-p dir2) dir2 (file-name-directory dir2)))
-
(if (stringp dir3)
(setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3))))
@@ -767,7 +761,7 @@ names. Only the files that are under re
(ediff-merge-metajob jobname)
(not merge-autostore-dir))
(setq merge-autostore-dir
- (read-file-name "Save merged files in directory: "
+ (read-directory-name "Save merged files in directory: "
(if ediff-use-last-dir
ediff-last-merge-autostore-dir
(ediff-strip-last-dir dir1))
@@ -827,7 +821,7 @@ names. Only the files that are under re
(ediff-merge-metajob jobname)
(not merge-autostore-dir))
(setq merge-autostore-dir
- (read-file-name "Save merged files in directory: "
+ (read-directory-name "Save merged files in directory: "
(if ediff-use-last-dir
ediff-last-merge-autostore-dir
(ediff-strip-last-dir dir1))
@@ -1109,12 +1103,11 @@ lines. For small regions, use `ediff-re
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
@@ -1153,13 +1146,11 @@ lines. For small regions, use `ediff-re
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons
- (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "Ancestor file"
(setq dir-ancestor
@@ -1167,12 +1158,11 @@ lines. For small regions, use `ediff-re
ediff-last-dir-ancestor
(file-name-directory ff)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory ff)
- dir-ancestor))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory ff)
+ dir-ancestor)))
(ediff-get-default-file-name ff 2)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
1.24 +2 -0 XEmacs/packages/xemacs-packages/ediff/ediff-wind.el
Index: ediff-wind.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-wind.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- ediff-wind.el 2006/02/19 03:35:17 1.23
+++ ediff-wind.el 2006/08/25 16:43:18 1.24
@@ -158,6 +158,8 @@ In this case, Ediff will use those frame
'(scrollbar-height . 0) ; XEmacs only
'(menu-bar-lines . 0) ; Emacs only
'(tool-bar-lines . 0) ; Emacs 21+ only
+ '(left-fringe . 0)
+ '(right-fringe . 0)
;; don't lower but auto-raise
'(auto-lower . nil)
'(auto-raise . t)
1.16 +19 -7 XEmacs/packages/xemacs-packages/ediff/ediff-vers.el
Index: ediff-vers.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-vers.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- ediff-vers.el 2006/02/19 03:35:18 1.15
+++ ediff-vers.el 2006/08/25 16:43:18 1.16
@@ -52,6 +52,13 @@
)))
;; end pacifier
+(defcustom ediff-keep-tmp-versions nil
+ "*If t, do not delete temporary previous versions for the files on which
+comparison or merge operations are being performed."
+:type 'boolean
+:group 'ediff-vers
+ )
+
;; VC.el support
(defun ediff-vc-latest-version (file)
@@ -87,8 +94,8 @@
file2 (buffer-file-name)))
(setq startup-hooks
(cons `(lambda ()
- (delete-file ,file1)
- (or ,(string= rev2 "") (delete-file ,file2)))
+ (ediff-delete-version-file ,file1)
+ (or ,(string= rev2 "") (ediff-delete-version-file ,file2)))
startup-hooks)))
(ediff-buffers
rev1buf rev2buf
@@ -199,12 +206,12 @@
(setq startup-hooks
(cons
`(lambda ()
- (delete-file ,(buffer-file-name buf1))
+ (ediff-delete-version-file ,(buffer-file-name buf1))
(or ,(string= rev2 "")
- (delete-file ,(buffer-file-name buf2)))
+ (ediff-delete-version-file ,(buffer-file-name buf2)))
(or ,(string= ancestor-rev "")
,(not ancestor-rev)
- (delete-file ,(buffer-file-name ancestor-buf)))
+ (ediff-delete-version-file ,(buffer-file-name ancestor-buf)))
)
startup-hooks)))
(if ancestor-rev
@@ -305,8 +312,13 @@
(find-file-noselect (cvs-fileinfo->full-name fileinfo)))
nil ; startup-hooks
'ediff-revisions)))
- (if (stringp tmp-file) (delete-file tmp-file))
- (if (stringp ancestor-file) (delete-file ancestor-file))))
+ (if (stringp tmp-file) (ediff-delete-version-file tmp-file))
+ (if (stringp ancestor-file) (ediff-delete-version-file ancestor-file))))
+
+
+;; delete version file on exit unless ediff-keep-tmp-versions is true
+(defun ediff-delete-version-file (file)
+ (or ediff-keep-tmp-versions (delete-file file)))
(provide 'ediff-vers)
1.26 +28 -21 XEmacs/packages/xemacs-packages/ediff/ediff-mult.el
Index: ediff-mult.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-mult.el,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- ediff-mult.el 2006/02/19 03:35:18 1.25
+++ ediff-mult.el 2006/08/25 16:43:18 1.26
@@ -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 `edif
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."
1.29 +53 -35 XEmacs/packages/xemacs-packages/ediff/ediff-diff.el
Index: ediff-diff.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-diff.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- ediff-diff.el 2006/02/22 06:52:34 1.28
+++ ediff-diff.el 2006/08/25 16:43:18 1.29
@@ -65,8 +65,11 @@ Must produce output compatible with Unix
;; The following functions needed for setting diff/diff3 options
;; test if diff supports the --binary option
(defsubst ediff-test-utility (diff-util option &optional files)
- (eq 0 (apply 'call-process
- (append (list diff-util nil nil nil option) files))))
+ (condition-case nil
+ (eq 0 (apply 'call-process
+ (append (list diff-util nil nil nil option) files)))
+ (error (format "Cannot execute program %S." diff-util)))
+ )
(defun ediff-diff-mandatory-option (diff-util)
(let ((file (if (boundp 'null-device) null-device "/dev/null")))
@@ -75,13 +78,17 @@ Must produce output compatible with Unix
((and (string= diff-util ediff-diff-program)
(ediff-test-utility
ediff-diff-program "--binary" (list file file)))
- "--binary")
+ "--binary ")
((and (string= diff-util ediff-diff3-program)
(ediff-test-utility
ediff-diff3-program "--binary" (list file file file)))
- "--binary")
+ "--binary ")
(t ""))))
+
+;; must be before ediff-reset-diff-options to avoid compiler errors
+(fset 'ediff-set-actual-diff-options '(lambda () nil))
+
;; make sure that mandatory options are added even if the user changes
;; ediff-diff-options or ediff-diff3-options in the customization widget
(defun ediff-reset-diff-options (symb val)
@@ -89,12 +96,9 @@ Must produce output compatible with Unix
(if (eq symb 'ediff-diff-options)
ediff-diff-program
ediff-diff3-program))
- (mandatory-option (ediff-diff-mandatory-option diff-program))
- (spacer (if (string-equal mandatory-option "") "" " ")))
- (set symb
- (if (string-match mandatory-option val)
- val
- (concat mandatory-option spacer val)))
+ (mandatory-option (ediff-diff-mandatory-option diff-program)))
+ (set symb (concat mandatory-option val))
+ (ediff-set-actual-diff-options)
))
@@ -128,10 +132,10 @@ are `-I REGEXP', to ignore changes whose
(defcustom ediff-diff-options ""
"*Options to pass to `ediff-diff-program'.
-If Unix diff is used as `ediff-diff-program', then a useful option is
-`-w', to ignore space, and `-i', to ignore case of letters.
-Options `-c' and `-i' are not allowed. Case sensitivity can be toggled
-interactively using [ediff-toggle-ignore-case]"
+If Unix diff is used as `ediff-diff-program',
+ then a useful option is `-w', to ignore space.
+Options `-c' and `-i' are not allowed. Case sensitivity can be
+ toggled interactively using \\[ediff-toggle-ignore-case]."
:set 'ediff-reset-diff-options
:type 'string
:group 'ediff-diff)
@@ -153,7 +157,7 @@ GNU diff3 doesn't have such an option."
:group 'ediff-diff)
;; the actual options used in comparison
-(ediff-defvar-local ediff-actual-diff-options "" "")
+(ediff-defvar-local ediff-actual-diff-options ediff-diff-options "")
(defcustom ediff-custom-diff-program ediff-diff-program
"*Program to use for generating custom diff output for saving it in a file.
@@ -176,7 +180,7 @@ This output is not used by Ediff interna
:group 'ediff-diff)
;; the actual options used in comparison
-(ediff-defvar-local ediff-actual-diff3-options "" "")
+(ediff-defvar-local ediff-actual-diff3-options ediff-diff3-options "")
(defcustom ediff-diff3-ok-lines-regexp
"^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)"
@@ -399,7 +403,7 @@ one optional arguments, diff-number to r
(c-prev-pt nil)
diff-list shift-A shift-B
)
-
+
;; diff list contains word numbers, unless changed later
(setq diff-list (cons (if word-mode 'words 'points)
diff-list))
@@ -411,7 +415,7 @@ one optional arguments, diff-number to r
shift-B
(ediff-overlay-start
(ediff-get-value-according-to-buffer-type 'B bounds))))
-
+
;; reset point in buffers A/B/C
(ediff-with-current-buffer A-buffer
(goto-char (if shift-A shift-A (point-min))))
@@ -1270,7 +1274,9 @@ delimiter regions"))
;; Similarly for Windows-*
;; In DOS, must synchronize because DOS doesn't have
;; asynchronous processes.
- (apply 'call-process program nil buffer nil args)
+ (condition-case nil
+ (apply 'call-process program nil buffer nil args)
+ (error (format "Cannot execute program %S." program)))
;; On other systems, do it asynchronously.
(setq proc (get-buffer-process buffer))
(if proc (kill-process proc))
@@ -1326,7 +1332,8 @@ delimiter regions"))
Used for splitting difference regions into individual words.")
(make-variable-buffer-local 'ediff-forward-word-function)
-(defvar ediff-whitespace " \n\t\f"
+;; \240 is unicode symbol for nonbreakable whitespace
+(defvar ediff-whitespace " \n\t\f\r\240"
"*Characters constituting white space.
These characters are ignored when differing regions are split into words.")
(make-variable-buffer-local 'ediff-whitespace)
@@ -1440,11 +1447,13 @@ arguments to `skip-chars-forward'."
"Return t if files F1 and F2 have identical contents."
(if (and (not (file-directory-p f1))
(not (file-directory-p f2)))
- (let ((res
- (apply 'call-process ediff-cmp-program nil nil nil
- (append ediff-cmp-options (list f1 f2)))))
- (and (numberp res) (eq res 0))))
- )
+ (condition-case nil
+ (let ((res
+ (apply 'call-process ediff-cmp-program nil nil nil
+ (append ediff-cmp-options (list f1 f2)))))
+ (and (numberp res) (eq res 0)))
+ (error (format "Cannot execute program %S." ediff-cmp-program)))
+ ))
(defun ediff-same-contents (d1 d2 &optional filter-re)
@@ -1519,21 +1528,30 @@ affects only files whose names match the
(setq file-list-list (cdr file-list-list)))
(reverse result)))
+
+(defun ediff-set-actual-diff-options ()
+ (if ediff-ignore-case
+ (setq ediff-actual-diff-options
+ (concat ediff-diff-options " " ediff-ignore-case-option)
+ ediff-actual-diff3-options
+ (concat ediff-diff3-options " " ediff-ignore-case-option3))
+ (setq ediff-actual-diff-options ediff-diff-options
+ ediff-actual-diff3-options ediff-diff3-options)
+ )
+ (setq-default ediff-actual-diff-options ediff-actual-diff-options
+ ediff-actual-diff3-options ediff-actual-diff3-options)
+ )
+
+
;; Ignore case handling - some ideas from drew.adams@(a)oracle.com
(defun ediff-toggle-ignore-case ()
(interactive)
(ediff-barf-if-not-control-buffer)
(setq ediff-ignore-case (not ediff-ignore-case))
- (cond (ediff-ignore-case
- (setq ediff-actual-diff-options
- (concat ediff-diff-options " " ediff-ignore-case-option)
- ediff-actual-diff3-options
- (concat ediff-diff3-options " " ediff-ignore-case-option3))
- (message "Ignoring regions that differ only in case"))
- (t
- (setq ediff-actual-diff-options ediff-diff-options
- ediff-actual-diff3-options ediff-diff3-options)
- (message "Ignoring case differences turned OFF")))
+ (ediff-set-actual-diff-options)
+ (if ediff-ignore-case
+ (message "Ignoring regions that differ only in case")
+ (message "Ignoring case differences turned OFF"))
(cond (ediff-merge-job
(message "Ignoring letter case is too dangerous in merge jobs"))
((and ediff-diff3-job (string= ediff-ignore-case-option3 ""))
1.104 +30 -0 XEmacs/packages/xemacs-packages/ediff/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ChangeLog,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -p -r1.103 -r1.104
--- ChangeLog 2006/02/22 12:53:13 1.103
+++ ChangeLog 2006/08/25 16:43:18 1.104
@@ -1,3 +1,33 @@
+2006-08-25 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * ediff-mult.el (ediff-intersect-directories,
+ ediff-get-directory-files-under-revision, ediff-dir-diff-copy-file):
+ always expand filenames.
+ * ediff-diff (ediff-test-patch-utility): catch errors.
+ (ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
+ (ediff-set-actual-diff-options): new function.
+ (ediff-reset-diff-options, ediff-toggle-ignore-case):
+ use ediff-set-actual-diff-options.
+ (ediff-extract-diffs): catch errors.
+ (ediff-whitespace): add nonbreakable space.
+ (ediff-same-file-contents): catch errors.
+
+ * ediff-mult.el (ediff-collect-custom-diffs): save
+ coding-system-for-read.
+
+ * ediff-vers.el (ediff-keep-tmp-versions): new var.
+ (ediff-vc-internal, ediff-vc-merge-internal): use
+ ediff-delete-version-file.
+ (ediff-delete-version-file): new function.
+
+ * ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
+
+ * ediff.el (ediff-directories, ediff-directory-revisions,
+ ediff-merge-directories, ediff-merge-directories-with-ancestor,
+ ediff-directories-internal, ediff-merge-directory-revisions,
+ ediff-merge-directory-revisions-with-ancestor,
+ ediff-directories3): use read-directory-name.
+
2006-02-22 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.62 released.