Mercurial > hg > xemacs-beta
comparison lisp/ediff/ediff-util.el @ 197:acd284d43ca1 r20-3b25
Import from CVS: tag r20-3b25
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:00:02 +0200 |
parents | b405438285a2 |
children |
comparison
equal
deleted
inserted
replaced
196:58e0786448ca | 197:acd284d43ca1 |
---|---|
1584 (interactive "p") | 1584 (interactive "p") |
1585 (ediff-barf-if-not-control-buffer) | 1585 (ediff-barf-if-not-control-buffer) |
1586 (if (< ediff-current-difference ediff-number-of-differences) | 1586 (if (< ediff-current-difference ediff-number-of-differences) |
1587 (let ((n (min ediff-number-of-differences | 1587 (let ((n (min ediff-number-of-differences |
1588 (+ ediff-current-difference arg))) | 1588 (+ ediff-current-difference arg))) |
1589 regexp-skip) | 1589 non-clash-skip regexp-skip) |
1590 | 1590 |
1591 (ediff-visible-region) | 1591 (ediff-visible-region) |
1592 (or (>= n ediff-number-of-differences) | 1592 (or (>= n ediff-number-of-differences) |
1593 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1593 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1594 ;; this won't exec if regexp-skip is t | |
1595 (setq non-clash-skip (ediff-merge-region-is-non-clash n)) | |
1594 (ediff-install-fine-diff-if-necessary n)) | 1596 (ediff-install-fine-diff-if-necessary n)) |
1595 (while (and (< n ediff-number-of-differences) | 1597 (while (and (< n ediff-number-of-differences) |
1596 (or | 1598 (or |
1597 ;; regexp skip | 1599 ;; regexp skip |
1598 regexp-skip | 1600 regexp-skip |
1599 ;; skip clashes, if necessary | 1601 ;; skip clashes, if necessary |
1600 (and ediff-show-clashes-only | 1602 non-clash-skip |
1601 (string-match "prefer" | |
1602 (or (ediff-get-state-of-merge n) ""))) | |
1603 ;; skip difference regions that differ in white space | 1603 ;; skip difference regions that differ in white space |
1604 (and ediff-ignore-similar-regions | 1604 (and ediff-ignore-similar-regions |
1605 (eq (ediff-no-fine-diffs-p n) t)))) | 1605 (eq (ediff-no-fine-diffs-p n) t)))) |
1606 (setq n (1+ n)) | 1606 (setq n (1+ n)) |
1607 (if (= 0 (mod n 20)) | 1607 (if (= 0 (mod n 20)) |
1608 (message "Skipped over region %d and counting ..." n)) | 1608 (message "Skipped over region %d and counting ..." n)) |
1609 (or (>= n ediff-number-of-differences) | 1609 (or (>= n ediff-number-of-differences) |
1610 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1610 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1611 ;; this won't exec if regexp-skip is t | |
1612 (setq non-clash-skip (ediff-merge-region-is-non-clash n)) | |
1611 (ediff-install-fine-diff-if-necessary n)) | 1613 (ediff-install-fine-diff-if-necessary n)) |
1612 ) | 1614 ) |
1613 (message "") | 1615 (message "") |
1614 (ediff-unselect-and-select-difference n) | 1616 (ediff-unselect-and-select-difference n) |
1615 ) ; let | 1617 ) ; let |
1621 With a prefix argument, go back that many differences." | 1623 With a prefix argument, go back that many differences." |
1622 (interactive "p") | 1624 (interactive "p") |
1623 (ediff-barf-if-not-control-buffer) | 1625 (ediff-barf-if-not-control-buffer) |
1624 (if (> ediff-current-difference -1) | 1626 (if (> ediff-current-difference -1) |
1625 (let ((n (max -1 (- ediff-current-difference arg))) | 1627 (let ((n (max -1 (- ediff-current-difference arg))) |
1626 regexp-skip) | 1628 non-clash-skip regexp-skip) |
1627 | 1629 |
1628 (ediff-visible-region) | 1630 (ediff-visible-region) |
1629 (or (< n 0) | 1631 (or (< n 0) |
1630 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1632 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1633 ;; this won't exec if regexp-skip is t | |
1634 (setq non-clash-skip (ediff-merge-region-is-non-clash n)) | |
1631 (ediff-install-fine-diff-if-necessary n)) | 1635 (ediff-install-fine-diff-if-necessary n)) |
1632 (while (and (> n -1) | 1636 (while (and (> n -1) |
1633 (or | 1637 (or |
1634 ;; regexp skip | 1638 ;; regexp skip |
1635 regexp-skip | 1639 regexp-skip |
1636 ;; skip clashes, if necessary | 1640 ;; skip clashes, if necessary |
1637 (and ediff-show-clashes-only | 1641 non-clash-skip |
1638 (string-match "prefer" | |
1639 (or (ediff-get-state-of-merge n) ""))) | |
1640 ;; skip difference regions that differ in white space | 1642 ;; skip difference regions that differ in white space |
1641 (and ediff-ignore-similar-regions | 1643 (and ediff-ignore-similar-regions |
1642 (eq (ediff-no-fine-diffs-p n) t)))) | 1644 (eq (ediff-no-fine-diffs-p n) t)))) |
1643 (if (= 0 (mod (1+ n) 20)) | 1645 (if (= 0 (mod (1+ n) 20)) |
1644 (message "Skipped over region %d and counting ..." (1+ n))) | 1646 (message "Skipped over region %d and counting ..." (1+ n))) |
1645 (setq n (1- n)) | 1647 (setq n (1- n)) |
1646 (or (< n 0) | 1648 (or (< n 0) |
1647 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1649 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1650 ;; this won't exec if regexp-skip is t | |
1651 (setq non-clash-skip (ediff-merge-region-is-non-clash n)) | |
1648 (ediff-install-fine-diff-if-necessary n)) | 1652 (ediff-install-fine-diff-if-necessary n)) |
1649 ) | 1653 ) |
1650 (message "") | 1654 (message "") |
1651 (ediff-unselect-and-select-difference n) | 1655 (ediff-unselect-and-select-difference n) |
1652 ) ; let | 1656 ) ; let |