Mercurial > emacs
comparison lisp/ediff-util.el @ 65856:d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@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.
* viper-cmd.el (viper-normalize-minor-mode-map-alist,
viper-refresh-mode-line): use make-local-variable to localize some vars
instead of make-variable-buffer-local. Suggested by Stefan Monnier.
* viper-init.el (viper-make-variable-buffer-local): delete alias.
(viper-restore-cursor-type,viper-set-insert-cursor-type): use
make-local-variable instead of make-variable-buffer-local. Suggested by
Stefan Monnier.
* viper.el (viper-mode): don't use viper-make-variable-buffer-local.
(viper-comint-mode-hook): use make-local-variable on
require-final-newline.
(viper-non-hook-settings): don't use make-variable-buffer-local.
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Thu, 06 Oct 2005 00:09:49 +0000 |
parents | 96187e7edd1b |
children | 26faad662ac6 aa89c814f853 |
comparison
equal
deleted
inserted
replaced
65855:97ab21c68453 | 65856:d64aeb0dc54e |
---|---|
327 ediff-narrow-job (ediff-narrow-job) | 327 ediff-narrow-job (ediff-narrow-job) |
328 ediff-windows-job (ediff-windows-job) | 328 ediff-windows-job (ediff-windows-job) |
329 ediff-word-mode-job (ediff-word-mode-job)) | 329 ediff-word-mode-job (ediff-word-mode-job)) |
330 | 330 |
331 ;; Don't delete variants in case of ediff-buffer-* jobs without asking. | 331 ;; Don't delete variants in case of ediff-buffer-* jobs without asking. |
332 ;; This is because u may loose work---dangerous. | 332 ;; This is because one may loose work---dangerous. |
333 (if (string-match "buffer" (symbol-name ediff-job-name)) | 333 (if (string-match "buffer" (symbol-name ediff-job-name)) |
334 (setq ediff-keep-variants t)) | 334 (setq ediff-keep-variants t)) |
335 | 335 |
336 (ediff-cond-compile-for-xemacs-or-emacs | 336 (ediff-cond-compile-for-xemacs-or-emacs |
337 (make-local-hook 'pre-command-hook) ; xemacs form | 337 (make-local-hook 'pre-command-hook) ; xemacs form |
366 (get-buffer-create | 366 (get-buffer-create |
367 (ediff-unique-buffer-name "*ediff-merge" "*"))) | 367 (ediff-unique-buffer-name "*ediff-merge" "*"))) |
368 (save-excursion | 368 (save-excursion |
369 (set-buffer buffer-C) | 369 (set-buffer buffer-C) |
370 (insert-buffer-substring buf) | 370 (insert-buffer-substring buf) |
371 (goto-char (point-min)) | |
371 (funcall (ediff-with-current-buffer buf major-mode)) | 372 (funcall (ediff-with-current-buffer buf major-mode)) |
372 (widen) ; merge buffer is always widened | 373 (widen) ; merge buffer is always widened |
373 (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t) | 374 (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t) |
374 ))) | 375 ))) |
375 (setq buffer-read-only nil | 376 (setq buffer-read-only nil |
1727 | 1728 |
1728 (ediff-visible-region) | 1729 (ediff-visible-region) |
1729 (or (>= n ediff-number-of-differences) | 1730 (or (>= n ediff-number-of-differences) |
1730 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1731 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1731 ;; this won't exec if regexp-skip is t | 1732 ;; this won't exec if regexp-skip is t |
1732 (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1733 (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
1733 skip-changed | 1734 skip-changed |
1734 (ediff-skip-merge-region-if-changed-from-default-p n)) | 1735 (ediff-skip-merge-region-if-changed-from-default-p n)) |
1735 (ediff-install-fine-diff-if-necessary n)) | 1736 (ediff-install-fine-diff-if-necessary n)) |
1736 ;; Skip loop | 1737 ;; Skip loop |
1737 (while (and (< n ediff-number-of-differences) | 1738 (while (and (< n ediff-number-of-differences) |
1742 non-clash-skip | 1743 non-clash-skip |
1743 ;; skip processed regions | 1744 ;; skip processed regions |
1744 skip-changed | 1745 skip-changed |
1745 ;; skip difference regions that differ in white space | 1746 ;; skip difference regions that differ in white space |
1746 (and ediff-ignore-similar-regions | 1747 (and ediff-ignore-similar-regions |
1748 (ediff-merge-region-is-non-clash n) | |
1747 (or (eq (ediff-no-fine-diffs-p n) t) | 1749 (or (eq (ediff-no-fine-diffs-p n) t) |
1748 (and (ediff-merge-job) | 1750 (and (ediff-merge-job) |
1749 (eq (ediff-no-fine-diffs-p n) 'C))) | 1751 (eq (ediff-no-fine-diffs-p n) 'C))) |
1750 ))) | 1752 ))) |
1751 (setq n (1+ n)) | 1753 (setq n (1+ n)) |
1752 (if (= 0 (mod n 20)) | 1754 (if (= 0 (mod n 20)) |
1753 (message "Skipped over region %d and counting ..." n)) | 1755 (message "Skipped over region %d and counting ..." n)) |
1754 (or (>= n ediff-number-of-differences) | 1756 (or (>= n ediff-number-of-differences) |
1755 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1757 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1756 ;; this won't exec if regexp-skip is t | 1758 ;; this won't exec if regexp-skip is t |
1757 (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1759 (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
1758 skip-changed | 1760 skip-changed |
1759 (ediff-skip-merge-region-if-changed-from-default-p n)) | 1761 (ediff-skip-merge-region-if-changed-from-default-p n)) |
1760 (ediff-install-fine-diff-if-necessary n)) | 1762 (ediff-install-fine-diff-if-necessary n)) |
1761 ) | 1763 ) |
1762 (message "") | 1764 (message "") |
1776 | 1778 |
1777 (ediff-visible-region) | 1779 (ediff-visible-region) |
1778 (or (< n 0) | 1780 (or (< n 0) |
1779 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1781 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1780 ;; this won't exec if regexp-skip is t | 1782 ;; this won't exec if regexp-skip is t |
1781 (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1783 (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
1782 skip-changed | 1784 skip-changed |
1783 (ediff-skip-merge-region-if-changed-from-default-p n)) | 1785 (ediff-skip-merge-region-if-changed-from-default-p n)) |
1784 (ediff-install-fine-diff-if-necessary n)) | 1786 (ediff-install-fine-diff-if-necessary n)) |
1785 (while (and (> n -1) | 1787 (while (and (> n -1) |
1786 (or | 1788 (or |
1800 (message "Skipped over region %d and counting ..." (1+ n))) | 1802 (message "Skipped over region %d and counting ..." (1+ n))) |
1801 (setq n (1- n)) | 1803 (setq n (1- n)) |
1802 (or (< n 0) | 1804 (or (< n 0) |
1803 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1805 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
1804 ;; this won't exec if regexp-skip is t | 1806 ;; this won't exec if regexp-skip is t |
1805 (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1807 (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
1806 skip-changed | 1808 skip-changed |
1807 (ediff-skip-merge-region-if-changed-from-default-p n)) | 1809 (ediff-skip-merge-region-if-changed-from-default-p n)) |
1808 (ediff-install-fine-diff-if-necessary n)) | 1810 (ediff-install-fine-diff-if-necessary n)) |
1809 ) | 1811 ) |
1810 (message "") | 1812 (message "") |