User: michaelk
Date: 05/10/06 02:17:46
Modified: packages/xemacs-packages/ediff ediff.texi ediff.el
ediff-wind.el ediff-util.el ediff-ptch.el
ediff-mult.el ediff-merg.el ChangeLog
Log:
* ediff-merge.el (ediff-merge-region-is-non-clash): new defsubst.
(ediff-merge-region-is-non-clash-to-skip): previouslu called
ediff-merge-region-is-non-clash.
* ediff-mult.el (ediff-append-custom-diff,ediff-meta-show-patch): use
insert-buffer-substring.
* ediff-ptch.el (ediff-fixup-patch-map): use better heuristics for
selecting files to patch. Also bug fixes.
* ediff-util.el (ediff-setup): bug fix.
(ediff-next-difference): Never skip clashes that differ in white space
only.
* ediff-wind.el (ediff-setup-control-frame,ediff-destroy-control-frame):
check the menubar feature.
Revision Changes Path
1.33 +1 -0 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.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- ediff.texi 2005/09/20 17:54:28 1.32
+++ ediff.texi 2005/10/06 00:17:44 1.33
@@ -2416,6 +2416,7 @@ 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),
+Aaron S. Hawley (Aaron.Hawley@(a)uvm.edu),
Xiaoli Huang (hxl@(a)epic.com),
Andreas Jaeger (aj@(a)suse.de),
Lars Magne Ingebrigtsen (larsi@(a)ifi.uio.no),
1.31 +8 -8 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.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- ediff.el 2005/09/20 17:54:28 1.30
+++ ediff.el 2005/10/06 00:17:44 1.31
@@ -8,7 +8,7 @@
;; Keywords: comparing, merging, patching, tools, unix
(defconst ediff-version "2.80.1" "The current version of Ediff")
-(defconst ediff-date "September 19, 2005" "Date of last update")
+(defconst ediff-date "October 5, 2005" "Date of last update")
;; This file is part of GNU Emacs.
@@ -1261,13 +1261,13 @@ buffer."
(setq rev1
(read-string
(format
- "Version 1 to merge (default: %s's working version): "
+ "Version 1 to merge (default %s's working version): "
(if (stringp file)
(file-name-nondirectory file) "current buffer")))
rev2
(read-string
(format
- "Version 2 to merge (default: %s): "
+ "Version 2 to merge (default %s): "
(if (stringp file)
(file-name-nondirectory file) "current buffer"))))
(ediff-load-version-control)
@@ -1293,19 +1293,19 @@ buffer."
(setq rev1
(read-string
(format
- "Version 1 to merge (default: %s's working version): "
+ "Version 1 to merge (default %s's working version): "
(if (stringp file)
(file-name-nondirectory file) "current buffer")))
rev2
(read-string
(format
- "Version 2 to merge (default: %s): "
+ "Version 2 to merge (default %s): "
(if (stringp file)
(file-name-nondirectory file) "current buffer")))
ancestor-rev
(read-string
(format
- "Ancestor version (default: %s's base revision): "
+ "Ancestor version (default %s's base revision): "
(if (stringp file)
(file-name-nondirectory file) "current buffer"))))
(ediff-load-version-control)
@@ -1411,11 +1411,11 @@ Uses `vc.el' or `rcs.el' depending on `e
(let (rev1 rev2)
(setq rev1
(read-string
- (format "Revision 1 to compare (default: %s's latest revision): "
+ (format "Revision 1 to compare (default %s's latest revision): "
(file-name-nondirectory file)))
rev2
(read-string
- (format "Revision 2 to compare (default: %s's current state): "
+ (format "Revision 2 to compare (default %s's current state): "
(file-name-nondirectory file))))
(ediff-load-version-control)
(funcall
1.20 +3 -2 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.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- ediff-wind.el 2005/09/20 17:54:29 1.19
+++ ediff-wind.el 2005/10/06 00:17:44 1.20
@@ -900,7 +900,7 @@ into icons, regardless of the window man
(ediff-with-current-buffer ctl-buffer
(ediff-cond-compile-for-xemacs-or-emacs
- (set-buffer-menubar nil) ; xemacs
+ (when (featurep 'menubar) (set-buffer-menubar nil)) ; xemacs
nil ; emacs
)
;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse))
@@ -1054,7 +1054,8 @@ into icons, regardless of the window man
(if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
(let ((ctl-frame ediff-control-frame))
(ediff-cond-compile-for-xemacs-or-emacs
- (set-buffer-menubar default-menubar) ; xemacs
+ (when (featurep 'menubar)
+ (set-buffer-menubar default-menubar)) ; xemacs
nil ; emacs
)
(setq ediff-control-frame nil)
1.29 +14 -12 XEmacs/packages/xemacs-packages/ediff/ediff-util.el
Index: ediff-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-util.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- ediff-util.el 2005/09/20 17:54:29 1.28
+++ ediff-util.el 2005/10/06 00:17:44 1.29
@@ -329,7 +329,7 @@ to invocation.")
ediff-word-mode-job (ediff-word-mode-job))
;; Don't delete variants in case of ediff-buffer-* jobs without asking.
- ;; This is because u may loose work---dangerous.
+ ;; This is because one may loose work---dangerous.
(if (string-match "buffer" (symbol-name ediff-job-name))
(setq ediff-keep-variants t))
@@ -368,6 +368,7 @@ to invocation.")
(save-excursion
(set-buffer buffer-C)
(insert-buffer-substring buf)
+ (goto-char (point-min))
(funcall (ediff-with-current-buffer buf major-mode))
(widen) ; merge buffer is always widened
(add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t)
@@ -1729,7 +1730,7 @@ With a prefix argument, go forward that
(or (>= n ediff-number-of-differences)
(setq regexp-skip (funcall ediff-skip-diff-region-function n))
;; this won't exec if regexp-skip is t
- (setq non-clash-skip (ediff-merge-region-is-non-clash n)
+ (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
skip-changed
(ediff-skip-merge-region-if-changed-from-default-p n))
(ediff-install-fine-diff-if-necessary n))
@@ -1744,6 +1745,7 @@ With a prefix argument, go forward that
skip-changed
;; skip difference regions that differ in white space
(and ediff-ignore-similar-regions
+ (ediff-merge-region-is-non-clash n)
(or (eq (ediff-no-fine-diffs-p n) t)
(and (ediff-merge-job)
(eq (ediff-no-fine-diffs-p n) 'C)))
@@ -1754,7 +1756,7 @@ With a prefix argument, go forward that
(or (>= n ediff-number-of-differences)
(setq regexp-skip (funcall ediff-skip-diff-region-function n))
;; this won't exec if regexp-skip is t
- (setq non-clash-skip (ediff-merge-region-is-non-clash n)
+ (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
skip-changed
(ediff-skip-merge-region-if-changed-from-default-p n))
(ediff-install-fine-diff-if-necessary n))
@@ -1778,7 +1780,7 @@ With a prefix argument, go back that man
(or (< n 0)
(setq regexp-skip (funcall ediff-skip-diff-region-function n))
;; this won't exec if regexp-skip is t
- (setq non-clash-skip (ediff-merge-region-is-non-clash n)
+ (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
skip-changed
(ediff-skip-merge-region-if-changed-from-default-p n))
(ediff-install-fine-diff-if-necessary n))
@@ -1802,7 +1804,7 @@ With a prefix argument, go back that man
(or (< n 0)
(setq regexp-skip (funcall ediff-skip-diff-region-function n))
;; this won't exec if regexp-skip is t
- (setq non-clash-skip (ediff-merge-region-is-non-clash n)
+ (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n)
skip-changed
(ediff-skip-merge-region-if-changed-from-default-p n))
(ediff-install-fine-diff-if-necessary n))
@@ -2111,7 +2113,7 @@ ARG is a prefix argument. If nil, copy
(if this-buf-n-th-diff-saved
(if (yes-or-no-p
(format
- "You've previously copied diff region %d to buffer %S. Confirm "
+ "You've previously copied diff region %d to buffer %S. Confirm?
"
(1+ n) buf-type))
t
(error "Quit"))
@@ -2219,18 +2221,18 @@ a regular expression typed in by the use
regexp-A
(read-string
(format
- "Ignore A-regions matching this regexp (default \"%s\"): "
+ "Ignore A-regions matching this regexp (default %s): "
ediff-regexp-hide-A))
regexp-B
(read-string
(format
- "Ignore B-regions matching this regexp (default \"%s\"): "
+ "Ignore B-regions matching this regexp (default %s): "
ediff-regexp-hide-B)))
(if ediff-3way-comparison-job
(setq regexp-C
(read-string
(format
- "Ignore C-regions matching this regexp (default \"%s\"): "
+ "Ignore C-regions matching this regexp (default %s): "
ediff-regexp-hide-C))))
(if (eq ediff-hide-regexp-connective 'and)
(setq msg-connective "BOTH"
@@ -2258,18 +2260,18 @@ a regular expression typed in by the use
regexp-A
(read-string
(format
- "Focus on A-regions matching this regexp (default \"%s\"):
"
+ "Focus on A-regions matching this regexp (default %s): "
ediff-regexp-focus-A))
regexp-B
(read-string
(format
- "Focus on B-regions matching this regexp (default \"%s\"):
"
+ "Focus on B-regions matching this regexp (default %s): "
ediff-regexp-focus-B)))
(if ediff-3way-comparison-job
(setq regexp-C
(read-string
(format
- "Focus on C-regions matching this regexp (default \"%s\"): "
+ "Focus on C-regions matching this regexp (default %s): "
ediff-regexp-focus-C))))
(if (eq ediff-focus-regexp-connective 'and)
(setq msg-connective "BOTH"
1.16 +14 -7 XEmacs/packages/xemacs-packages/ediff/ediff-ptch.el
Index: ediff-ptch.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-ptch.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- ediff-ptch.el 2005/09/20 17:54:29 1.15
+++ ediff-ptch.el 2005/10/06 00:17:44 1.16
@@ -297,16 +297,23 @@ program."
;; (file1 . file2). Get it using ediff-get-session-objA.
(ediff-get-session-objA-name session-info))
;; base-dir1 is the dir part of the 1st file in the patch
- (base-dir1 (file-name-directory (car proposed-file-names)))
+ (base-dir1
+ (or (file-name-directory (car proposed-file-names))
+ ""))
;; directory part of the 2nd file in the patch
- (base-dir2 (file-name-directory (cdr proposed-file-names)))
+ (base-dir2
+ (or (file-name-directory (cdr proposed-file-names))
+ ""))
)
- ;; If both base-dir1 and base-dir2 are relative, assume that
+ ;; If both base-dir1 and base-dir2 are relative and exist,
+ ;; assume that
;; these dirs lead to the actual files starting at the present
;; directory. So, we don't strip these relative dirs from the
;; file names. This is a heuristic intended to improve guessing
(unless (or (file-name-absolute-p base-dir1)
- (file-name-absolute-p base-dir2))
+ (file-name-absolute-p base-dir2)
+ (not (file-exists-p base-dir1))
+ (not (file-exists-p base-dir2)))
(setq base-dir1 ""
base-dir2 ""))
(or (string= (car proposed-file-names) "/dev/null")
@@ -377,8 +384,8 @@ other files, enter /dev/null
(concat actual-dir (cdr proposed-file-names)))))
))
ediff-patch-map)
- ;; check for the shorter existing file in each pair and discard the other
- ;; one
+ ;; Check for the existing files in each pair and discard the nonexisting
+ ;; ones. If both exist, ask the user.
(mapcar (lambda (session-info)
(let* ((file1 (car (ediff-get-session-objA-name session-info)))
(file2 (cdr (ediff-get-session-objA-name session-info)))
@@ -485,7 +492,7 @@ are two possible targets for this patch.
patch-file-name)
(setq patch-file-name
(read-file-name
- (format "Patch is in file:%s "
+ (format "Patch is in file%s: "
(cond ((and buffer-file-name
(equal (expand-file-name dir)
(file-name-directory buffer-file-name)))
1.24 +5 -4 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.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- ediff-mult.el 2005/09/20 17:54:29 1.23
+++ ediff-mult.el 2005/10/06 00:17:44 1.24
@@ -1314,7 +1314,7 @@ Useful commands:
(if otherfile
(or (file-exists-p otherfile)
(if (y-or-n-p
- (format "Copy %s to %s ? " file-abs otherfile))
+ (format "Copy %s to %s? " file-abs otherfile))
(let* ((file-diff-record (assoc file-tail dir-diff-list))
(new-mem-code
(* (cdr file-diff-record) file-mem-code)))
@@ -1624,7 +1624,7 @@ Useful commands:
(save-excursion
(set-buffer meta-diff-buff)
(goto-char (point-max))
- (insert-buffer custom-diff-buf)
+ (insert-buffer-substring custom-diff-buf)
(insert "\n")))
;; if ediff session is not live, run diff directly on the files
((memq metajob '(ediff-directories
@@ -1643,7 +1643,7 @@ Useful commands:
(save-excursion
(set-buffer meta-diff-buff)
(goto-char (point-max))
- (insert-buffer tmp-buf)
+ (insert-buffer-substring tmp-buf)
(insert "\n")))
(t
(ediff-kill-buffer-carefully meta-diff-buff)
@@ -1691,7 +1691,8 @@ all marked sessions must be active."
(ediff-get-session-objC-name info)))
(set-buffer (get-buffer-create ediff-tmp-buffer))
(erase-buffer)
- (insert-buffer patchbuffer)
+ (insert-buffer-substring patchbuffer)
+ (goto-char (point-min))
(display-buffer ediff-tmp-buffer 'not-this-window)
))
(error "The patch buffer wasn't found"))))
1.12 +6 -2 XEmacs/packages/xemacs-packages/ediff/ediff-merg.el
Index: ediff-merg.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-merg.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- ediff-merg.el 2005/09/20 17:54:29 1.11
+++ ediff-merg.el 2005/10/06 00:17:44 1.12
@@ -103,11 +103,15 @@ Buffer B."
)
(make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default)
+;; check if there is no clash between the ancestor and one of the variants.
+(defsubst ediff-merge-region-is-non-clash (n)
+ (string-match "prefer" (or (ediff-get-state-of-merge n) "")))
+
;; If ediff-show-clashes-only, check if there is no clash between the ancestor
;; and one of the variants.
-(defsubst ediff-merge-region-is-non-clash (n)
+(defsubst ediff-merge-region-is-non-clash-to-skip (n)
(and ediff-show-clashes-only
- (string-match "prefer" (or (ediff-get-state-of-merge n)
""))))
+ (ediff-merge-region-is-non-clash n)))
;; If ediff-skip-changed-regions, check if the merge region differs from
;; the current default. If a region is different from the default, it means
1.90 +19 -0 XEmacs/packages/xemacs-packages/ediff/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ChangeLog,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -r1.89 -r1.90
--- ChangeLog 2005/09/21 07:15:00 1.89
+++ ChangeLog 2005/10/06 00:17:45 1.90
@@ -1,3 +1,22 @@
+2005-10-05 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * ediff-merge.el (ediff-merge-region-is-non-clash): new defsubst.
+ (ediff-merge-region-is-non-clash-to-skip): previouslu called
+ ediff-merge-region-is-non-clash.
+
+ * ediff-mult.el (ediff-append-custom-diff,ediff-meta-show-patch): use
+ insert-buffer-substring.
+
+ * ediff-ptch.el (ediff-fixup-patch-map): use better heuristics for
+ selecting files to patch. Also bug fixes.
+
+ * ediff-util.el (ediff-setup): bug fix.
+ (ediff-next-difference): Never skip clashes that differ in white space
+ only.
+
+ * ediff-wind.el (ediff-setup-control-frame,ediff-destroy-control-frame):
+ check the menubar feature.
+
2005-09-21 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.55 released.