User: michaelk
Date: 05/02/19 05:43:43
Modified: packages/xemacs-packages/ediff ediff.texi ediff.el
ediff-mult.el ediff-init.el ediff-diff.el ChangeLog
Log:
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
ediff-set-fine-overlays-in-one-buffer,ediff-goto-word) make sure
we use the syntax table of the correct buffer.
(ediff-same-file-contents,ediff-same-contents): enhancements thanks to
Felix Gatzemeier.
* ediff-init.el (ediff-hide-face): checks for definedness of functions.
(ediff-file-remote-p): make synonymous with file-remote-p.
In all deffaces ediff-*-face-*, use min-colors.
* ediff-mult.el (ediff-meta-mark-equal-files): make use of
ediff-recurse-to-subdirectories.
(ediff-mark-if-equal): check that the arguments are strings, use
ediff-same-contents (after to Felix Gatzemeier).
* ediff.el (ediff-merge-on-startup): don't set buffer-modified-p to
nil.
Revision Changes Path
1.29 +23 -12 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.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ediff.texi 2003/05/18 17:49:45 1.28
+++ ediff.texi 2005/02/19 04:43:37 1.29
@@ -641,7 +641,7 @@
@kindex h
Cycles between full highlighting, the mode where fine differences are not
highlighted (but computed), and the mode where highlighting is done with
-ASCII strings. The latter is not really recommended, unless on a dumb TTY.
+@acronym{ASCII} strings. The latter is not really recommended, unless on a dumb TTY.
@item r
@kindex r
@@ -1067,7 +1067,7 @@
@vindex ediff-autostore-merges
For group sessions created to merge files, Ediff can store all merges
automatically in a directory. The user is asked to specify such directory
-if the value of @code{ediff-autostore-merges} is non-nil. If the value is
+if the value of @code{ediff-autostore-merges} is non-@code{nil}. If the value is
@code{nil}, nothing is done to the merge buffers---it will be the user's
responsibility to save them. If the value is @code{t}, the user will be
asked where to save the merge buffers in all merge jobs, even those that do
@@ -1106,12 +1106,20 @@
many ways to create diff output, and it is easier to handle by running
Ediff on the inactive sessions.
-Last, but not least, by typing @kbd{=}, you can quickly find out which
-sessions have identical files, so you won't have to run Ediff on those
+Last, but not least, by typing @kbd{==}, you can quickly find out which
+sessions have identical entries, so you won't have to run Ediff on those
sessions. This, however, works only on local, uncompressed files.
For compressed or remote files, this command won't report anything.
+Likewise, you can use @kbd{=h} to mark sessions with identical entries
+for hiding or, with @kbd{=m}, for further operations.
+The comparison operations @kbd{==}, @kbd{=h}, and @kbd{=m} can recurse into
+subdirectories to see if they have identical contents (so the user will not
+need to descend into those subdirectories manually). These commands ask the
+user whether or not to do a recursive descent.
+
+
@node Remote and Compressed Files, Customization, Session Groups, Top
@chapter Remote and Compressed Files
@@ -1558,7 +1566,7 @@
via the command @kbd{##}.
@end table
-@strong{Note:} In order for this feature to work, auto-refining of
+@strong{Please note:} in order for this feature to work, auto-refining of
difference regions must be on, since otherwise Ediff won't know if there
are fine differences between regions. On devices where Emacs can display
faces, auto-refining is a default, but it is not turned on by default on
@@ -1693,8 +1701,8 @@
ediff-current-diff-face-B)))
@end smallexample
-@strong{Note:} To set Ediff's faces, use only @code{copy-face} or
-@code{set/make-face-@dots{}} as shown above. Emacs' low-level
+@strong{Please note:} to set Ediff's faces, use only @code{copy-face}
+or @code{set/make-face-@dots{}} as shown above. Emacs' low-level
face-manipulation functions should be avoided.
@node Narrowing, Refinement of Difference Regions, Highlighting Difference Regions,
Customization
@@ -2338,11 +2346,11 @@
@item ediff-buffer-C
In three-way comparisons, this is the third buffer being compared.
In merging, this is the merge buffer.
-In two-way comparison, this variable is nil.
+In two-way comparison, this variable is @code{nil}.
@item ediff-window-A
The window displaying buffer A. If buffer A is not visible, this variable
-is nil or it may be a dead window.
+is @code{nil} or it may be a dead window.
@item ediff-window-B
The window displaying buffer B.
@@ -2351,9 +2359,9 @@
The window displaying buffer C, if any.
@item ediff-control-frame
-A dedicated frame displaying the control buffer, if it exists.
-It is non-nil only if Ediff uses the multiframe display, i.e., when the
-control buffer is in its own frame.
+A dedicated frame displaying the control buffer, if it exists. It is
+non-@code{nil} only if Ediff uses the multiframe display, i.e., when
+the control buffer is in its own frame.
@end table
@node Credits, Index, Customization, Top
@@ -2395,11 +2403,13 @@
Xavier Fornari (xavier@(a)europe.cma.fr),
Eric Freudenthal (freudent@(a)jan.ultra.nyu.edu),
Job Ganzevoort (Job.Ganzevoort@(a)cwi.nl),
+Felix Heinrich Gatzemeier (felix.g@(a)tzemeier.info),
Boris Goldowsky (boris@(a)cs.rochester.edu),
Allan Gottlieb (gottlieb@(a)allan.ultra.nyu.edu),
Aaron Gross (aaron@(a)bfr.co.il),
Thorbjoern Hansen (thorbjoern.hansen@(a)mchp.siemens.de),
Marcus Harnisch (marcus_harnisch@(a)mint-tech.com),
+Steven E. Harris (seh@(a)panix.com),
Xiaoli Huang (hxl@(a)epic.com),
Andreas Jaeger (aj@(a)suse.de),
Lars Magne Ingebrigtsen (larsi@(a)ifi.uio.no),
@@ -2428,6 +2438,7 @@
Erik Naggum (erik@(a)naggum.no),
Eyvind Ness (Eyvind.Ness@(a)hrp.no),
Ray Nickson (nickson@(a)cs.uq.oz.au),
+Dan Nicolaescu (dann@(a)ics.uci.edu),
David Petchey (petchey_david@(a)jpmorgan.com),
Benjamin Pierce (benjamin.pierce@(a)cl.cam.ac.uk),
Francois Pinard (pinard@(a)iro.umontreal.ca),
1.26 +55 -5 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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ediff.el 2003/10/13 01:35:35 1.25
+++ ediff.el 2005/02/19 04:43:37 1.26
@@ -1,13 +1,13 @@
;;; ediff.el --- a comprehensive visual interface to diff & patch
-;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 Free Software Foundation,
Inc.
+;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03, 05 Free Software
Foundation, Inc.
;; Author: Michael Kifer <kifer(a)cs.stonybrook.edu>
;; Created: February 2, 1994
;; Keywords: comparing, merging, patching, tools, unix
-(defconst ediff-version "2.78" "The current version of Ediff")
-(defconst ediff-date "May 18, 2003" "Date of last update")
+(defconst ediff-version "2.80" "The current version of Ediff")
+(defconst ediff-date "February 19, 2005" "Date of last update")
;; This file is part of GNU Emacs.
@@ -1080,8 +1080,11 @@
(defsubst ediff-merge-on-startup ()
(ediff-do-merge 0)
- (ediff-with-current-buffer ediff-buffer-C
- (set-buffer-modified-p nil)))
+ ;; Can't remember why this is here, but it may cause the automatically merged
+ ;; buffer to be lost. So, keep the buffer modified.
+ ;;(ediff-with-current-buffer ediff-buffer-C
+ ;; (set-buffer-modified-p nil))
+ )
;;;###autoload
(defun ediff-merge-files (file-A file-B
@@ -1474,6 +1477,53 @@
(set-window-buffer ctl-window ctl-buf)))))))
+(dolist (mess '("^Errors in diff output. Diff output is in "
+ "^Hmm... I don't see an Ediff command around here...$"
+ "^Undocumented command! Type `G' in Ediff Control Panel to
drop a note to the Ediff maintainer$"
+ ": This command runs in Ediff Control Buffer only!$"
+ ": Invalid op in ediff-check-version$"
+ "^ediff-shrink-window-C can be used only for merging jobs$"
+ "^Lost difference info on these directories$"
+ "^This command is inapplicable in the present context$"
+ "^This session group has no parent$"
+ "^Can't hide active session, $"
+ "^Ediff: something wrong--no multiple diffs buffer$"
+ "^Can't make context diff for Session $"
+ "^The patch buffer wasn't found$"
+ "^Aborted$"
+ "^This Ediff session is not part of a session group$"
+ "^No active Ediff sessions or corrupted session registry$"
+ "^No session info in this line$"
+ "^`.*' is not an ordinary file$"
+ "^Patch appears to have failed$"
+ "^Recomputation of differences cancelled$"
+ "^No fine differences in this mode$"
+ "^Lost connection to ancestor buffer...sorry$"
+ "^Not merging with ancestor$"
+ "^Don't know how to toggle read-only in buffer "
+ "Emacs is not running as a window application$"
+ "^This command makes sense only when merging with an
ancestor$"
+ "^At end of the difference list$"
+ "^At beginning of the difference list$"
+ "^Nothing saved for diff .* in buffer "
+ "^Buffer is out of sync for file "
+ "^Buffer out of sync for file "
+ "^Output from `diff' not found$"
+ "^You forgot to specify a region in buffer "
+ "^All right. Make up your mind and come back...$"
+ "^Current buffer is not visiting any file$"
+ "^Failed to retrieve revision: $"
+ "^Can't determine display width.$"
+ "^File `.*' does not exist or is not readable$"
+ "^File `.*' is a directory$"
+ "^Buffer .* doesn't exist$"
+ "^Directories . and . are the same: "
+ "^Directory merge aborted$"
+ "^Merge of directory revisions aborted$"
+ "^Buffer .* doesn't exist$"
+ "^There is no file to merge$"
+ "^Version control package .*.el not found. Use vc.el
instead$"))
+ (add-to-list 'debug-ignored-errors mess))
;;; Local Variables:
1.20 +11 -8 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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ediff-mult.el 2003/10/13 01:35:35 1.19
+++ ediff-mult.el 2005/02/19 04:43:37 1.20
@@ -1,6 +1,6 @@
;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff
-;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer(a)cs.stonybrook.edu>
@@ -167,6 +167,9 @@
;; buffer used to collect custom diffs from individual sessions in the group
(ediff-defvar-local ediff-meta-diff-buffer nil "")
+;; t means recurse into subdirs when deciding which files have same contents
+(ediff-defvar-local ediff-recurse-to-subdirectories nil "")
+
;; history var to use for filtering groups of files
(defvar ediff-filtering-regexp-history nil "")
@@ -200,7 +203,7 @@
(defcustom ediff-meta-truncate-filenames t
"*If non-nil, truncate long file names in the session group buffers.
This can be toggled with `ediff-toggle-filename-truncation'."
- :type 'hook
+ :type 'boolean
:group 'ediff-mult)
(defcustom ediff-registry-setup-hook nil
"*Hooks run just after the registry control panel is set up."
@@ -2349,6 +2352,7 @@
))
(setq list (cdr list)))
(message "Comparing files ... Done"))
+ (setq ediff-recurse-to-subdirectories nil)
(ediff-update-meta-buffer (current-buffer) 'must-redraw))
;; mark files 1 and 2 as equal, if they are.
@@ -2356,12 +2360,11 @@
(defun ediff-mark-if-equal (fileinfo1 fileinfo2)
(let ((f1 (car fileinfo1))
(f2 (car fileinfo2)))
- (cond ((file-directory-p f1) nil)
- ((file-directory-p f2) nil)
- ((ediff-same-file-contents f1 f2)
- (ediff-set-file-eqstatus fileinfo1 t)
- (ediff-set-file-eqstatus fileinfo2 t)
- t))
+ (if (and (stringp f1) (stringp f2) (ediff-same-contents f1 f2))
+ (progn
+ (ediff-set-file-eqstatus fileinfo1 t)
+ (ediff-set-file-eqstatus fileinfo2 t)
+ ))
))
1.31 +180 -66 XEmacs/packages/xemacs-packages/ediff/ediff-init.el
Index: ediff-init.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-init.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ediff-init.el 2003/05/18 17:49:46 1.30
+++ ediff-init.el 2005/02/19 04:43:37 1.31
@@ -1,6 +1,6 @@
;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff
-;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation,
Inc.
;; Author: Michael Kifer <kifer(a)cs.stonybrook.edu>
@@ -895,15 +895,23 @@
(sit-for 1)))))
(defun ediff-hide-face (face)
- (if (and (ediff-has-face-support-p) ediff-emacs-p)
+ (if (and (ediff-has-face-support-p)
+ (boundp 'add-to-list)
+ (boundp 'facemenu-unlisted-faces))
(add-to-list 'facemenu-unlisted-faces face)))
(defface ediff-current-diff-face-A
- '((((type tty)) (:foreground "blue3" :background
"yellow3"))
- (((class color)) (:foreground "firebrick" :background "pale
green"))
- (t (:inverse-video t)))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "firebrick" :background "pale green"))
+ (((class color))
+ (:foreground "blue3" :background "yellow3"))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "blue3" :background
"yellow3"))
+ (((class color)) (:foreground "firebrick" :background "pale
green"))
+ (t (:inverse-video t))))
"Face for highlighting the selected difference in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -924,10 +932,17 @@
(defface ediff-current-diff-face-B
- '((((type tty)) (:foreground "magenta3" :background
"yellow3"
- :weight bold))
- (((class color)) (:foreground "DarkOrchid" :background
"Yellow"))
- (t (:inverse-video t)))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "DarkOrchid" :background "Yellow"))
+ (((class color))
+ (:foreground "magenta3" :background "yellow3"
+ :weight bold))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "magenta3" :background
"yellow3"
+ :weight bold))
+ (((class color)) (:foreground "DarkOrchid" :background
"Yellow"))
+ (t (:inverse-video t))))
"Face for highlighting the selected difference in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -947,9 +962,15 @@
(defface ediff-current-diff-face-C
- '((((type tty)) (:foreground "cyan3" :background "yellow3"
:weight bold))
- (((class color)) (:foreground "Navy" :background "Pink"))
- (t (:inverse-video t)))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Navy" :background "Pink"))
+ (((class color))
+ (:foreground "cyan3" :background "yellow3" :weight bold))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "cyan3" :background
"yellow3" :weight bold))
+ (((class color)) (:foreground "Navy" :background "Pink"))
+ (t (:inverse-video t))))
"Face for highlighting the selected difference in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -969,9 +990,15 @@
(defface ediff-current-diff-face-Ancestor
- '((((type tty)) (:foreground "black" :background
"magenta3"))
- (((class color)) (:foreground "Black" :background
"VioletRed"))
- (t (:inverse-video t)))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Black" :background "VioletRed"))
+ (((class color))
+ (:foreground "black" :background "magenta3"))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "black" :background
"magenta3"))
+ (((class color)) (:foreground "Black" :background
"VioletRed"))
+ (t (:inverse-video t))))
"Face for highlighting the selected difference in buffer Ancestor."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -991,9 +1018,15 @@
(defface ediff-fine-diff-face-A
- '((((type tty)) (:foreground "white" :background "sky
blue" :weight bold))
- (((class color)) (:foreground "Navy" :background "sky blue"))
- (t (:underline t :stipple "gray3")))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Navy" :background "sky blue"))
+ (((class color))
+ (:foreground "white" :background "sky blue" :weight bold))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "white" :background "sky
blue" :weight bold))
+ (((class color)) (:foreground "Navy" :background "sky
blue"))
+ (t (:underline t :stipple "gray3"))))
"Face for highlighting the refinement of the selected diff in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1006,9 +1039,15 @@
(ediff-hide-face 'ediff-fine-diff-face-A)
(defface ediff-fine-diff-face-B
- '((((type tty)) (:foreground "magenta3" :background
"cyan3"))
- (((class color)) (:foreground "Black" :background "cyan"))
- (t (:underline t :stipple "gray3")))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Black" :background "cyan"))
+ (((class color))
+ (:foreground "magenta3" :background "cyan3"))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "magenta3" :background
"cyan3"))
+ (((class color)) (:foreground "Black" :background "cyan"))
+ (t (:underline t :stipple "gray3"))))
"Face for highlighting the refinement of the selected diff in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1021,11 +1060,20 @@
(ediff-hide-face 'ediff-fine-diff-face-B)
(defface ediff-fine-diff-face-C
- '((((type tty)) (:foreground "yellow3" :background
"Turquoise"
- :weight bold))
- (((type pc)) (:foreground "white" :background
"Turquoise"))
- (((class color)) (:foreground "Black" :background
"Turquoise"))
- (t (:underline t :stipple "gray3")))
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "white" :background "Turquoise"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "Turquoise"))
+ (((class color))
+ (:foreground "yellow3" :background "Turquoise"
+ :weight bold))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "yellow3" :background
"Turquoise"
+ :weight bold))
+ (((type pc)) (:foreground "white" :background
"Turquoise"))
+ (((class color)) (:foreground "Black" :background
"Turquoise"))
+ (t (:underline t :stipple "gray3"))))
"Face for highlighting the refinement of the selected diff in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1038,9 +1086,15 @@
(ediff-hide-face 'ediff-fine-diff-face-C)
(defface ediff-fine-diff-face-Ancestor
- '((((type tty)) (:foreground "red3" :background "green"))
- (((class color)) (:foreground "Black" :background "Green"))
- (t (:underline t :stipple "gray3")))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Black" :background "Green"))
+ (((class color))
+ (:foreground "red3" :background "green"))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "red3" :background
"green"))
+ (((class color)) (:foreground "Black" :background "Green"))
+ (t (:underline t :stipple "gray3"))))
"Face for highlighting the refinement of the selected diff in the ancestor
buffer.
At present, this face is not used and no fine differences are computed for the
ancestor buffer."
@@ -1064,11 +1118,20 @@
(t "Stipple")))
(defface ediff-even-diff-face-A
- `((((type tty)) (:foreground "red3" :background "light grey"
- :weight bold))
- (((type pc)) (:foreground "green3" :background "light
grey"))
- (((class color)) (:foreground "Black" :background "light
grey"))
- (t (:italic t :stipple ,stipple-pixmap)))
+ (if ediff-emacs-p
+ `((((type pc))
+ (:foreground "green3" :background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "red3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "red3" :background "light
grey"
+ :weight bold))
+ (((type pc)) (:foreground "green3" :background "light
grey"))
+ (((class color)) (:foreground "Black" :background "light
grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
"Face for highlighting even-numbered non-current differences in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1081,9 +1144,15 @@
(ediff-hide-face 'ediff-even-diff-face-A)
(defface ediff-even-diff-face-B
- `((((type tty)) (:foreground "blue3" :background "Grey"
:weight bold))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple ,stipple-pixmap)))
+ (if ediff-emacs-p
+ `((((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "blue3" :background "Grey" :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "blue3" :background "Grey"
:weight bold))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
"Face for highlighting even-numbered non-current differences in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1096,11 +1165,20 @@
(ediff-hide-face 'ediff-even-diff-face-B)
(defface ediff-even-diff-face-C
- `((((type tty)) (:foreground "yellow3" :background "light
grey"
- :weight bold))
- (((type pc)) (:foreground "yellow3" :background "light
grey"))
- (((class color)) (:foreground "Black" :background "light
grey"))
- (t (:italic t :stipple ,stipple-pixmap)))
+ (if ediff-emacs-p
+ `((((type pc))
+ (:foreground "yellow3" :background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "yellow3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "yellow3" :background "light
grey"
+ :weight bold))
+ (((type pc)) (:foreground "yellow3" :background "light
grey"))
+ (((class color)) (:foreground "Black" :background "light
grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
"Face for highlighting even-numbered non-current differences in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1113,11 +1191,20 @@
(ediff-hide-face 'ediff-even-diff-face-C)
(defface ediff-even-diff-face-Ancestor
- `((((type tty)) (:foreground "cyan3" :background "light grey"
- :weight bold))
- (((type pc)) (:foreground "cyan3" :background "light
grey"))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple ,stipple-pixmap)))
+ (if ediff-emacs-p
+ `((((type pc))
+ (:foreground "cyan3" :background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "cyan3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "cyan3" :background "light
grey"
+ :weight bold))
+ (((type pc)) (:foreground "cyan3" :background "light
grey"))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
"Face for highlighting even-numbered non-current differences in the ancestor
buffer."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1137,10 +1224,18 @@
(Ancestor . ediff-even-diff-face-Ancestor)))
(defface ediff-odd-diff-face-A
- '((((type tty)) (:foreground "red3" :background "black"
:weight bold))
- (((type pc)) (:foreground "green3" :background "gray40"))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple "gray1")))
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "green3" :background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "red3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "red3" :background "black"
:weight bold))
+ (((type pc)) (:foreground "green3" :background
"gray40"))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple "gray1"))))
"Face for highlighting odd-numbered non-current differences in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1154,10 +1249,18 @@
(defface ediff-odd-diff-face-B
- '((((type tty)) (:foreground "cyan3" :background "black"
:weight bold))
- (((type pc)) (:foreground "White" :background "gray40"))
- (((class color)) (:foreground "Black" :background "light
grey"))
- (t (:italic t :stipple "gray1")))
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "White" :background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "cyan3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "cyan3" :background "black"
:weight bold))
+ (((type pc)) (:foreground "White" :background "gray40"))
+ (((class color)) (:foreground "Black" :background "light
grey"))
+ (t (:italic t :stipple "gray1"))))
"Face for highlighting odd-numbered non-current differences in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1170,10 +1273,18 @@
(ediff-hide-face 'ediff-odd-diff-face-B)
(defface ediff-odd-diff-face-C
- '((((type tty)) (:foreground "yellow3" :background "black"
:weight bold))
- (((type pc)) (:foreground "yellow3" :background "gray40"))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple "gray1")))
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "yellow3" :background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "yellow3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "yellow3" :background
"black" :weight bold))
+ (((type pc)) (:foreground "yellow3" :background
"gray40"))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple "gray1"))))
"Face for highlighting odd-numbered non-current differences in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1186,9 +1297,15 @@
(ediff-hide-face 'ediff-odd-diff-face-C)
(defface ediff-odd-diff-face-Ancestor
- '((((type tty)) (:foreground "green3" :background "black"
:weight bold))
- (((class color)) (:foreground "cyan3" :background "gray40"))
- (t (:italic t :stipple "gray1")))
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "cyan3" :background "gray40"))
+ (((class color))
+ (:foreground "green3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "green3" :background
"black" :weight bold))
+ (((class color)) (:foreground "cyan3" :background "gray40"))
+ (t (:italic t :stipple "gray1"))))
"Face for highlighting odd-numbered non-current differences in the ancestor
buffer."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1357,11 +1474,8 @@
(ediff-defvar-local ediff-temp-file-C nil "")
-;; If file-remote-p is defined (as in XEmacs, use it. Otherwise, check
-;; if find-file-name-handler is defined for 'file-local-copy
(defun ediff-file-remote-p (file-name)
- (or (and (fboundp 'file-remote-p) (file-remote-p file-name))
- (find-file-name-handler file-name 'file-local-copy)))
+ (file-remote-p file-name))
;; File for which we can get attributes, such as size or date
(defun ediff-listable-file (file-name)
1.22 +72 -12 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.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ediff-diff.el 2004/02/20 02:50:47 1.21
+++ ediff-diff.el 2005/02/19 04:43:37 1.22
@@ -534,6 +534,7 @@
(defun ediff-set-diff-overlays-in-one-buffer (buf-type diff-list)
(let* ((current-diff -1)
(buff (ediff-get-buffer buf-type))
+ (ctl-buf ediff-control-buffer)
;; ediff-extract-diffs puts the type of diff-list as the first elt
;; of this list. The type is either 'points or 'words
(diff-list-type (car diff-list))
@@ -580,8 +581,9 @@
(if (eq diff-list-type 'words)
(progn
(ediff-with-current-buffer buff (goto-char pt-saved))
- (setq begin (ediff-goto-word (1+ begin) buff)
- end (ediff-goto-word end buff 'end))
+ (ediff-with-current-buffer ctl-buf
+ (setq begin (ediff-goto-word (1+ begin) buff)
+ end (ediff-goto-word end buff 'end)))
(if (> end limit) (setq end limit))
(if (> begin end) (setq begin end))
(setq pt-saved (ediff-with-current-buffer buff (point)))))
@@ -864,6 +866,7 @@
(let* ((current-diff -1)
(reg-start (ediff-get-diff-posn buf-type 'beg region-num))
(buff (ediff-get-buffer buf-type))
+ (ctl-buf ediff-control-buffer)
combined-merge-diff-list
diff-overlay-list list-element
begin end overlay)
@@ -892,8 +895,9 @@
() ; skip this diff
;; Put overlays at appropriate places in buffers
;; convert lines to points, if necessary
- (setq begin (ediff-goto-word (1+ begin) buff)
- end (ediff-goto-word end buff 'end))
+ (ediff-with-current-buffer ctl-buf
+ (setq begin (ediff-goto-word (1+ begin) buff)
+ end (ediff-goto-word end buff 'end)))
(setq overlay (ediff-make-bullet-proof-overlay begin end buff))
;; record all overlays for this difference region
(setq diff-overlay-list (nconc diff-overlay-list (list overlay))))
@@ -1326,17 +1330,73 @@
(while (> n 1)
(funcall fwd-word-fun)
(skip-chars-forward ediff-whitespace)
- (setq n (1- n))))
- (if (and flag (> n 0))
- (funcall fwd-word-fun))
+ (setq n (1- n)))
+ (if (and flag (> n 0))
+ (funcall fwd-word-fun)))
(point))))
(defun ediff-same-file-contents (f1 f2)
- "Return t if F1 and F2 have identical contents."
- (let ((res
- (apply 'call-process ediff-cmp-program nil nil nil
- (append ediff-cmp-options (list f1 f2)))))
- (and (numberp res) (eq res 0))))
+ "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))))
+ )
+
+
+(defun ediff-same-contents (d1 d2 &optional filter-re)
+ "Returns t iff D1 and D2 have the same content.
+D1 and D2 can either be both directories or both regular files.
+Symlinks and the likes are not handled.
+If FILTER-RE is non-nil, recursive checking in directories
+affects only files whose names match the expression."
+ ;; Normalize empty filter RE to nil.
+ (unless (length filter-re) (setq filter-re nil))
+ ;; Indicate progress
+ (message "Comparing '%s' and '%s' modulo '%s'" d1
d2 filter-re)
+ (cond
+ ;; D1 & D2 directories => recurse
+ ((and (file-directory-p d1)
+ (file-directory-p d2))
+ (if (null ediff-recurse-to-subdirectories)
+ (if (y-or-n-p "Compare subdirectories recursively? ")
+ (setq ediff-recurse-to-subdirectories 'yes)
+ (setq ediff-recurse-to-subdirectories 'no)))
+ (if (eq ediff-recurse-to-subdirectories 'yes)
+ (let* ((all-entries-1 (directory-files d1 t filter-re))
+ (all-entries-2 (directory-files d2 t filter-re))
+ (entries-1 (remove-if (lambda (s)
+ (string-match "^\\.\\.?$"
+ (file-name-nondirectory s)))
+ all-entries-1))
+ (entries-2 (remove-if (lambda (s)
+ (string-match "^\\.\\.?$"
+ (file-name-nondirectory s)))
+ all-entries-2))
+ )
+ ;; First, check only the names (works quickly and ensures a
+ ;; precondition for subsequent code)
+ (if (and (= (length entries-1) (length entries-2))
+ (every (lambda (a b) (equal (file-name-nondirectory a)
+ (file-name-nondirectory b)))
+ entries-1 entries-2))
+ ;; With name equality established, compare the entries
+ ;; through recursion.
+ (every (lambda (a b)
+ (ediff-same-contents a b filter-re))
+ entries-1 entries-2)
+ )
+ ))
+ ) ; end of the directories case
+ ;; D1 & D2 are both files => compare directly
+ ((and (file-regular-p d1)
+ (file-regular-p d2))
+ (ediff-same-file-contents d1 d2))
+ ;; Otherwise => false: unequal contents
+ )
+ )
;;; Local Variables:
1.80 +20 -0 XEmacs/packages/xemacs-packages/ediff/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ChangeLog,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- ChangeLog 2004/03/14 09:53:36 1.79
+++ ChangeLog 2005/02/19 04:43:38 1.80
@@ -1,3 +1,23 @@
+2005-02-19 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * ediff.el (ediff-set-diff-overlays-in-one-buffer,
+ ediff-set-fine-overlays-in-one-buffer,ediff-goto-word) make sure
+ we use the syntax table of the correct buffer.
+ (ediff-same-file-contents,ediff-same-contents): enhancements thanks to
+ Felix Gatzemeier.
+
+ * ediff-init.el (ediff-hide-face): checks for definedness of functions.
+ (ediff-file-remote-p): make synonymous with file-remote-p.
+ In all deffaces ediff-*-face-*, use min-colors.
+
+ * ediff-mult.el (ediff-meta-mark-equal-files): make use of
+ ediff-recurse-to-subdirectories.
+ (ediff-mark-if-equal): check that the arguments are strings, use
+ ediff-same-contents (after to Felix Gatzemeier).
+
+ * ediff.el (ediff-merge-on-startup): don't set buffer-modified-p to
+ nil.
+
2004-02-20 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.50 released.