comparison lisp/ediff/ediff-diff.el @ 144:318232e2a3f0 r20-2b6

Import from CVS: tag r20-2b6
author cvs
date Mon, 13 Aug 2007 09:34:14 +0200
parents 34a5b81f86ba
children bfd6434d15b3
comparison
equal deleted inserted replaced
143:50e7fedfe353 144:318232e2a3f0
584 (whitespace-A (ediff-whitespace-diff-region-p n 'A)) 584 (whitespace-A (ediff-whitespace-diff-region-p n 'A))
585 (whitespace-B (ediff-whitespace-diff-region-p n 'B)) 585 (whitespace-B (ediff-whitespace-diff-region-p n 'B))
586 (whitespace-C (ediff-whitespace-diff-region-p n 'C)) 586 (whitespace-C (ediff-whitespace-diff-region-p n 'C))
587 cumulative-fine-diff-length) 587 cumulative-fine-diff-length)
588 588
589 (cond ((and (eq flag 'noforce) (ediff-get-fine-diff-vector n 'A)) 589 (cond ;; If one of the regions is empty (or 2 in 3way comparison)
590 ;; don't compute fine diffs if diff vector exists
591 (if (ediff-no-fine-diffs-p n)
592 ;;(ediff-message-if-verbose
593 (message
594 "Only white-space differences in region %d" (1+ n))))
595 ;; If one of the regions is empty (or 2 in 3way comparison)
596 ;; then don't refine. 590 ;; then don't refine.
597 ;; If the region happens to be entirely whitespace or empty then 591 ;; If the region happens to be entirely whitespace or empty then
598 ;; mark as such. 592 ;; mark as such.
599 ((> (length (delq nil (list empty-A empty-B empty-C))) 1) 593 ((> (length (delq nil (list empty-A empty-B empty-C))) 1)
600 (if (and (ediff-looks-like-combined-merge n) 594 (if (and (ediff-looks-like-combined-merge n)
619 ;; mark as space only 613 ;; mark as space only
620 (ediff-mark-diff-as-space-only n t) 614 (ediff-mark-diff-as-space-only n t)
621 ;; if some regions are white and others don't, then mark as 615 ;; if some regions are white and others don't, then mark as
622 ;; non-white-space-only 616 ;; non-white-space-only
623 (ediff-mark-diff-as-space-only n nil))) 617 (ediff-mark-diff-as-space-only n nil)))
618
619 ;; don't compute fine diffs if diff vector exists
620 ((and (eq flag 'noforce) (ediff-get-fine-diff-vector n 'A))
621 (if (ediff-no-fine-diffs-p n)
622 (message
623 "Only white-space differences in region %d %s"
624 (1+ n)
625 (cond ((eq (ediff-no-fine-diffs-p n) 'A)
626 "in buffers B & C")
627 ((eq (ediff-no-fine-diffs-p n) 'B)
628 "in buffers A & C")
629 ((eq (ediff-no-fine-diffs-p n) 'C)
630 "in buffers A & B")
631 (t "")))))
624 ;; don't compute fine diffs for this region 632 ;; don't compute fine diffs for this region
625 ((eq flag 'skip) 633 ((eq flag 'skip)
626 (or (ediff-get-fine-diff-vector n 'A) 634 (or (ediff-get-fine-diff-vector n 'A)
627 (memq ediff-auto-refine '(off nix)) 635 (memq ediff-auto-refine '(off nix))
628 (ediff-message-if-verbose 636 (ediff-message-if-verbose
699 (eq cumulative-fine-diff-length 0))) 707 (eq cumulative-fine-diff-length 0)))
700 (ediff-mark-diff-as-space-only n t) 708 (ediff-mark-diff-as-space-only n t)
701 (ediff-message-if-verbose 709 (ediff-message-if-verbose
702 "Only white-space differences in region %d" (1+ n))) 710 "Only white-space differences in region %d" (1+ n)))
703 ((eq cumulative-fine-diff-length 0) 711 ((eq cumulative-fine-diff-length 0)
704 (ediff-mark-diff-as-space-only n t)
705 (ediff-message-if-verbose 712 (ediff-message-if-verbose
706 "Only white-space differences in region %d %s" 713 "Only white-space differences in region %d %s"
707 (1+ n) 714 (1+ n)
708 (cond (whitespace-A "in buffers B & C") 715 (cond (whitespace-A (ediff-mark-diff-as-space-only n 'A)
709 (whitespace-B "in buffers A & C") 716 "in buffers B & C")
710 (whitespace-C "in buffers A & B")))) 717 (whitespace-B (ediff-mark-diff-as-space-only n 'B)
718 "in buffers A & C")
719 (whitespace-C (ediff-mark-diff-as-space-only n 'C)
720 "in buffers A & B"))))
711 (t 721 (t
712 (ediff-mark-diff-as-space-only n nil))) 722 (ediff-mark-diff-as-space-only n nil)))
713 ) 723 )
714 ) ; end cond 724 ) ; end cond
715 (ediff-set-fine-diff-properties n) 725 (ediff-set-fine-diff-properties n)