Mercurial > emacs
annotate lisp/ediff-merg.el @ 100885:56164f0c606d
* w32.c: Use 64-bit arithmetic to do FILETIME conversions. (Bug#1766)
(utc_base): Declare as ULONGLONG, not long double.
(convert_time_raw): Delete.
(FILETIME_TO_U64, U64_TO_LISP_TIME): New macros.
(initialize_utc_base): New function.
(convert_time): Use FILETIME_TO_U64, initialize_utc_base.
(convert_from_time_t): Use initialize_utc_base; compute result with
64-bit arithmetic.
(process_times): Use FILETIME_TO_U64, U64_TO_LISP_TIME.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 04 Jan 2009 11:30:13 +0000 |
parents | d42aff5ca541 |
children | a9dc0e7c3f2b |
rev | line source |
---|---|
11042 | 1 ;;; ediff-merg.el --- merging utilities |
14169 | 2 |
64762
41bb365f41c4
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64091
diff
changeset
|
3 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
79721 | 4 ;; 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
11042 | 5 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
6 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
11042 | 7 |
8 ;; This file is part of GNU Emacs. | |
9 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
11042 | 11 ;; it under the terms of the GNU General Public License as published by |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
13 ;; (at your option) any later version. |
11042 | 14 |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
11042 | 22 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33394
diff
changeset
|
23 ;;; Commentary: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33394
diff
changeset
|
24 |
14169 | 25 ;;; Code: |
11042 | 26 |
18054 | 27 |
28 ;; compiler pacifier | |
29 (defvar ediff-window-A) | |
30 (defvar ediff-window-B) | |
31 (defvar ediff-window-C) | |
32 (defvar ediff-merge-window-share) | |
33 (defvar ediff-window-config-saved) | |
34 | |
35 (eval-when-compile | |
94604
c0dfa9027738
Simplify compilation requirements.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
36 (require 'ediff-util)) |
18054 | 37 ;; end pacifier |
38 | |
11042 | 39 (require 'ediff-init) |
40 | |
18839 | 41 (defcustom ediff-quit-merge-hook 'ediff-maybe-save-and-delete-merge |
100171 | 42 "Hooks to run before quitting a merge job. |
18839 | 43 The most common use is to save and delete the merge buffer." |
44 :type 'hook | |
45 :group 'ediff-merge) | |
46 | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
47 |
18054 | 48 (defcustom ediff-default-variant 'combined |
100171 | 49 "The variant to be used as a default for buffer C in merging. |
18054 | 50 Valid values are the symbols `default-A', `default-B', and `combined'." |
51 :type '(radio (const default-A) (const default-B) (const combined)) | |
52 :group 'ediff-merge) | |
11042 | 53 |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
54 (defcustom ediff-combination-pattern |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
55 '("<<<<<<< variant A" A ">>>>>>> variant B" B "####### Ancestor" Ancestor "======= end") |
100171 | 56 "Pattern to be used for combining difference regions in buffers A and B. |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
57 The value must be a list of the form |
74585
402a04b0362f
(ediff-combination-pattern): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
68997
diff
changeset
|
58 \(STRING1 bufspec1 STRING2 bufspec2 STRING3 bufspec3 STRING4) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
59 where bufspec is the symbol A, B, or Ancestor. For instance, if the value is |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
60 '(STRING1 A STRING2 Ancestor STRING3 B STRING4) then the |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
61 combined text will look like this: |
11042 | 62 |
63 STRING1 | |
64 diff region from variant A | |
65 STRING2 | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
66 diff region from the ancestor |
11042 | 67 STRING3 |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
68 diff region from variant B |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
69 STRING4 |
18054 | 70 " |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
71 :type '(choice (list string symbol string symbol string) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
72 (list string symbol string symbol string symbol string)) |
18054 | 73 :group 'ediff-merge) |
11042 | 74 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
75 (defcustom ediff-show-clashes-only nil |
100171 | 76 "If t, show only those diff regions where both buffers disagree with the ancestor. |
11042 | 77 This means that regions that have status prefer-A or prefer-B will be |
74585
402a04b0362f
(ediff-combination-pattern): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
68997
diff
changeset
|
78 skipped over. A value of nil means show all regions." |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
79 :type 'boolean |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
80 :group 'ediff-merge |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
81 ) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
82 (make-variable-buffer-local 'ediff-show-clashes-only) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
83 |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
84 (defcustom ediff-skip-merge-regions-that-differ-from-default nil |
100171 | 85 "If t, show only the regions that have not been changed by the user. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
86 A region is considered to have been changed if it is different from the current |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
87 default (`default-A', `default-B', `combined') and it hasn't been marked as |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
88 `prefer-A' or `prefer-B'. |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
89 A region is considered to have been changed also when it is marked as |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
90 as `prefer-A', but is different from the corresponding difference region in |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
91 Buffer A or if it is marked as `prefer-B' and is different from the region in |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
92 Buffer B." |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
93 :type 'boolean |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
94 :group 'ediff-merge |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
95 ) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
96 (make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default) |
11042 | 97 |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64762
diff
changeset
|
98 ;; check if there is no clash between the ancestor and one of the variants. |
66687
26faad662ac6
2005-11-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65856
diff
changeset
|
99 ;; if it is not a merge job then return true |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64762
diff
changeset
|
100 (defsubst ediff-merge-region-is-non-clash (n) |
66687
26faad662ac6
2005-11-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65856
diff
changeset
|
101 (if (ediff-merge-job) |
26faad662ac6
2005-11-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65856
diff
changeset
|
102 (string-match "prefer" (or (ediff-get-state-of-merge n) "")) |
26faad662ac6
2005-11-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65856
diff
changeset
|
103 t)) |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64762
diff
changeset
|
104 |
20003 | 105 ;; If ediff-show-clashes-only, check if there is no clash between the ancestor |
106 ;; and one of the variants. | |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64762
diff
changeset
|
107 (defsubst ediff-merge-region-is-non-clash-to-skip (n) |
20003 | 108 (and ediff-show-clashes-only |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64762
diff
changeset
|
109 (ediff-merge-region-is-non-clash n))) |
20003 | 110 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
111 ;; If ediff-skip-changed-regions, check if the merge region differs from |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
112 ;; the current default. If a region is different from the default, it means |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
113 ;; that the user has made determination as to how to merge for this particular |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
114 ;; region. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
115 (defsubst ediff-skip-merge-region-if-changed-from-default-p (n) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
116 (and ediff-skip-merge-regions-that-differ-from-default |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
117 (ediff-merge-changed-from-default-p n 'prefers-too))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
118 |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
119 |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
120 (defun ediff-get-combined-region (n) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
121 (let ((pattern-list ediff-combination-pattern) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
122 (combo-region "") |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
123 (err-msg |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
124 "ediff-combination-pattern: Invalid format. Please consult the documentation") |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
125 region-delim region-spec) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
126 |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
127 (if (< (length pattern-list) 5) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
128 (error err-msg)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
129 |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
130 (while (> (length pattern-list) 2) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
131 (setq region-delim (nth 0 pattern-list) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
132 region-spec (nth 1 pattern-list)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
133 (or (and (stringp region-delim) (memq region-spec '(A B Ancestor))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
134 (error err-msg)) |
13216
b9dc8cc658d5
Moved defsubsts up.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13129
diff
changeset
|
135 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
136 (condition-case nil |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
137 (setq combo-region |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
138 (concat combo-region |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
139 region-delim "\n" |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
140 (ediff-get-region-contents |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
141 n region-spec ediff-control-buffer))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
142 (error "")) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
143 (setq pattern-list (cdr (cdr pattern-list))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
144 ) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
145 |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
146 (setq region-delim (nth 0 pattern-list)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
147 (or (stringp region-delim) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
148 (error err-msg)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
149 (setq combo-region (concat combo-region region-delim "\n")) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
150 )) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
151 |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
152 ;;(defsubst ediff-make-combined-diff (regA regB) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
153 ;; (concat (nth 0 ediff-combination-pattern) "\n" |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
154 ;; regA |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
155 ;; (nth 1 ediff-combination-pattern) "\n" |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
156 ;; regB |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
157 ;; (nth 2 ediff-combination-pattern) "\n")) |
13216
b9dc8cc658d5
Moved defsubsts up.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13129
diff
changeset
|
158 |
11042 | 159 (defsubst ediff-set-state-of-all-diffs-in-all-buffers (ctl-buf) |
160 (let ((n 0)) | |
161 (while (< n ediff-number-of-differences) | |
162 (ediff-set-state-of-diff-in-all-buffers n ctl-buf) | |
163 (setq n (1+ n))))) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
164 |
11042 | 165 (defun ediff-set-state-of-diff-in-all-buffers (n ctl-buf) |
166 (let ((regA (ediff-get-region-contents n 'A ctl-buf)) | |
167 (regB (ediff-get-region-contents n 'B ctl-buf)) | |
168 (regC (ediff-get-region-contents n 'C ctl-buf))) | |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
169 (cond ((and (string= regA regB) (string= regA regC)) |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
170 (ediff-set-state-of-diff n 'A "=diff(B)") |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
171 (ediff-set-state-of-diff n 'B "=diff(C)") |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
172 (ediff-set-state-of-diff n 'C "=diff(A)")) |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
173 ((string= regA regB) |
11042 | 174 (ediff-set-state-of-diff n 'A "=diff(B)") |
175 (ediff-set-state-of-diff n 'B "=diff(A)") | |
176 (ediff-set-state-of-diff n 'C nil)) | |
177 ((string= regA regC) | |
178 (ediff-set-state-of-diff n 'A "=diff(C)") | |
179 (ediff-set-state-of-diff n 'C "=diff(A)") | |
180 (ediff-set-state-of-diff n 'B nil)) | |
181 ((string= regB regC) | |
182 (ediff-set-state-of-diff n 'C "=diff(B)") | |
183 (ediff-set-state-of-diff n 'B "=diff(C)") | |
184 (ediff-set-state-of-diff n 'A nil)) | |
185 ((string= regC (ediff-get-combined-region n)) | |
186 (ediff-set-state-of-diff n 'A nil) | |
187 (ediff-set-state-of-diff n 'B nil) | |
188 (ediff-set-state-of-diff n 'C "=diff(A+B)")) | |
189 (t (ediff-set-state-of-diff n 'A nil) | |
190 (ediff-set-state-of-diff n 'B nil) | |
191 (ediff-set-state-of-diff n 'C nil))) | |
192 )) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
193 |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
194 (defun ediff-set-merge-mode () |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
195 (normal-mode t) |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
196 (remove-hook 'local-write-file-hooks 'ediff-set-merge-mode)) |
13129
9d432c26c3a7
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12167
diff
changeset
|
197 |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
198 |
11042 | 199 ;; Go over all diffs starting with DIFF-NUM and copy regions into buffer C |
200 ;; according to the state of the difference. | |
201 ;; Since ediff-copy-diff refuses to copy identical diff regions, there is | |
202 ;; no need to optimize ediff-do-merge any further. | |
203 ;; | |
204 ;; If re-merging, change state of merge in all diffs starting with | |
205 ;; DIFF-NUM, except those where the state is prefer-* or where it is | |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
206 ;; `default-*' or `combined' but the buf C region appears to be modified |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
207 ;; since last set by default. |
11042 | 208 (defun ediff-do-merge (diff-num &optional remerging) |
209 (if (< diff-num 0) (setq diff-num 0)) | |
210 (let ((n diff-num) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
211 ;;(default-state-of-merge (format "%S" ediff-default-variant)) |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
212 do-not-copy state-of-merge) |
11042 | 213 (while (< n ediff-number-of-differences) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
214 (setq do-not-copy nil) ; reset after each cycle |
11042 | 215 (if (= (mod n 10) 0) |
216 (message "%s buffers A & B into C ... region %d of %d" | |
217 (if remerging "Re-merging" "Merging") | |
218 n | |
219 ediff-number-of-differences)) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
220 |
11042 | 221 (setq state-of-merge (ediff-get-state-of-merge n)) |
222 | |
223 (if remerging | |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
224 ;;(let ((reg-A (ediff-get-region-contents n 'A ediff-control-buffer)) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
225 ;; (reg-B (ediff-get-region-contents n 'B ediff-control-buffer)) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
226 ;; (reg-C (ediff-get-region-contents n 'C ediff-control-buffer))) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
227 (let () |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
228 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
229 ;; if region was edited since it was first set by default |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
230 (if (or (ediff-merge-changed-from-default-p n) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
231 ;; was preferred |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
232 (string-match "prefer" state-of-merge)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
233 ;; then ignore |
11042 | 234 (setq do-not-copy t)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
235 |
11042 | 236 ;; change state of merge for this diff, if necessary |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
237 (if (and (string-match "\\(default\\|combined\\)" state-of-merge) |
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
238 (not do-not-copy)) |
11042 | 239 (ediff-set-state-of-merge |
240 n (format "%S" ediff-default-variant))) | |
241 )) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
242 |
11042 | 243 ;; state-of-merge may have changed via ediff-set-state-of-merge, so |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
244 ;; check it once again |
11042 | 245 (setq state-of-merge (ediff-get-state-of-merge n)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
246 |
11042 | 247 (or do-not-copy |
248 (if (string= state-of-merge "combined") | |
249 ;; use n+1 because ediff-combine-diffs works via user numbering | |
250 ;; of diffs, which is 1+ to what ediff uses internally | |
251 (ediff-combine-diffs (1+ n) 'batch) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
252 (ediff-copy-diff |
12167
87f8b79217b3
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
253 n (if (string-match "-A" state-of-merge) 'A 'B) 'C 'batch))) |
11042 | 254 (setq n (1+ n))) |
255 (message "Merging buffers A & B into C ... Done") | |
256 )) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
257 |
11042 | 258 |
259 (defun ediff-re-merge () | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
260 "Remerge unmodified diff regions using a new default. Start with the current region." |
11042 | 261 (interactive) |
262 (let* ((default-variant-alist | |
263 (list '("default-A") '("default-B") '("combined"))) | |
264 (actual-alist | |
265 (delete (list (symbol-name ediff-default-variant)) | |
266 default-variant-alist))) | |
267 (setq ediff-default-variant | |
268 (intern | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
269 (completing-read |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
270 (format "Current merge default is `%S'. New default: " |
11042 | 271 ediff-default-variant) |
272 actual-alist nil 'must-match))) | |
273 (ediff-do-merge ediff-current-difference 'remerge) | |
274 (ediff-recenter) | |
275 )) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
276 |
11042 | 277 (defun ediff-shrink-window-C (arg) |
278 "Shrink window C to just one line. | |
279 With a prefix argument, returns window C to its normal size. | |
280 Used only for merging jobs." | |
281 (interactive "P") | |
282 (if (not ediff-merge-job) | |
283 (error "ediff-shrink-window-C can be used only for merging jobs")) | |
284 (cond ((eq arg '-) (setq arg -1)) | |
285 ((not (numberp arg)) (setq arg nil))) | |
286 (cond ((null arg) | |
287 (let ((ediff-merge-window-share | |
288 (if (< (window-height ediff-window-C) 3) | |
289 ediff-merge-window-share 0))) | |
290 (setq ediff-window-config-saved "") ; force redisplay | |
291 (ediff-recenter 'no-rehighlight))) | |
292 ((and (< arg 0) (> (window-height ediff-window-C) 2)) | |
293 (setq ediff-merge-window-share (* ediff-merge-window-share 0.9)) | |
294 (setq ediff-window-config-saved "") ; force redisplay | |
295 (ediff-recenter 'no-rehighlight)) | |
296 ((and (> arg 0) (> (window-height ediff-window-A) 2)) | |
297 (setq ediff-merge-window-share (* ediff-merge-window-share 1.1)) | |
298 (setq ediff-window-config-saved "") ; force redisplay | |
299 (ediff-recenter 'no-rehighlight)))) | |
300 | |
301 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
302 ;; N here is the user's region number. It is 1+ what Ediff uses internally. |
11042 | 303 (defun ediff-combine-diffs (n &optional batch-invocation) |
304 "Combine Nth diff regions of buffers A and B and place the combination in C. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
305 N is a prefix argument. If nil, combine the current difference regions. |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
306 Combining is done according to the specifications in variable |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
307 `ediff-combination-pattern'." |
11042 | 308 (interactive "P") |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
309 (setq n (if (numberp n) (1- n) ediff-current-difference)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
310 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42206
diff
changeset
|
311 (let (reg-combined) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
312 ;;(setq regA (ediff-get-region-contents n 'A ediff-control-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
313 ;; regB (ediff-get-region-contents n 'B ediff-control-buffer)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
314 ;;(setq reg-combined (ediff-make-combined-diff regA regB)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
315 (setq reg-combined (ediff-get-combined-region n)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
316 |
11042 | 317 (ediff-copy-diff n nil 'C batch-invocation reg-combined)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
318 (or batch-invocation (ediff-jump-to-difference (1+ n)))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
319 |
11042 | 320 |
321 ;; Checks if the region in buff C looks like a combination of the regions | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
322 ;; in buffers A and B. Return a list (reg-a-beg reg-a-end reg-b-beg reg-b-end) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
323 ;; These refer to where the delimiters for region A, B, Ancestor start and end |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
324 ;; in buffer C |
11042 | 325 (defun ediff-looks-like-combined-merge (region-num) |
326 (if ediff-merge-job | |
327 (let ((combined (string-match (regexp-quote "(A+B)") | |
328 (or (ediff-get-state-of-diff region-num 'C) | |
329 ""))) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
330 (mrgreg-beg (ediff-get-diff-posn 'C 'beg region-num)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
331 (mrgreg-end (ediff-get-diff-posn 'C 'end region-num)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
332 (pattern-list ediff-combination-pattern) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
333 delim reg-beg reg-end delim-regs-list) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
334 |
11042 | 335 (if combined |
19047 | 336 (ediff-with-current-buffer ediff-buffer-C |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
337 (while pattern-list |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
338 (goto-char mrgreg-beg) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
339 (setq delim (nth 0 pattern-list)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
340 (search-forward delim mrgreg-end 'noerror) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
341 (setq reg-beg (match-beginning 0)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
342 (setq reg-end (match-end 0)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
343 (if (and reg-beg reg-end) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
344 (setq delim-regs-list |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
345 ;; in reverse |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
346 (cons reg-end (cons reg-beg delim-regs-list)))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
347 (if (> (length pattern-list) 1) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
348 (setq pattern-list (cdr (cdr pattern-list))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
349 (setq pattern-list nil)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
350 ))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
351 |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
352 (reverse delim-regs-list) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
353 ))) |
33394
237411236185
(state-or-merge): Defvar when compiling.
Dave Love <fx@gnu.org>
parents:
33019
diff
changeset
|
354 |
95630
eebbd7f32937
Remove unnecessary eval-when-compiles and eval-and-compiles.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
355 (defvar state-of-merge) ; dynamic var |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
356 |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
357 ;; Check if the non-preferred merge has been modified since originally set. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
358 ;; This affects only the regions that are marked as default-A/B or combined. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
359 ;; If PREFERS-TOO is non-nil, then look at the regions marked as prefers-A/B as |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
360 ;; well. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
361 (defun ediff-merge-changed-from-default-p (diff-num &optional prefers-too) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
362 (let ((reg-A (ediff-get-region-contents diff-num 'A ediff-control-buffer)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
363 (reg-B (ediff-get-region-contents diff-num 'B ediff-control-buffer)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
364 (reg-C (ediff-get-region-contents diff-num 'C ediff-control-buffer))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
365 |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
366 (setq state-of-merge (ediff-get-state-of-merge diff-num)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
367 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
368 ;; if region was edited since it was first set by default |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
369 (or (and (string= state-of-merge "default-A") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
370 (not (string= reg-A reg-C))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
371 (and (string= state-of-merge "default-B") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
372 (not (string= reg-B reg-C))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
373 (and (string= state-of-merge "combined") |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
374 ;;(not (string= (ediff-make-combined-diff reg-A reg-B) reg-C))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
375 (not (string= (ediff-get-combined-region diff-num) reg-C))) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
376 (and prefers-too |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
377 (string= state-of-merge "prefer-A") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
378 (not (string= reg-A reg-C))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
379 (and prefers-too |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
380 (string= state-of-merge "prefer-B") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
381 (not (string= reg-B reg-C))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
20206
diff
changeset
|
382 ))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
383 |
11042 | 384 |
68997
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
385 (provide 'ediff-merg) |
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
386 |
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
387 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
388 ;;; Local Variables: |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
389 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
19047 | 390 ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
391 ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
392 ;;; End: |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
393 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93652
diff
changeset
|
394 ;; arch-tag: 9b798cf9-02ba-487f-a62e-b63aa823dbfb |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33394
diff
changeset
|
395 ;;; ediff-merg.el ends here |