Mercurial > emacs
annotate lisp/vc/ediff-mult.el @ 110934:a36fccf2a365
lisp/net/telnet.el (telnet-mode-map): Fix previous change.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 12 Oct 2010 03:48:58 +0200 |
parents | 280c8ae2476d |
children | 1b626601d32d 6e613fbf73d7 |
rev | line source |
---|---|
13607
71a4a349d998
Renamed from ediff-meta.el. Changed provide.
Richard M. Stallman <rms@gnu.org>
parents:
13216
diff
changeset
|
1 ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff |
14169 | 2 |
64762
41bb365f41c4
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64215
diff
changeset
|
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
106815 | 4 ;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
13130 | 5 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42288
diff
changeset
|
6 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
108970
diff
changeset
|
7 ;; Package: ediff |
13130 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
13130 | 12 ;; 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
|
13 ;; 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
|
14 ;; (at your option) any later version. |
13130 | 15 |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; 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
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
13130 | 23 |
14169 | 24 ;;; Commentary: |
25 | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
26 ;; Users are encouraged to add functionality to this file. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
27 ;; The present file contains all the infrastructure needed for that. |
13130 | 28 ;; |
39488
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
29 ;; Generally, to implement a new multisession capability within Ediff, |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
30 ;; you need to tell it |
13130 | 31 ;; |
32 ;; 1. How to display the session group buffer. | |
33 ;; This function must indicate which Ediff sessions are active (+) and | |
34 ;; which are finished (-). | |
35 ;; See ediff-redraw-directory-group-buffer for an example. | |
36 ;; In all likelihood, ediff-redraw-directory-group-buffer can be used | |
37 ;; directly or after a small modification. | |
38 ;; 2. What action to take when the user clicks button 2 or types v,e, or | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
39 ;; RET. See ediff-filegroup-action. |
13130 | 40 ;; 3. Provide a list of pairs or triples of file names (or buffers, |
41 ;; depending on the particular Ediff operation you want to invoke) | |
42 ;; in the following format: | |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
43 ;; (HEADER (nil nil (obj1 nil) (obj2 nil) (obj3 nil)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
44 ;; (...) ...) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
45 ;; The function ediff-make-new-meta-list-element can be used to create |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
46 ;; 2nd and subsequent elements of that list (i.e., after the |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
47 ;; description header). See ediff-make-new-meta-list-element for the |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
48 ;; explanation of the two nil placeholders in such elements. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
49 ;; |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
50 ;; There is API for extracting the components of the members of the |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
51 ;; above list. Search for `API for ediff-meta-list' for details. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
52 ;; |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
53 ;; HEADER must be a list of SIX elements (nil or string): |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
54 ;; (regexp metaobj1 metaobj2 metaobj3 merge-save-buffer |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
55 ;; comparison-function) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
56 ;; The function ediff-redraw-registry-buffer displays the |
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
57 ;; 1st - 4th of these in the registry buffer. |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
58 ;; For some jobs some of the members of the header might be nil. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
59 ;; The meaning of metaobj1, metaobj2, and metaobj3 depend on the job. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
60 ;; Typically these are directories where the files to be compared are |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
61 ;; found. |
13130 | 62 ;; Also, keep in mind that the function ediff-prepare-meta-buffer |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
63 ;; (which see) prepends the session group buffer to the descriptor, so |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
64 ;; the descriptor becomes 7-long. |
13130 | 65 ;; Ediff expects that your function (in 2 above) will arrange to |
66 ;; replace this prepended nil (via setcar) with the actual ediff | |
67 ;; control buffer associated with an appropriate Ediff session. | |
68 ;; This is arranged through internal startup hooks that can be passed | |
69 ;; to any of Ediff major entries (such as ediff-files, epatch, etc.). | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
70 ;; See how this is done in ediff-filegroup-action. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
71 ;; |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
72 ;; Session descriptions are of the form |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
73 ;; (nil nil (obj1 . nil) (obj2 . nil) (obj3 . nil)) |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
74 ;; which describe the objects relevant to the session. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
75 ;; Use ediff-make-new-meta-list-element to create these things. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
76 ;; Usually obj1/2/3 are names of files, but they may also be other |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
77 ;; things for some jobs. For instance, obj3 is nil for jobs that |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
78 ;; involve only two files. For patch jobs, obj2 and obj3 are markers |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
79 ;; that specify the patch corresponding to the file |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
80 ;; (whose name is obj1). |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
81 ;; The nil's are placeholders, which are used internally by ediff. |
13130 | 82 ;; 4. Write a function that makes a call to ediff-prepare-meta-buffer |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
83 ;; passing all this info. |
13130 | 84 ;; You may be able to use ediff-directories-internal as a template. |
85 ;; 5. If you intend to add several related pieces of functionality, | |
86 ;; you may want to keep the function in 4 as an internal version | |
87 ;; and then write several top-level interactive functions that call it | |
88 ;; with different parameters. | |
89 ;; See how ediff-directories, ediff-merge-directories, and | |
90 ;; ediff-merge-directories-with-ancestor all use | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
91 ;; ediff-directories-internal. |
13130 | 92 ;; |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
93 ;; A useful addition here could be session groups selected by patterns |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
94 ;; (which are different in each directory). For instance, one may want to |
13130 | 95 ;; compare files of the form abc{something}.c to files old{something}.d |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
96 ;; which may be in the same or different directories. Or, one may want to |
13130 | 97 ;; compare all files of the form {something} to files of the form {something}~. |
98 ;; | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
99 ;; Implementing this requires writing a collating function, which should pair |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
100 ;; up appropriate files. It will also require a generalization of the |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
101 ;; functions that do the layout of the meta- and differences buffers and of |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
102 ;; ediff-filegroup-action. |
13130 | 103 |
14169 | 104 ;;; Code: |
105 | |
18054 | 106 |
93652
6523ed37006c
2008-04-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
92502
diff
changeset
|
107 (provide 'ediff-mult) |
6523ed37006c
2008-04-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
92502
diff
changeset
|
108 |
18054 | 109 (defgroup ediff-mult nil |
64008
3c518762672f
(ediff-mult): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents:
63372
diff
changeset
|
110 "Multi-file and multi-buffer processing in Ediff." |
18054 | 111 :prefix "ediff-" |
112 :group 'ediff) | |
113 | |
114 | |
115 ;; compiler pacifier | |
116 (eval-when-compile | |
94604
c0dfa9027738
Simplify compilation requirements.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
117 (require 'ediff-ptch) |
c0dfa9027738
Simplify compilation requirements.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
118 (require 'ediff)) |
18054 | 119 ;; end pacifier |
120 | |
13130 | 121 (require 'ediff-init) |
122 | |
123 ;; meta-buffer | |
124 (ediff-defvar-local ediff-meta-buffer nil "") | |
125 (ediff-defvar-local ediff-parent-meta-buffer nil "") | |
126 ;; the registry buffer | |
127 (defvar ediff-registry-buffer nil) | |
128 | |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
129 (defconst ediff-meta-buffer-brief-message "Ediff Session Group Panel: %s |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
130 |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
131 Type ? to show useful commands in this buffer |
13130 | 132 |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
133 ") |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
134 |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
135 (defconst ediff-meta-buffer-verbose-message "Ediff Session Group Panel: %s |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
136 |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
137 Useful commands (type ? to hide them and free up screen): |
20206 | 138 button2, v, or RET over session record: start that Ediff session |
139 M:\tin sessions invoked from here, brings back this group panel | |
140 R:\tdisplay the registry of active Ediff sessions | |
141 h:\tmark session for hiding (toggle) | |
142 x:\thide marked sessions; with prefix arg: unhide | |
143 m:\tmark session for a non-hiding operation (toggle) | |
22286 | 144 uh/um:\tunmark all sessions marked for hiding/operation |
20206 | 145 n,SPC:\tnext session |
146 p,DEL:\tprevious session | |
147 E:\tbrowse Ediff on-line manual | |
148 T:\ttoggle truncation of long file names | |
149 q:\tquit this session group | |
13130 | 150 ") |
151 | |
152 (ediff-defvar-local ediff-meta-buffer-map nil | |
153 "The keymap for the meta buffer.") | |
154 (defvar ediff-dir-diffs-buffer-map (make-sparse-keymap) | |
155 "The keymap to be installed in the buffer showing differences between | |
156 directories.") | |
157 | |
158 ;; Variable specifying the action to take when the use invokes ediff in the | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
159 ;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action |
13130 | 160 (ediff-defvar-local ediff-meta-action-function nil "") |
161 ;; Tells ediff-update-meta-buffer how to redraw it | |
162 (ediff-defvar-local ediff-meta-redraw-function nil "") | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
163 ;; Tells ediff-filegroup-action and similar procedures how to invoke Ediff for |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
164 ;; the sessions in a given session group |
13130 | 165 (ediff-defvar-local ediff-session-action-function nil "") |
166 | |
167 (ediff-defvar-local ediff-metajob-name nil "") | |
168 | |
169 ;; buffer used to collect custom diffs from individual sessions in the group | |
170 (ediff-defvar-local ediff-meta-diff-buffer nil "") | |
171 | |
60151
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
172 ;; t means recurse into subdirs when deciding which files have same contents |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
173 (ediff-defvar-local ediff-recurse-to-subdirectories nil "") |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
174 |
51072
52709955c5a5
2003-05-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
48371
diff
changeset
|
175 ;; history var to use for filtering groups of files |
13130 | 176 (defvar ediff-filtering-regexp-history nil "") |
177 | |
51072
52709955c5a5
2003-05-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
48371
diff
changeset
|
178 (defcustom ediff-default-filtering-regexp nil |
52709955c5a5
2003-05-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
48371
diff
changeset
|
179 "The default regular expression used as a filename filter in multifile comparisons. |
68489
6d1e5d8e3112
(ediff-meta-buffer-keymap-setup-hook, ediff-before-session-group-setup-hooks,
Juanma Barranquero <lekktu@gmail.com>
parents:
65856
diff
changeset
|
180 Should be a sexp. For instance (car ediff-filtering-regexp-history) or nil." |
51072
52709955c5a5
2003-05-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
48371
diff
changeset
|
181 :type 'sexp |
52709955c5a5
2003-05-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
48371
diff
changeset
|
182 :group 'ediff-mult) |
52709955c5a5
2003-05-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
48371
diff
changeset
|
183 |
19774 | 184 ;; This has the form ((meta-buf regexp dir1 dir2 dir3 merge-auto-store-dir) |
185 ;; (ctl-buf session-status (file1 . eq-status) (file2 . eq-status) (file3 | |
186 ;; . eq-status)) (ctl-buf session-status (file1 . eq-status) (file2 | |
187 ;; . eq-status)) ...) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
188 ;; If ctl-buf is nil, the file-pair hasn't processed yet. If it is |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
189 ;; killed-buffer object, the file pair has been processed. If it is a live |
19774 | 190 ;; buffer, this means ediff is still working on the pair. |
191 ;; Eq-status of a file is t if the file equals some other file in the same | |
192 ;; group. | |
13130 | 193 (ediff-defvar-local ediff-meta-list nil "") |
194 | |
20206 | 195 (ediff-defvar-local ediff-meta-session-number nil "") |
196 | |
13130 | 197 |
198 ;; the difference list between directories in a directory session group | |
199 (ediff-defvar-local ediff-dir-difference-list nil "") | |
200 (ediff-defvar-local ediff-dir-diffs-buffer nil "") | |
201 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
202 ;; The registry of Ediff sessions. A list of control buffers. |
13130 | 203 (defvar ediff-session-registry nil) |
204 | |
20206 | 205 (defcustom ediff-meta-truncate-filenames t |
100171 | 206 "If non-nil, truncate long file names in the session group buffers. |
20206 | 207 This can be toggled with `ediff-toggle-filename-truncation'." |
56388
6d79704b2630
(ediff-meta-truncate-filenames): Change type to boolean.
Eli Zaretskii <eliz@gnu.org>
parents:
52828
diff
changeset
|
208 :type 'boolean |
20206 | 209 :group 'ediff-mult) |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
210 |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
211 (defcustom ediff-meta-mode-hook nil |
100171 | 212 "Hooks run just after setting up meta mode." |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
213 :type 'hook |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
214 :group 'ediff-mult) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
215 |
18054 | 216 (defcustom ediff-registry-setup-hook nil |
100171 | 217 "Hooks run just after the registry control panel is set up." |
18054 | 218 :type 'hook |
219 :group 'ediff-mult) | |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
220 |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
221 (defcustom ediff-before-session-group-setup-hooks nil |
100171 | 222 "Hooks to run before Ediff arranges the window for group-level operations. |
68489
6d1e5d8e3112
(ediff-meta-buffer-keymap-setup-hook, ediff-before-session-group-setup-hooks,
Juanma Barranquero <lekktu@gmail.com>
parents:
65856
diff
changeset
|
223 It is used by commands such as `ediff-directories'. |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
224 This hook can be used to save the previous window config, which can be restored |
68489
6d1e5d8e3112
(ediff-meta-buffer-keymap-setup-hook, ediff-before-session-group-setup-hooks,
Juanma Barranquero <lekktu@gmail.com>
parents:
65856
diff
changeset
|
225 on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'." |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
226 :type 'hook |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
227 :group 'ediff-hook) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
228 (defcustom ediff-after-session-group-setup-hook nil |
100171 | 229 "Hooks run just after a meta-buffer controlling a session group, such as |
18054 | 230 ediff-directories, is run." |
231 :type 'hook | |
232 :group 'ediff-mult) | |
233 (defcustom ediff-quit-session-group-hook nil | |
100171 | 234 "Hooks run just before exiting a session group." |
18054 | 235 :type 'hook |
236 :group 'ediff-mult) | |
237 (defcustom ediff-show-registry-hook nil | |
100171 | 238 "Hooks run just after the registry buffer is shown." |
18054 | 239 :type 'hook |
240 :group 'ediff-mult) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
241 (defcustom ediff-show-session-group-hook '(delete-other-windows) |
100171 | 242 "Hooks run just after a session group buffer is shown." |
18054 | 243 :type 'hook |
244 :group 'ediff-mult) | |
245 (defcustom ediff-meta-buffer-keymap-setup-hook nil | |
100171 | 246 "Hooks run just after setting up the `ediff-meta-buffer-map'. |
16766
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
247 This keymap controls key bindings in the meta buffer and is a local variable. |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
248 This means that you can set different bindings for different kinds of meta |
18054 | 249 buffers." |
250 :type 'hook | |
251 :group 'ediff-mult) | |
13130 | 252 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
253 ;; Buffer holding the multi-file patch. Local to the meta buffer |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
254 (ediff-defvar-local ediff-meta-patchbufer nil "") |
13130 | 255 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
256 ;;; API for ediff-meta-list |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
257 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
258 ;; A meta-list is either ediff-meta-list, which contains a header and the list |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
259 ;; of ediff sessions or ediff-dir-difference-list, which is a header followed |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
260 ;; by the list of differences among the directories (i.e., files that are not |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
261 ;; in all directories). The header is the same in all meta lists, but the rest |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
262 ;; is different. |
39488
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
263 ;; Structure of the meta-list: |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
264 ;; (HEADER SESSION1 SESSION2 ...) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
265 ;; HEADER: (GROUP-BUF REGEXP OBJA OBJB OBJC SAVE-DIR COMPARISON-FUNC) |
39488
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
266 ;; OBJA - first directory |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
267 ;; OBJB - second directory |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
268 ;; OBJC - third directory |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
269 ;; SESSION1/2/... are described below |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
270 ;; group buffer/regexp |
19774 | 271 (defsubst ediff-get-group-buffer (meta-list) |
13130 | 272 (nth 0 (car meta-list))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
273 |
19774 | 274 (defsubst ediff-get-group-regexp (meta-list) |
13130 | 275 (nth 1 (car meta-list))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
276 ;; group objects |
19774 | 277 (defsubst ediff-get-group-objA (meta-list) |
13130 | 278 (nth 2 (car meta-list))) |
19774 | 279 (defsubst ediff-get-group-objB (meta-list) |
13130 | 280 (nth 3 (car meta-list))) |
19774 | 281 (defsubst ediff-get-group-objC (meta-list) |
13130 | 282 (nth 4 (car meta-list))) |
19774 | 283 (defsubst ediff-get-group-merge-autostore-dir (meta-list) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
284 (nth 5 (car meta-list))) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
285 (defsubst ediff-get-group-comparison-func (meta-list) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
286 (nth 6 (car meta-list))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
287 |
39488
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
288 ;; ELT is a session meta descriptor (what is being preserved as |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
289 ;; 'ediff-meta-info) |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
290 ;; The structure is: (SESSION-CTL-BUFFER STATUS OBJA OBJB OBJC) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
291 ;; STATUS is ?I (hidden or invalid), ?* (marked for operation), ?H (hidden) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
292 ;; nil (nothing) |
39488
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
293 ;; OBJA/B/C is (FILENAME EQSTATUS) |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
294 ;; EQSTATUS is ?= or nil (?= means that this file is equal to some other |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
295 ;; file in this session) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
296 ;; session buffer |
19774 | 297 (defsubst ediff-get-session-buffer (elt) |
13130 | 298 (nth 0 elt)) |
19774 | 299 (defsubst ediff-get-session-status (elt) |
13130 | 300 (nth 1 elt)) |
19774 | 301 (defsubst ediff-set-session-status (session-info new-status) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
302 (setcar (cdr session-info) new-status)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
303 ;; session objects |
19774 | 304 (defsubst ediff-get-session-objA (elt) |
13130 | 305 (nth 2 elt)) |
19774 | 306 (defsubst ediff-get-session-objB (elt) |
13130 | 307 (nth 3 elt)) |
19774 | 308 (defsubst ediff-get-session-objC (elt) |
13130 | 309 (nth 4 elt)) |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
310 ;; Take the "name" component of the object into acount. ObjA/C/B is of the form |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
311 ;; (name . equality-indicator) |
19774 | 312 (defsubst ediff-get-session-objA-name (elt) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
313 (car (nth 2 elt))) |
19774 | 314 (defsubst ediff-get-session-objB-name (elt) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
315 (car (nth 3 elt))) |
19774 | 316 (defsubst ediff-get-session-objC-name (elt) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
317 (car (nth 4 elt))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
318 ;; equality indicators |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
319 (defsubst ediff-get-file-eqstatus (elt) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
320 (nth 1 elt)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
321 (defsubst ediff-set-file-eqstatus (elt value) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
322 (setcar (cdr elt) value)) |
13130 | 323 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
324 ;; Create a new element for the meta list out of obj1/2/3, which usually are |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
325 ;; files |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
326 ;; |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
327 ;; The first nil in such an element is later replaced with the session buffer. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
328 ;; The second nil is reserved for session status. |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
329 ;; |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
330 ;; Also, session objects A/B/C are turned into lists of the form (obj nil). |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
331 ;; This nil is a placeholder for eq-indicator. It is either nil or =. |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
332 ;; If it is discovered that this file is = to some other |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
333 ;; file in the same session, eq-indicator is changed to `='. |
106697
ac408704629c
lisp/*: Fix typos in docstrings and messages.
Juanma Barranquero <lekktu@gmail.com>
parents:
106471
diff
changeset
|
334 ;; Currently, the eq-indicator is used only for 2 and 3-file jobs. |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
335 (defun ediff-make-new-meta-list-element (obj1 obj2 obj3) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
336 (list nil nil (list obj1 nil) (list obj2 nil) (list obj3 nil))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
337 |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
338 ;; Constructs a meta list header. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
339 ;; OBJA, OBJB, OBJC are usually directories involved, but can be different for |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
340 ;; different jobs. For instance, multifile patch has only OBJA, which is the |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
341 ;; patch buffer. |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
342 (defun ediff-make-new-meta-list-header (regexp |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
343 objA objB objC |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
344 merge-auto-store-dir |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
345 comparison-func) |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
346 (list regexp objA objB objC merge-auto-store-dir comparison-func)) |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
347 |
20206 | 348 ;; The activity marker is either or + (active session, i.e., ediff is currently |
349 ;; run in it), or - (finished session, i.e., we've ran ediff in it and then | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
350 ;; exited). Return nil, if session is neither active nor finished |
20206 | 351 (defun ediff-get-session-activity-marker (session) |
352 (let ((session-buf (ediff-get-session-buffer session))) | |
353 (cond ((null session-buf) nil) ; virgin session | |
354 ((ediff-buffer-live-p session-buf) ?+) ;active session | |
355 (t ?-)))) | |
356 | |
19774 | 357 ;; checks if the session is a meta session |
358 (defun ediff-meta-session-p (session-info) | |
359 (and (stringp (ediff-get-session-objA-name session-info)) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
360 (file-directory-p (ediff-get-session-objA-name session-info)) |
19774 | 361 (stringp (ediff-get-session-objB-name session-info)) |
362 (file-directory-p (ediff-get-session-objB-name session-info)) | |
363 (if (stringp (ediff-get-session-objC-name session-info)) | |
364 (file-directory-p (ediff-get-session-objC-name session-info)) t))) | |
365 | |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
366 |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
367 (ediff-defvar-local ediff-verbose-help-enabled nil |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
368 "If t, display redundant help in ediff-directories and other meta buffers. |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
369 Toggled by ediff-toggle-verbose-help-meta-buffer" ) |
84862
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
370 |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
371 ;; Toggle verbose help in meta-buffers |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
372 ;; TODO: Someone who understands all this can make it better. |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
373 (defun ediff-toggle-verbose-help-meta-buffer () |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
374 "Toggle showing tediously verbose help in meta buffers." |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
375 (interactive) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
376 (setq ediff-verbose-help-enabled (not ediff-verbose-help-enabled)) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
377 (ediff-update-meta-buffer (current-buffer) 'must-redraw)) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
378 |
13130 | 379 ;; set up the keymap in the meta buffer |
68489
6d1e5d8e3112
(ediff-meta-buffer-keymap-setup-hook, ediff-before-session-group-setup-hooks,
Juanma Barranquero <lekktu@gmail.com>
parents:
65856
diff
changeset
|
380 (defun ediff-setup-meta-map () |
13130 | 381 (setq ediff-meta-buffer-map (make-sparse-keymap)) |
382 (suppress-keymap ediff-meta-buffer-map) | |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
383 (define-key ediff-meta-buffer-map "?" 'ediff-toggle-verbose-help-meta-buffer) |
13130 | 384 (define-key ediff-meta-buffer-map "q" 'ediff-quit-meta-buffer) |
20206 | 385 (define-key ediff-meta-buffer-map "T" 'ediff-toggle-filename-truncation) |
13130 | 386 (define-key ediff-meta-buffer-map "R" 'ediff-show-registry) |
387 (define-key ediff-meta-buffer-map "E" 'ediff-documentation) | |
388 (define-key ediff-meta-buffer-map "v" ediff-meta-action-function) | |
389 (define-key ediff-meta-buffer-map "\C-m" ediff-meta-action-function) | |
390 (define-key ediff-meta-buffer-map " " 'ediff-next-meta-item) | |
20206 | 391 (define-key ediff-meta-buffer-map "n" 'ediff-next-meta-item) |
13130 | 392 (define-key ediff-meta-buffer-map "\C-?" 'ediff-previous-meta-item) |
20206 | 393 (define-key ediff-meta-buffer-map "p" 'ediff-previous-meta-item) |
13130 | 394 (define-key ediff-meta-buffer-map [delete] 'ediff-previous-meta-item) |
395 (define-key ediff-meta-buffer-map [backspace] 'ediff-previous-meta-item) | |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
396 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
397 (let ((menu-map (make-sparse-keymap "Ediff-Meta"))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
398 (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
399 (cons "Ediff-Meta" menu-map)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
400 (define-key menu-map [ediff-quit-meta-buffer] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
401 '(menu-item "Quit" ediff-quit-meta-buffer |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
402 :help "Quit the meta buffer")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
403 (define-key menu-map [ediff-toggle-filename-truncation] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
404 '(menu-item "Truncate filenames" ediff-toggle-filename-truncation |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
405 :help "Toggle truncation of long file names in session group buffers" |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
406 :button (:toggle . ediff-meta-truncate-filenames))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
407 (define-key menu-map [ediff-show-registry] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
408 '(menu-item "Display Ediff Registry" ediff-show-registry |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
409 :help "Display Ediff's registry")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
410 (define-key menu-map [ediff-documentation] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
411 '(menu-item "Show Manual" ediff-documentation |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
412 :help "Display Ediff's manual")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
413 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
414 (or (ediff-one-filegroup-metajob) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
415 (progn |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
416 (define-key ediff-meta-buffer-map "=" nil) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
417 (define-key ediff-meta-buffer-map "==" 'ediff-meta-mark-equal-files) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
418 (define-key ediff-meta-buffer-map "=m" 'ediff-meta-mark-equal-files) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
419 (define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
420 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
421 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
422 (define-key menu-map [ediff-next-meta-item] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
423 '(menu-item "Next" ediff-next-meta-item |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
424 :help "Move to the next item in Ediff registry or session group buffer")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
425 (define-key menu-map [ediff-previous-meta-item] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
426 '(menu-item "Previous" ediff-previous-meta-item |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
427 :help "Move to the previous item in Ediff registry or session group buffer"))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
428 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
429 |
13130 | 430 (if ediff-no-emacs-help-in-control-buffer |
431 (define-key ediff-meta-buffer-map "\C-h" 'ediff-previous-meta-item)) | |
85972
51aa47312c4b
* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
84862
diff
changeset
|
432 (if (featurep 'emacs) |
13130 | 433 (define-key ediff-meta-buffer-map [mouse-2] ediff-meta-action-function) |
434 (define-key ediff-meta-buffer-map [button2] ediff-meta-action-function)) | |
435 | |
16766
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
436 (use-local-map ediff-meta-buffer-map) |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
437 ;; modify ediff-meta-buffer-map here |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
438 (run-hooks 'ediff-meta-buffer-keymap-setup-hook)) |
13130 | 439 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
440 |
13130 | 441 (defun ediff-meta-mode () |
442 "This mode controls all operations on Ediff session groups. | |
443 It is entered through one of the following commands: | |
444 `ediff-directories' | |
445 `edirs' | |
446 `ediff-directories3' | |
447 `edirs3' | |
448 `ediff-merge-directories' | |
449 `edirs-merge' | |
450 `ediff-merge-directories-with-ancestor' | |
451 `edirs-merge-with-ancestor' | |
452 `ediff-directory-revisions' | |
453 `edir-revisions' | |
454 `ediff-merge-directory-revisions' | |
455 `edir-merge-revisions' | |
456 `ediff-merge-directory-revisions-with-ancestor' | |
457 `edir-merge-revisions-with-ancestor' | |
458 | |
459 Commands: | |
460 \\{ediff-meta-buffer-map}" | |
461 (kill-all-local-variables) | |
462 (setq major-mode 'ediff-meta-mode) | |
63372
ea81833c3487
(ediff-meta-mode): Use run-mode-hooks.
Lute Kamstra <lute@gnu.org>
parents:
62963
diff
changeset
|
463 (setq mode-name "MetaEdiff") |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
464 ;; don't use run-mode-hooks here! |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
465 (run-hooks 'ediff-meta-mode-hook)) |
13130 | 466 |
467 | |
468 ;; the keymap for the buffer showing directory differences | |
469 (suppress-keymap ediff-dir-diffs-buffer-map) | |
470 (define-key ediff-dir-diffs-buffer-map "q" 'ediff-bury-dir-diffs-buffer) | |
471 (define-key ediff-dir-diffs-buffer-map " " 'next-line) | |
20206 | 472 (define-key ediff-dir-diffs-buffer-map "n" 'next-line) |
13130 | 473 (define-key ediff-dir-diffs-buffer-map "\C-?" 'previous-line) |
20206 | 474 (define-key ediff-dir-diffs-buffer-map "p" 'previous-line) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
475 (define-key ediff-dir-diffs-buffer-map "C" 'ediff-dir-diff-copy-file) |
85972
51aa47312c4b
* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
84862
diff
changeset
|
476 (if (featurep 'emacs) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
477 (define-key ediff-dir-diffs-buffer-map [mouse-2] 'ediff-dir-diff-copy-file) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
478 (define-key ediff-dir-diffs-buffer-map [button2] 'ediff-dir-diff-copy-file)) |
13130 | 479 (define-key ediff-dir-diffs-buffer-map [delete] 'previous-line) |
480 (define-key ediff-dir-diffs-buffer-map [backspace] 'previous-line) | |
481 | |
482 (defun ediff-next-meta-item (count) | |
483 "Move to the next item in Ediff registry or session group buffer. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
484 Moves in circular fashion. With numeric prefix arg, skip this many items." |
13130 | 485 (interactive "p") |
486 (or count (setq count 1)) | |
20206 | 487 (let (overl) |
488 (while (< 0 count) | |
489 (setq count (1- count)) | |
490 (ediff-next-meta-item1) | |
491 (setq overl (ediff-get-meta-overlay-at-pos (point))) | |
492 ;; skip invisible ones | |
493 (while (and overl (ediff-overlay-get overl 'invisible)) | |
494 (ediff-next-meta-item1) | |
495 (setq overl (ediff-get-meta-overlay-at-pos (point))))))) | |
13130 | 496 |
497 ;; Move to the next meta item | |
498 (defun ediff-next-meta-item1 () | |
499 (let (pos) | |
500 (setq pos (ediff-next-meta-overlay-start (point))) | |
501 (if pos (goto-char pos)) | |
502 (if (eq ediff-metajob-name 'ediff-registry) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
503 (if (and (ediff-get-meta-info (current-buffer) pos 'noerror) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
504 (search-forward "*Ediff" nil t)) |
13130 | 505 (skip-chars-backward "a-zA-Z*")) |
506 (if (> (skip-chars-forward "-+?H* \t0-9") 0) | |
507 (backward-char 1))))) | |
508 | |
509 | |
510 (defun ediff-previous-meta-item (count) | |
511 "Move to the previous item in Ediff registry or session group buffer. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
512 Moves in circular fashion. With numeric prefix arg, skip this many items." |
13130 | 513 (interactive "p") |
514 (or count (setq count 1)) | |
20206 | 515 (let (overl) |
516 (while (< 0 count) | |
517 (setq count (1- count)) | |
518 (ediff-previous-meta-item1) | |
519 (setq overl (ediff-get-meta-overlay-at-pos (point))) | |
520 ;; skip invisible ones | |
521 (while (and overl (ediff-overlay-get overl 'invisible)) | |
522 (ediff-previous-meta-item1) | |
523 (setq overl (ediff-get-meta-overlay-at-pos (point))))))) | |
13130 | 524 |
525 (defun ediff-previous-meta-item1 () | |
526 (let (pos) | |
527 (setq pos (ediff-previous-meta-overlay-start (point))) | |
528 ;;; ;; skip deleted | |
529 ;;; (while (ediff-get-session-status | |
530 ;;; (ediff-get-meta-info (current-buffer) pos 'noerror)) | |
531 ;;; (setq pos (ediff-previous-meta-overlay-start pos))) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
532 |
13130 | 533 (if pos (goto-char pos)) |
534 (if (eq ediff-metajob-name 'ediff-registry) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
535 (if (and (ediff-get-meta-info (current-buffer) pos 'noerror) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
536 (search-forward "*Ediff" nil t)) |
13130 | 537 (skip-chars-backward "a-zA-Z*")) |
538 (if (> (skip-chars-forward "-+?H* \t0-9") 0) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
539 (backward-char 1))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
540 )) |
13130 | 541 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
542 (defsubst ediff-add-slash-if-directory (dir file) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
543 (if (file-directory-p (concat dir file)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
544 (file-name-as-directory file) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
545 file)) |
13130 | 546 |
20206 | 547 (defun ediff-toggle-filename-truncation () |
548 "Toggle truncation of long file names in session group buffers. | |
549 Set `ediff-meta-truncate-filenames' variable if you want to change the default | |
550 behavior." | |
551 (interactive) | |
552 (setq ediff-meta-truncate-filenames (not ediff-meta-truncate-filenames)) | |
553 (ediff-update-meta-buffer (current-buffer) 'must-redraw)) | |
554 | |
13130 | 555 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
556 ;; These are used to encode membership of files in directory1/2/3 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
557 ;; Membership code of a file is a product of codes for the directories where |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
558 ;; this file is in |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
559 (defvar ediff-membership-code1 2) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
560 (defvar ediff-membership-code2 3) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
561 (defvar ediff-membership-code3 5) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
562 (defvar ediff-product-of-memcodes (* ediff-membership-code1 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
563 ediff-membership-code2 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
564 ediff-membership-code3)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
565 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
566 ;; DIR1, DIR2, DIR3 are directories. DIR3 can be nil. |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
567 ;; OUTPUT-DIR is a directory for auto-storing the results of merge jobs. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
568 ;; Can be nil. |
48371
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
47939
diff
changeset
|
569 ;; REGEXP is nil or a filter regexp; only file names that match the regexp |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
47939
diff
changeset
|
570 ;; are considered. |
13130 | 571 ;; If a file is a directory in dir1 but not dir2 (or vice versa), it is not |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
572 ;; included in the intersection. However, a regular file that is a dir in dir3 |
13130 | 573 ;; is included, since dir3 files are supposed to be ancestors for merging. |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
574 ;; If COMPARISON-FUNC is given, use it. Otherwise, use string= |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
575 ;; |
13130 | 576 ;; Returns a list of the form: |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
577 ;; (COMMON-PART DIFF-LIST) |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
578 ;; COMMON-PART is car and DIFF-LIST is cdr. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
579 ;; |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
580 ;; COMMON-PART is of the form: |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
581 ;; (META-HEADER (f1 f2 f3) (f1 f2 f3) ...) |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
582 ;; f3 can be nil if intersecting only 2 directories. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
583 ;; Each triple (f1 f2 f3) represents the files to be compared in the |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
584 ;; corresponding ediff subsession. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
585 ;; |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
586 ;; DIFF-LIST is of the form: |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
587 ;; (META-HEADER (file . num) (file . num)...) |
13130 | 588 ;; where num encodes the set of dirs where the file is found: |
589 ;; 2 - only dir1; 3 - only dir2; 5 - only dir3; 6 - dir1&2; 10 - dir1&3; etc. | |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
590 ;; META-HEADER: |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
591 ;; Contains the meta info about this ediff operation |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
592 ;; (regexp dir1 dir2 dir3 merge-auto-store-dir comparison-func) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
593 ;; Later the meta-buffer is prepended to this list. |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
594 ;; |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
595 ;; Some operations might use a different meta header. For instance, |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
596 ;; ediff-multifile-patch doesn't have dir2 and dir3, and regexp, |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
597 ;; comparison-func don't apply. |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
598 ;; |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
599 (defun ediff-intersect-directories (jobname |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
600 regexp dir1 dir2 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
601 &optional |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
602 dir3 merge-autostore-dir comparison-func) |
13130 | 603 (setq comparison-func (or comparison-func 'string=)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
604 (let (lis1 lis2 lis3 common auxdir1 auxdir2 auxdir3 common-part difflist) |
13130 | 605 |
606 (setq auxdir1 (file-name-as-directory dir1) | |
607 lis1 (directory-files auxdir1 nil regexp) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
608 lis1 (delete "." lis1) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
609 lis1 (delete ".." lis1) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
610 lis1 (mapcar |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
611 (lambda (elt) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
612 (ediff-add-slash-if-directory auxdir1 elt)) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
613 lis1) |
13130 | 614 auxdir2 (file-name-as-directory dir2) |
62963
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
615 lis2 (directory-files auxdir2 nil regexp) |
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
616 lis2 (delete "." lis2) |
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
617 lis2 (delete ".." lis2) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
618 lis2 (mapcar |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
619 (lambda (elt) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
620 (ediff-add-slash-if-directory auxdir2 elt)) |
62963
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
621 lis2)) |
13130 | 622 |
623 (if (stringp dir3) | |
624 (setq auxdir3 (file-name-as-directory dir3) | |
62963
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
625 lis3 (directory-files auxdir3 nil regexp) |
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
626 lis3 (delete "." lis3) |
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
627 lis3 (delete ".." lis3) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
628 lis3 (mapcar |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
629 (lambda (elt) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
630 (ediff-add-slash-if-directory auxdir3 elt)) |
62963
fcacef2ed810
2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
60151
diff
changeset
|
631 lis3))) |
13130 | 632 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
633 (if (ediff-nonempty-string-p merge-autostore-dir) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
634 (setq merge-autostore-dir |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
635 (file-name-as-directory merge-autostore-dir))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
636 (setq common (ediff-intersection lis1 lis2 comparison-func)) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
637 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
638 ;; In merge with ancestor jobs, we don't intersect with lis3. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
639 ;; If there is no ancestor, we'll offer to merge without the ancestor. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
640 ;; So, we intersect with lis3 only when we are doing 3-way file comparison |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
641 (if (and lis3 (ediff-comparison-metajob3 jobname)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
642 (setq common (ediff-intersection common lis3 comparison-func))) |
13130 | 643 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
644 ;; copying is needed because sort sorts via side effects |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
645 (setq common (sort (ediff-copy-list common) 'string-lessp)) |
13130 | 646 |
647 ;; compute difference list | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
648 (setq difflist (ediff-set-difference |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
649 (ediff-union (ediff-union lis1 lis2 comparison-func) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
650 lis3 |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
651 comparison-func) |
13130 | 652 common |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
653 comparison-func) |
13130 | 654 difflist (delete "." difflist) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
655 ;; copying is needed because sort sorts via side effects |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
656 difflist (sort (ediff-copy-list (delete ".." difflist)) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
657 'string-lessp)) |
13130 | 658 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
659 (setq difflist (mapcar (lambda (elt) (cons elt 1)) difflist)) |
13130 | 660 |
661 ;; check for files belonging to lis1/2/3 | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
662 ;; Each elt is of the norm (file . number) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
663 ;; Number encodes the directories to which file belongs. |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
664 ;; It is a product of a subset of ediff-membership-code1=2, |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
665 ;; ediff-membership-code2=3, and ediff-membership-code3=5. |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
666 ;; If file belongs to dir 1 only, the membership code is 2. |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
667 ;; If it is in dir1 and dir3, then the membership code is 2*5=10; |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
668 ;; if it is in dir1 and dir2, then the membership code is 2*3=6, etc. |
84862
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
669 (mapc (lambda (elt) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
670 (if (member (car elt) lis1) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
671 (setcdr elt (* (cdr elt) ediff-membership-code1))) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
672 (if (member (car elt) lis2) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
673 (setcdr elt (* (cdr elt) ediff-membership-code2))) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
674 (if (member (car elt) lis3) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
675 (setcdr elt (* (cdr elt) ediff-membership-code3))) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
676 ) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
677 difflist) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
678 (setq difflist (cons |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
679 ;; diff metalist header |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
680 (ediff-make-new-meta-list-header regexp |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
681 auxdir1 auxdir2 auxdir3 |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
682 merge-autostore-dir |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
683 comparison-func) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
684 difflist)) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
685 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
686 (setq common-part |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
687 (cons |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
688 ;; metalist header |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
689 (ediff-make-new-meta-list-header regexp |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
690 auxdir1 auxdir2 auxdir3 |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
691 merge-autostore-dir |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
692 comparison-func) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
693 (mapcar |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
694 (lambda (elt) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
695 (ediff-make-new-meta-list-element |
72516
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
696 (expand-file-name (concat auxdir1 elt)) |
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
697 (expand-file-name (concat auxdir2 elt)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
698 (if lis3 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
699 (progn |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
700 ;; The following is done because: In merging with |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
701 ;; ancestor, we don't intersect with lis3. So, it is |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
702 ;; possible that elt is a file in auxdir1/2 but a |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
703 ;; directory in auxdir3 Or elt may not exist in auxdir3 at |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
704 ;; all. In the first case, we add a slash at the end. In |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
705 ;; the second case, we insert nil. |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
706 (setq elt (ediff-add-slash-if-directory auxdir3 elt)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
707 (if (file-exists-p (concat auxdir3 elt)) |
72516
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
708 (expand-file-name (concat auxdir3 elt))))))) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
709 common))) |
13130 | 710 ;; return result |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
711 (cons common-part difflist) |
13130 | 712 )) |
713 | |
20206 | 714 ;; find directory files that are under revision. Include subdirectories, since |
715 ;; we may visit them recursively. DIR1 is the directory to inspect. | |
716 ;; MERGE-AUTOSTORE-DIR is the directory where to auto-store the results of | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
717 ;; merges. Can be nil. |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
718 (defun ediff-get-directory-files-under-revision (jobname |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
719 regexp dir1 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
720 &optional merge-autostore-dir) |
13130 | 721 (let (lis1 elt common auxdir1) |
722 (setq auxdir1 (file-name-as-directory dir1) | |
723 lis1 (directory-files auxdir1 nil regexp)) | |
724 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
725 (if (ediff-nonempty-string-p merge-autostore-dir) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
726 (setq merge-autostore-dir |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
727 (file-name-as-directory merge-autostore-dir))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
728 |
13130 | 729 (while lis1 |
730 (setq elt (car lis1) | |
731 lis1 (cdr lis1)) | |
732 ;; take files under revision control | |
733 (cond ((file-directory-p (concat auxdir1 elt)) | |
20206 | 734 (setq common |
735 (cons (ediff-add-slash-if-directory auxdir1 elt) common))) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
736 ((and (featurep 'vc-hooks) (vc-backend (concat auxdir1 elt))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
737 (setq common (cons elt common))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
738 ;; The following two are needed only if vc-hooks isn't loaded. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
739 ;; They won't recognize CVS files. |
13130 | 740 ((file-exists-p (concat auxdir1 elt ",v")) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
741 (setq common (cons elt common))) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
742 ((file-exists-p (concat auxdir1 "RCS/" elt ",v")) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
743 (setq common (cons elt common))) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
744 ) ; cond |
13130 | 745 ) ; while |
746 | |
20206 | 747 (setq common (delete "./" common) |
748 common (delete "../" common) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
749 common (delete "RCS" common) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
750 common (delete "CVS" common) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
751 ) |
13130 | 752 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
753 ;; copying is needed because sort sorts via side effects |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
754 (setq common (sort (ediff-copy-list common) 'string-lessp)) |
13130 | 755 |
756 ;; return result | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
757 (cons |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
758 ;; header -- has 6 elements. Meta buffer is prepended later by |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
759 ;; ediff-prepare-meta-buffer |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
760 (ediff-make-new-meta-list-header regexp |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
761 auxdir1 nil nil |
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
762 merge-autostore-dir nil) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
763 (mapcar (lambda (elt) (ediff-make-new-meta-list-element |
72516
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
764 (expand-file-name (concat auxdir1 elt)) nil nil)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
765 common)) |
13130 | 766 )) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
767 |
13130 | 768 |
769 ;; If file groups selected by patterns will ever be implemented, this | |
770 ;; comparison function might become useful. | |
771 ;;;; uses external variables PAT1 PAT2 to compare str1/2 | |
772 ;;;; patterns must be of the form ???*???? where ??? are strings of chars | |
773 ;;;; containing no *. | |
774 ;;(defun ediff-pattern= (str1 str2) | |
775 ;; (let (pos11 pos12 pos21 pos22 len1 len2) | |
776 ;; (setq pos11 0 | |
777 ;; len (length epat1) | |
778 ;; pos12 len) | |
779 ;; (while (and (< pos11 len) (not (= (aref epat1 pos11) ?*))) | |
780 ;; (setq pos11 (1+ pos11))) | |
781 ;; (while (and (> pos12 0) (not (= (aref epat1 (1- pos12)) ?*))) | |
782 ;; (setq pos12 (1- pos12))) | |
783 ;; | |
784 ;; (setq pos21 0 | |
785 ;; len (length epat2) | |
786 ;; pos22 len) | |
787 ;; (while (and (< pos21 len) (not (= (aref epat2 pos21) ?*))) | |
788 ;; (setq pos21 (1+ pos21))) | |
789 ;; (while (and (> pos22 0) (not (= (aref epat2 (1- pos22)) ?*))) | |
790 ;; (setq pos22 (1- pos22))) | |
791 ;; | |
792 ;; (if (and (> (length str1) pos12) (>= pos12 pos11) (> pos11 -1) | |
793 ;; (> (length str2) pos22) (>= pos22 pos21) (> pos21 -1)) | |
794 ;; (string= (substring str1 pos11 pos12) | |
795 ;; (substring str2 pos21 pos22))) | |
796 ;; )) | |
797 | |
798 | |
799 ;; Prepare meta-buffer in accordance with the argument-function and | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
800 ;; redraw-function. Must return the created meta-buffer. |
13130 | 801 (defun ediff-prepare-meta-buffer (action-func meta-list |
802 meta-buffer-name redraw-function | |
803 jobname &optional startup-hooks) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
804 (let* ((meta-buffer-name |
13130 | 805 (ediff-unique-buffer-name meta-buffer-name "*")) |
806 (meta-buffer (get-buffer-create meta-buffer-name))) | |
19047 | 807 (ediff-with-current-buffer meta-buffer |
13130 | 808 |
809 ;; comes first | |
810 (ediff-meta-mode) | |
811 | |
812 (setq ediff-meta-action-function action-func | |
813 ediff-meta-redraw-function redraw-function | |
814 ediff-metajob-name jobname | |
815 ediff-meta-buffer meta-buffer) | |
816 | |
817 ;; comes after ediff-meta-action-function is set | |
818 (ediff-setup-meta-map) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
819 |
13130 | 820 (if (eq ediff-metajob-name 'ediff-registry) |
821 (progn | |
822 (setq ediff-registry-buffer meta-buffer | |
823 ediff-meta-list meta-list) | |
824 ;; this func is used only from registry buffer, not from other | |
825 ;; meta-buffs. | |
826 (define-key | |
827 ediff-meta-buffer-map "M" 'ediff-show-meta-buff-from-registry)) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
828 ;; Initialize the meta list -- we don't do this for registry. |
13130 | 829 (setq ediff-meta-list |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
830 ;; add meta-buffer to the list header |
13130 | 831 (cons (cons meta-buffer (car meta-list)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
832 (cdr meta-list)))) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
833 |
13130 | 834 (or (eq meta-buffer ediff-registry-buffer) |
835 (setq ediff-session-registry | |
836 (cons meta-buffer ediff-session-registry))) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
837 |
13130 | 838 ;; redraw-function uses ediff-meta-list |
839 (funcall redraw-function ediff-meta-list) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
840 |
13130 | 841 ;; set read-only/non-modified |
842 (setq buffer-read-only t) | |
843 (set-buffer-modified-p nil) | |
844 | |
845 (run-hooks 'startup-hooks) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
846 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
847 ;; Arrange to show directory contents differences |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
848 ;; Must be after run startup-hooks, since ediff-dir-difference-list is |
13130 | 849 ;; set inside these hooks |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
850 (if (eq action-func 'ediff-filegroup-action) |
13130 | 851 (progn |
852 ;; put meta buffer in (car ediff-dir-difference-list) | |
853 (setq ediff-dir-difference-list | |
854 (cons (cons meta-buffer (car ediff-dir-difference-list)) | |
855 (cdr ediff-dir-difference-list))) | |
856 | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
857 (or (ediff-one-filegroup-metajob jobname) |
13130 | 858 (ediff-draw-dir-diffs ediff-dir-difference-list)) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
859 (define-key |
22286 | 860 ediff-meta-buffer-map "h" 'ediff-mark-for-hiding-at-pos) |
861 (define-key ediff-meta-buffer-map "x" 'ediff-hide-marked-sessions) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
862 (define-key |
22286 | 863 ediff-meta-buffer-map "m" 'ediff-mark-for-operation-at-pos) |
864 (define-key ediff-meta-buffer-map "u" nil) | |
13130 | 865 (define-key |
22286 | 866 ediff-meta-buffer-map "um" 'ediff-unmark-all-for-operation) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
867 (define-key |
22286 | 868 ediff-meta-buffer-map "uh" 'ediff-unmark-all-for-hiding) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
869 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
870 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
871 [menu-bar ediff-meta-mode ediff-hide-marked-sessions] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
872 '(menu-item "Hide marked" ediff-hide-marked-sessions |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
873 :help "Hide marked sessions. With prefix arg, unhide")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
874 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
875 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
876 [menu-bar ediff-meta-mode ediff-mark-for-hiding-at-pos] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
877 '(menu-item "Mark for hiding" ediff-mark-for-hiding-at-pos |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
878 :help "Mark session for hiding. With prefix arg, unmark")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
879 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
880 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
881 [menu-bar ediff-meta-mode ediff-mark-for-operation-at-pos] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
882 '(menu-item "Mark for group operation" ediff-mark-for-operation-at-pos |
106697
ac408704629c
lisp/*: Fix typos in docstrings and messages.
Juanma Barranquero <lekktu@gmail.com>
parents:
106471
diff
changeset
|
883 :help "Mark session for a group operation. With prefix arg, unmark")) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
884 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
885 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
886 [menu-bar ediff-meta-mode ediff-unmark-all-for-hiding] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
887 '(menu-item "Unmark all for hiding" ediff-unmark-all-for-hiding |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
888 :help "Unmark all sessions marked for hiding")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
889 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
890 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
891 [menu-bar ediff-meta-mode ediff-unmark-all-for-operation] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
892 '(menu-item "Unmark all for group operation" ediff-unmark-all-for-operation |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
893 :help "Unmark all sessions marked for operation")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
894 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
895 (cond ((ediff-collect-diffs-metajob jobname) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
896 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
897 [menu-bar ediff-meta-mode ediff-collect-custom-diffs] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
898 '(menu-item "Collect diffs" ediff-collect-custom-diffs |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
899 :help "Collect custom diffs of marked sessions in buffer `*Ediff Multifile Diffs*'")) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
900 (define-key |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
901 ediff-meta-buffer-map "P" 'ediff-collect-custom-diffs)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
902 ((ediff-patch-metajob jobname) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
903 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
904 [menu-bar ediff-meta-mode ediff-meta-show-patch] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
905 '(menu-item "Show multi-file patch" ediff-meta-show-patch |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
906 :help "Show the multi-file patch associated with this group session")) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
907 (define-key |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
908 ediff-meta-buffer-map "P" 'ediff-meta-show-patch))) |
22286 | 909 (define-key ediff-meta-buffer-map "^" 'ediff-up-meta-hierarchy) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
910 (define-key ediff-meta-buffer-map "D" 'ediff-show-dir-diffs) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
911 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
912 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
913 [menu-bar ediff-meta-mode ediff-up-meta-hierarchy] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
914 '(menu-item "Go to parent session" ediff-up-meta-hierarchy |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
915 :help "Go to the parent session group buffer")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
916 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
917 (define-key ediff-meta-buffer-map |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
918 [menu-bar ediff-meta-mode ediff-show-dir-diffs] |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
919 '(menu-item "Diff directories" ediff-show-dir-diffs |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
920 :help "Display differences among the directories involved in session group")))) |
13130 | 921 |
922 (if (eq ediff-metajob-name 'ediff-registry) | |
923 (run-hooks 'ediff-registry-setup-hook) | |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
924 (run-hooks 'ediff-after-session-group-setup-hook)) |
13130 | 925 ) ; eval in meta-buffer |
926 meta-buffer)) | |
927 | |
20206 | 928 ;; Insert the activity marker for session SESSION in the meta buffer at point |
929 ;; The activity marker is either SPC (untouched session), or + (active session, | |
930 ;; i.e., ediff is currently run in it), or - (finished session, i.e., we've ran | |
931 ;; ediff in it and then exited) | |
932 (defun ediff-insert-session-activity-marker-in-meta-buffer (session) | |
933 (insert | |
934 (cond ((ediff-get-session-activity-marker session)) | |
935 ;; virgin session | |
936 (t " ")))) | |
937 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
938 ;; Insert session status at point. Status is either ?H (marked for hiding), or |
20206 | 939 ;; ?I (hidden or invalid), or ?* (meaning marked for an operation; currently, |
940 ;; such op can only be checking for equality)), or SPC (meaning neither marked | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
941 ;; nor invalid) |
20206 | 942 (defun ediff-insert-session-status-in-meta-buffer (session) |
943 (insert | |
944 (cond ((ediff-get-session-status session)) ; session has status: ?H, ?I, ?* | |
945 ;; normal session, no marks or hidings | |
946 (t " ")))) | |
947 | |
948 ;; If NEW-MARKER is non-nil, use it to substitute the current activity marker | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
949 ;; in the meta buffer. If nil, use SPC |
20206 | 950 (defun ediff-replace-session-activity-marker-in-meta-buffer (point new-marker) |
951 (let* ((overl (ediff-get-meta-overlay-at-pos point)) | |
952 (session-info (ediff-overlay-get overl 'ediff-meta-info)) | |
953 (activity-marker (ediff-get-session-activity-marker session-info)) | |
954 buffer-read-only) | |
64008
3c518762672f
(ediff-mult): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents:
63372
diff
changeset
|
955 (or new-marker activity-marker (setq new-marker ?\s)) |
20206 | 956 (goto-char (ediff-overlay-start overl)) |
957 (if (eq (char-after (point)) new-marker) | |
958 () ; if marker shown in buffer is the same as new-marker, do nothing | |
959 (insert new-marker) | |
960 (delete-char 1) | |
961 (set-buffer-modified-p nil)))) | |
962 | |
963 ;; If NEW-STATUS is non-nil, use it to substitute the current status marker in | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
964 ;; the meta buffer. If nil, use SPC |
20206 | 965 (defun ediff-replace-session-status-in-meta-buffer (point new-status) |
966 (let* ((overl (ediff-get-meta-overlay-at-pos point)) | |
967 (session-info (ediff-overlay-get overl 'ediff-meta-info)) | |
968 (status (ediff-get-session-status session-info)) | |
969 buffer-read-only) | |
64008
3c518762672f
(ediff-mult): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents:
63372
diff
changeset
|
970 (setq new-status (or new-status status ?\s)) |
20206 | 971 (goto-char (ediff-overlay-start overl)) |
972 (forward-char 1) ; status is the second char in session record | |
973 (if (eq (char-after (point)) new-status) | |
974 () ; if marker shown in buffer is the same as new-marker, do nothing | |
975 (insert new-status) | |
976 (delete-char 1) | |
977 (set-buffer-modified-p nil)))) | |
978 | |
979 ;; insert all file info in meta buffer for a given session | |
980 (defun ediff-insert-session-info-in-meta-buffer (session-info sessionNum) | |
981 (let ((f1 (ediff-get-session-objA session-info)) | |
982 (f2 (ediff-get-session-objB session-info)) | |
983 (f3 (ediff-get-session-objC session-info)) | |
984 (pt (point)) | |
985 (hidden (eq (ediff-get-session-status session-info) ?I))) | |
986 ;; insert activity marker, i.e., SPC, - or + | |
987 (ediff-insert-session-activity-marker-in-meta-buffer session-info) | |
988 ;; insert session status, i.e., *, H | |
989 (ediff-insert-session-status-in-meta-buffer session-info) | |
990 (insert " Session " (int-to-string sessionNum) ":\n") | |
991 (ediff-meta-insert-file-info1 f1) | |
992 (ediff-meta-insert-file-info1 f2) | |
993 (ediff-meta-insert-file-info1 f3) | |
994 (ediff-set-meta-overlay pt (point) session-info sessionNum hidden))) | |
995 | |
13130 | 996 |
997 ;; this is a setup function for ediff-directories | |
998 ;; must return meta-buffer | |
999 (defun ediff-redraw-directory-group-buffer (meta-list) | |
1000 ;; extract directories | |
1001 (let ((meta-buf (ediff-get-group-buffer meta-list)) | |
1002 (empty t) | |
1003 (sessionNum 0) | |
20206 | 1004 regexp elt merge-autostore-dir |
13130 | 1005 point tmp-list buffer-read-only) |
19047 | 1006 (ediff-with-current-buffer meta-buf |
13130 | 1007 (setq point (point)) |
1008 (erase-buffer) | |
20206 | 1009 ;; delete phony overlays that used to represent sessions before the buff |
1010 ;; was redrawn | |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1011 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1012 (map-extents 'delete-extent) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1013 (mapc 'delete-overlay (overlays-in 1 1))) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1014 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1015 (setq regexp (ediff-get-group-regexp meta-list) |
20206 | 1016 merge-autostore-dir |
1017 (ediff-get-group-merge-autostore-dir meta-list)) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1018 |
81331
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1019 (if ediff-verbose-help-enabled |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1020 (progn |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1021 (insert (format ediff-meta-buffer-verbose-message |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1022 (ediff-abbrev-jobname ediff-metajob-name))) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1023 |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1024 (cond ((ediff-collect-diffs-metajob) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1025 (insert |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1026 " P:\tcollect custom diffs of all marked sessions\n")) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1027 ((ediff-patch-metajob) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1028 (insert |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1029 " P:\tshow patch appropriately for the context (session or group)\n"))) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1030 (insert |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1031 " ^:\tshow parent session group\n") |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1032 (or (ediff-one-filegroup-metajob) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1033 (insert |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1034 " D:\tshow differences among directories\n" |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1035 " ==:\tfor each session, show which files are identical\n" |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1036 " =h:\tlike ==, but also marks sessions for hiding\n" |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1037 " =m:\tlike ==, but also marks sessions for operation\n\n"))) |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1038 (insert (format ediff-meta-buffer-brief-message |
c3779fe5830e
2007-06-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1039 (ediff-abbrev-jobname ediff-metajob-name)))) |
13130 | 1040 |
20206 | 1041 (insert "\n") |
13130 | 1042 (if (and (stringp regexp) (> (length regexp) 0)) |
18054 | 1043 (insert |
20206 | 1044 (format "*** Filter-through regular expression: %s\n" regexp))) |
1045 (ediff-insert-dirs-in-meta-buffer meta-list) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1046 (if (and ediff-autostore-merges (ediff-merge-metajob) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1047 (ediff-nonempty-string-p merge-autostore-dir)) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1048 (insert (format |
20206 | 1049 "\nMerge results are automatically stored in:\n\t%s\n" |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1050 merge-autostore-dir))) |
13130 | 1051 (insert "\n |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1052 Size Last modified Name |
20206 | 1053 ---------------------------------------------- |
13130 | 1054 |
1055 ") | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1056 |
13130 | 1057 ;; discard info on directories and regexp |
1058 (setq meta-list (cdr meta-list) | |
1059 tmp-list meta-list) | |
1060 (while (and tmp-list empty) | |
1061 (if (and (car tmp-list) | |
1062 (not (eq (ediff-get-session-status (car tmp-list)) ?I))) | |
1063 (setq empty nil)) | |
1064 (setq tmp-list (cdr tmp-list))) | |
1065 | |
1066 (if empty | |
1067 (insert | |
1068 " ****** ****** This session group has no members\n")) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1069 |
13130 | 1070 ;; now organize file names like this: |
1071 ;; use-mark sizeA dateA sizeB dateB filename | |
1072 ;; make sure directories are displayed with a trailing slash. | |
1073 (while meta-list | |
1074 (setq elt (car meta-list) | |
1075 meta-list (cdr meta-list) | |
1076 sessionNum (1+ sessionNum)) | |
1077 (if (eq (ediff-get-session-status elt) ?I) | |
1078 () | |
20206 | 1079 (ediff-insert-session-info-in-meta-buffer elt sessionNum))) |
13130 | 1080 (set-buffer-modified-p nil) |
1081 (goto-char point) | |
1082 meta-buf))) | |
1083 | |
20206 | 1084 (defun ediff-update-markers-in-dir-meta-buffer (meta-list) |
1085 (let ((meta-buf (ediff-get-group-buffer meta-list)) | |
1086 session-info point overl buffer-read-only) | |
1087 (ediff-with-current-buffer meta-buf | |
1088 (setq point (point)) | |
1089 (goto-char (point-min)) | |
1090 (ediff-next-meta-item1) | |
1091 (while (not (bobp)) | |
1092 (setq session-info (ediff-get-meta-info meta-buf (point) 'no-error) | |
1093 overl (ediff-get-meta-overlay-at-pos (point))) | |
1094 (if session-info | |
1095 (progn | |
1096 (cond ((eq (ediff-get-session-status session-info) ?I) | |
1097 ;; Do hiding | |
1098 (if overl (ediff-overlay-put overl 'invisible t))) | |
1099 ((and (eq (ediff-get-session-status session-info) ?H) | |
1100 overl (ediff-overlay-get overl 'invisible)) | |
1101 ;; Do unhiding | |
1102 (ediff-overlay-put overl 'invisible nil)) | |
1103 (t (ediff-replace-session-activity-marker-in-meta-buffer | |
1104 (point) | |
1105 (ediff-get-session-activity-marker session-info)) | |
1106 (ediff-replace-session-status-in-meta-buffer | |
1107 (point) | |
1108 (ediff-get-session-status session-info)))))) | |
1109 (ediff-next-meta-item1) ; advance to the next item | |
1110 ) ; end while | |
1111 (set-buffer-modified-p nil) | |
1112 (goto-char point)) | |
1113 meta-buf)) | |
1114 | |
1115 (defun ediff-update-session-marker-in-dir-meta-buffer (session-num) | |
1116 (let (buffer-meta-overlays session-info overl buffer-read-only) | |
1117 (setq overl | |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1118 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1119 (map-extents |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1120 (lambda (ext maparg) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1121 (if (and |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1122 (ediff-overlay-get ext 'ediff-meta-info) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1123 (eq (ediff-overlay-get ext 'ediff-meta-session-number) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1124 session-num)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1125 ext))) |
20206 | 1126 ;; Emacs doesn't have map-extents, so try harder |
1127 ;; Splice overlay lists to get all buffer overlays | |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1128 (setq buffer-meta-overlays (overlay-lists) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1129 buffer-meta-overlays (append (car buffer-meta-overlays) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42288
diff
changeset
|
1130 (cdr buffer-meta-overlays))) |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1131 (car |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1132 (delq nil |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1133 (mapcar |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1134 (lambda (overl) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1135 (if (and |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1136 (ediff-overlay-get overl 'ediff-meta-info) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1137 (eq (ediff-overlay-get |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1138 overl 'ediff-meta-session-number) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1139 session-num)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1140 overl)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1141 buffer-meta-overlays))))) |
20206 | 1142 (or overl |
1143 (error | |
1144 "Bug in ediff-update-session-marker-in-dir-meta-buffer: no overlay with given number %S" | |
1145 session-num)) | |
1146 (setq session-info (ediff-overlay-get overl 'ediff-meta-info)) | |
1147 (goto-char (ediff-overlay-start overl)) | |
1148 (ediff-replace-session-activity-marker-in-meta-buffer | |
1149 (point) | |
1150 (ediff-get-session-activity-marker session-info)) | |
1151 (ediff-replace-session-status-in-meta-buffer | |
1152 (point) | |
1153 (ediff-get-session-status session-info))) | |
1154 (ediff-next-meta-item1)) | |
1155 | |
1156 | |
1157 | |
13130 | 1158 ;; Check if this is a problematic session. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1159 ;; Return nil if not. Otherwise, return symbol representing the problem |
13130 | 1160 ;; At present, problematic sessions occur only in -with-ancestor comparisons |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1161 ;; when the ancestor is a directory rather than a file, or when there is no |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1162 ;; suitable ancestor file in the ancestor directory |
13130 | 1163 (defun ediff-problematic-session-p (session) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1164 (let ((f1 (ediff-get-session-objA-name session)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1165 (f2 (ediff-get-session-objB-name session)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1166 (f3 (ediff-get-session-objC-name session))) |
13130 | 1167 (cond ((and (stringp f1) (not (file-directory-p f1)) |
1168 (stringp f2) (not (file-directory-p f2)) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1169 ;; either invalid file name or a directory |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1170 (or (not (stringp f3)) (file-directory-p f3)) |
13130 | 1171 (ediff-ancestor-metajob)) |
1172 ;; more may be added later | |
1173 'ancestor-is-dir) | |
1174 (t nil)))) | |
1175 | |
20206 | 1176 (defun ediff-meta-insert-file-info1 (fileinfo) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1177 (let ((fname (car fileinfo)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1178 (feq (ediff-get-file-eqstatus fileinfo)) |
20206 | 1179 (max-filename-width (if ediff-meta-truncate-filenames |
1180 (- (window-width) 41) | |
1181 500)) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1182 file-modtime file-size) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1183 (cond ((not (stringp fname)) (setq file-size -2)) ; file doesn't exits |
38514
10482dd382e7
* viper-ex.el (ex-token-list,ex-cmd-execute): Revamped, courtesy
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33019
diff
changeset
|
1184 ((ediff-listable-file fname) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1185 (if (file-exists-p fname) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1186 ;; set real size and modtime |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1187 (setq file-size (ediff-file-size fname) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1188 file-modtime (ediff-file-modtime fname)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1189 (setq file-size -2))) ; file doesn't exist |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1190 ( t (setq file-size -1))) ; remote file |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1191 (if (stringp fname) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1192 (insert |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1193 (format |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1194 "%s %s %-20s %s\n" |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1195 (if feq "=" " ") ; equality indicator |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1196 (format "%10s" (cond ((= file-size -1) "--") |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1197 ((< file-size -1) "--") |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1198 (t file-size))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1199 (cond ((= file-size -1) "*remote file*") |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1200 ((< file-size -1) "*file doesn't exist*") |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1201 (t (ediff-format-date (decode-time file-modtime)))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1202 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1203 ;; dir names in meta lists have training slashes, so we just |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1204 ;; abbreviate the file name, if file exists |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1205 (if (and (not (stringp fname)) (< file-size -1)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1206 "-------" ; file doesn't exist |
20206 | 1207 (ediff-truncate-string-left |
1208 (ediff-abbreviate-file-name fname) | |
1209 max-filename-width))))))) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1210 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1211 (defconst ediff-months '((1 . "Jan") (2 . "Feb") (3 . "Mar") (4 . "Apr") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1212 (5 . "May") (6 . "Jun") (7 . "Jul") (8 . "Aug") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1213 (9 . "Sep") (10 . "Oct") (11 . "Nov") (12 . "Dec")) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1214 "Months' associative array.") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1215 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1216 ;; returns 2char string |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1217 (defsubst ediff-fill-leading-zero (num) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1218 (if (< num 10) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1219 (format "0%d" num) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1220 (number-to-string num))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1221 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1222 ;; TIME is like the output of decode-time |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1223 (defun ediff-format-date (time) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1224 (format "%s %2d %4d %s:%s:%s" |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1225 (cdr (assoc (nth 4 time) ediff-months)) ; month |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1226 (nth 3 time) ; day |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1227 (nth 5 time) ; year |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1228 (ediff-fill-leading-zero (nth 2 time)) ; hour |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1229 (ediff-fill-leading-zero (nth 1 time)) ; min |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1230 (ediff-fill-leading-zero (nth 0 time)) ; sec |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1231 )) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1232 |
20206 | 1233 ;; Draw the directories |
1234 (defun ediff-insert-dirs-in-meta-buffer (meta-list) | |
1235 (let* ((dir1 (ediff-abbreviate-file-name (ediff-get-group-objA meta-list))) | |
1236 (dir2 (ediff-get-group-objB meta-list)) | |
1237 (dir2 (if (stringp dir2) (ediff-abbreviate-file-name dir2))) | |
1238 (dir3 (ediff-get-group-objC meta-list)) | |
1239 (dir3 (if (stringp dir3) (ediff-abbreviate-file-name dir3)))) | |
1240 (insert "*** Directory A: " dir1 "\n") | |
1241 (if dir2 (insert "*** Directory B: " dir2 "\n")) | |
1242 (if dir3 (insert "*** Directory C: " dir3 "\n")) | |
1243 (insert "\n"))) | |
1244 | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1245 (defun ediff-draw-dir-diffs (diff-list &optional buf-name) |
13130 | 1246 (if (null diff-list) (error "Lost difference info on these directories")) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1247 (setq buf-name |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1248 (or buf-name |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1249 (ediff-unique-buffer-name "*Ediff File Group Differences" "*"))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1250 (let* ((regexp (ediff-get-group-regexp diff-list)) |
13130 | 1251 (dir1 (ediff-abbreviate-file-name (ediff-get-group-objA diff-list))) |
1252 (dir2 (ediff-abbreviate-file-name (ediff-get-group-objB diff-list))) | |
1253 (dir3 (ediff-get-group-objC diff-list)) | |
1254 (dir3 (if (stringp dir3) (ediff-abbreviate-file-name dir3))) | |
1255 (meta-buf (ediff-get-group-buffer diff-list)) | |
1256 (underline (make-string 26 ?-)) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1257 file membership-code saved-point |
13130 | 1258 buffer-read-only) |
1259 ;; skip the directory part | |
1260 (setq diff-list (cdr diff-list)) | |
1261 (setq ediff-dir-diffs-buffer (get-buffer-create buf-name)) | |
19047 | 1262 (ediff-with-current-buffer ediff-dir-diffs-buffer |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1263 (setq saved-point (point)) |
13130 | 1264 (use-local-map ediff-dir-diffs-buffer-map) |
1265 (erase-buffer) | |
1266 (setq ediff-meta-buffer meta-buf) | |
1267 (insert "\t\t*** Directory Differences ***\n") | |
1268 (insert " | |
1269 Useful commands: | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1270 C,button2: over file name -- copy this file to directory that doesn't have it |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1271 q: hide this buffer |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1272 n,SPC: next line |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1273 p,DEL: previous line\n\n") |
13130 | 1274 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1275 (insert (format "\n*** Directory A: %s\n" dir1)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1276 (if dir2 (insert (format "*** Directory B: %s\n" dir2))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1277 (if dir3 (insert (format "*** Directory C: %s\n" dir3))) |
13130 | 1278 (if (and (stringp regexp) (> (length regexp) 0)) |
18054 | 1279 (insert |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1280 (format "*** Filter-through regular expression: %s\n" regexp))) |
13130 | 1281 (insert "\n") |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1282 (insert (format "\n%-27s%-26s" "Directory A" "Directory B")) |
13130 | 1283 (if dir3 |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1284 (insert (format " %-25s\n" "Directory C")) |
13130 | 1285 (insert "\n")) |
1286 (insert (format "%s%s" underline underline)) | |
1287 (if (stringp dir3) | |
1288 (insert (format "%s\n\n" underline)) | |
1289 (insert "\n\n")) | |
1290 | |
1291 (if (null diff-list) | |
1292 (insert "\n\t*** No differences ***\n")) | |
1293 | |
1294 (while diff-list | |
1295 (setq file (car (car diff-list)) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1296 membership-code (cdr (car diff-list)) |
13130 | 1297 diff-list (cdr diff-list)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1298 (if (= (mod membership-code ediff-membership-code1) 0) ; dir1 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1299 (let ((beg (point))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1300 (insert (format "%-27s" |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1301 (ediff-truncate-string-left |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1302 (ediff-abbreviate-file-name |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1303 (if (file-directory-p (concat dir1 file)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1304 (file-name-as-directory file) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1305 file)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1306 24))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1307 ;; format of meta info in the dir-diff-buffer: |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1308 ;; (filename-tail filename-full otherdir1 otherdir2 otherdir3) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1309 (ediff-set-meta-overlay |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1310 beg (point) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1311 (list meta-buf file (concat dir1 file) dir1 dir2 dir3))) |
13130 | 1312 (insert (format "%-27s" "---"))) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1313 (if (= (mod membership-code ediff-membership-code2) 0) ; dir2 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1314 (let ((beg (point))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1315 (insert (format "%-26s" |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1316 (ediff-truncate-string-left |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1317 (ediff-abbreviate-file-name |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1318 (if (file-directory-p (concat dir2 file)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1319 (file-name-as-directory file) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1320 file)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1321 24))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1322 (ediff-set-meta-overlay |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1323 beg (point) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1324 (list meta-buf file (concat dir2 file) dir1 dir2 dir3))) |
13130 | 1325 (insert (format "%-26s" "---"))) |
1326 (if (stringp dir3) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1327 (if (= (mod membership-code ediff-membership-code3) 0) ; dir3 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1328 (let ((beg (point))) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1329 (insert (format " %-25s" |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1330 (ediff-truncate-string-left |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1331 (ediff-abbreviate-file-name |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1332 (if (file-directory-p (concat dir3 file)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1333 (file-name-as-directory file) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1334 file)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1335 24))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1336 (ediff-set-meta-overlay |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1337 beg (point) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1338 (list meta-buf file (concat dir3 file) dir1 dir2 dir3))) |
13130 | 1339 (insert (format " %-25s" "---")))) |
1340 (insert "\n")) | |
1341 (setq buffer-read-only t) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1342 (set-buffer-modified-p nil) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1343 (goto-char saved-point)) ; end eval in diff buffer |
13130 | 1344 )) |
1345 | |
1346 (defun ediff-bury-dir-diffs-buffer () | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1347 "Bury the directory difference buffer. Display the meta buffer instead." |
13130 | 1348 (interactive) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1349 ;; ediff-meta-buffer is set in ediff-draw-dir-diffs so the directory |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1350 ;; difference buffer remembers the meta buffer |
13130 | 1351 (let ((buf ediff-meta-buffer) |
1352 wind) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1353 (ediff-kill-buffer-carefully ediff-dir-diffs-buffer) |
13130 | 1354 (if (setq wind (ediff-get-visible-buffer-window buf)) |
1355 (select-window wind) | |
1356 (set-window-buffer (selected-window) buf)))) | |
1357 | |
1358 ;; executes in dir session group buffer | |
1359 ;; show buffer differences | |
1360 (defun ediff-show-dir-diffs () | |
1361 "Display differences among the directories involved in session group." | |
1362 (interactive) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1363 (if (ediff-one-filegroup-metajob) |
13130 | 1364 (error "This command is inapplicable in the present context")) |
1365 (or (ediff-buffer-live-p ediff-dir-diffs-buffer) | |
1366 (ediff-draw-dir-diffs ediff-dir-difference-list)) | |
1367 (let ((buf ediff-dir-diffs-buffer)) | |
1368 (other-window 1) | |
1369 (set-window-buffer (selected-window) buf) | |
1370 (goto-char (point-min)))) | |
1371 | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1372 ;; Format of meta info in dir-diff-buffer: |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1373 ;; (filename-tail filename-full otherdir1 otherdir2) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1374 (defun ediff-dir-diff-copy-file () |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1375 "Copy file described at point to directories where this file is missing." |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1376 (interactive) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1377 (let* ((pos (ediff-event-point last-command-event)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1378 (info (ediff-get-meta-info (current-buffer) pos 'noerror)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1379 (meta-buf (car info)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1380 (file-tail (nth 1 info)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1381 (file-abs (nth 2 info)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1382 (otherdir1 (nth 3 info)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1383 (otherfile1 (if otherdir1 (concat otherdir1 file-tail))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1384 (otherdir2 (nth 4 info)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1385 (otherfile2 (if otherdir2 (concat otherdir2 file-tail))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1386 (otherdir3 (nth 5 info)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1387 (otherfile3 (if otherdir3 (concat otherdir3 file-tail))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1388 meta-list dir-diff-list |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1389 ) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1390 (if (null info) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1391 (error "No file suitable for copying described at this location")) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1392 (ediff-with-current-buffer meta-buf |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1393 (setq meta-list ediff-meta-list |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1394 dir-diff-list ediff-dir-difference-list)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1395 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1396 ;; copy file to directories where it doesn't exist, update |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1397 ;; ediff-dir-difference-list and redisplay |
84862
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
1398 (mapc |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1399 (lambda (otherfile-struct) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1400 (let ((otherfile (car otherfile-struct)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1401 (file-mem-code (cdr otherfile-struct))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1402 (if otherfile |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1403 (or (file-exists-p otherfile) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1404 (if (y-or-n-p |
65689
96187e7edd1b
2005-09-25 Romain Francoise <romain@orebokech.com>
Romain Francoise <romain@orebokech.com>
parents:
64762
diff
changeset
|
1405 (format "Copy %s to %s? " file-abs otherfile)) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1406 (let* ((file-diff-record (assoc file-tail dir-diff-list)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1407 (new-mem-code |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1408 (* (cdr file-diff-record) file-mem-code))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1409 (copy-file file-abs otherfile) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1410 (setcdr file-diff-record new-mem-code) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1411 (ediff-draw-dir-diffs dir-diff-list (buffer-name)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1412 (sit-for 0) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1413 ;; if file is in all three dirs or in two dirs and only |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1414 ;; two dirs are involved, delete this file's record |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1415 (if (or (= new-mem-code ediff-product-of-memcodes) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1416 (and (> new-mem-code ediff-membership-code3) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1417 (null otherfile3))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1418 (delq file-diff-record dir-diff-list)) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1419 )))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1420 )) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1421 ;; 2,3,5 are numbers used to encode membership of a file in |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1422 ;; dir1/2/3. See ediff-intersect-directories. |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1423 (list (cons otherfile1 2) (cons otherfile2 3) (cons otherfile3 5))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1424 |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1425 (if (and (file-exists-p otherfile1) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1426 (file-exists-p otherfile2) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1427 (or (not otherfile3) (file-exists-p otherfile3))) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1428 ;; update ediff-meta-list by direct modification |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1429 (nconc meta-list |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1430 (list (ediff-make-new-meta-list-element |
72516
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1431 (expand-file-name otherfile1) |
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1432 (expand-file-name otherfile2) |
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1433 (if otherfile3 |
aba79a1f03ed
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1434 (expand-file-name otherfile3))))) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1435 ) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1436 (ediff-update-meta-buffer meta-buf 'must-redraw) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1437 )) |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1438 |
13130 | 1439 (defun ediff-up-meta-hierarchy () |
1440 "Go to the parent session group buffer." | |
1441 (interactive) | |
1442 (if (ediff-buffer-live-p ediff-parent-meta-buffer) | |
20206 | 1443 (ediff-show-meta-buffer |
1444 ediff-parent-meta-buffer ediff-meta-session-number) | |
13130 | 1445 (error "This session group has no parent"))) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1446 |
13130 | 1447 |
1448 ;; argument is ignored | |
1449 (defun ediff-redraw-registry-buffer (&optional ignore) | |
19047 | 1450 (ediff-with-current-buffer ediff-registry-buffer |
13130 | 1451 (let ((point (point)) |
1452 elt bufAname bufBname bufCname cur-diff total-diffs pt | |
1453 job-name meta-list registry-list buffer-read-only) | |
1454 (erase-buffer) | |
20206 | 1455 ;; delete phony overlays that used to represent sessions before the buff |
1456 ;; was redrawn | |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1457 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1458 (map-extents 'delete-extent) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
1459 (mapc 'delete-overlay (overlays-in 1 1))) |
20206 | 1460 |
13130 | 1461 (insert "This is a registry of all active Ediff sessions. |
1462 | |
1463 Useful commands: | |
1464 button2, `v', RET over a session record: switch to that session | |
20206 | 1465 M over a session record: display the associated session group |
1466 R in any Ediff session: display session registry | |
1467 n,SPC: next session | |
1468 p,DEL: previous session | |
1469 E: browse Ediff on-line manual | |
1470 q: bury registry | |
13130 | 1471 |
1472 | |
1473 \t\tActive Ediff Sessions: | |
1474 \t\t---------------------- | |
1475 | |
1476 ") | |
1477 ;; purge registry list from dead buffers | |
84862
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
1478 (mapc (lambda (elt) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
1479 (if (not (ediff-buffer-live-p elt)) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
1480 (setq ediff-session-registry |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
1481 (delq elt ediff-session-registry)))) |
d0ab195e58b1
(ediff-intersect-directories, ediff-redraw-directory-group-buffer,
Juanma Barranquero <lekktu@gmail.com>
parents:
82140
diff
changeset
|
1482 ediff-session-registry) |
13130 | 1483 |
1484 (if (null ediff-session-registry) | |
1485 (insert " ******* No active Ediff sessions *******\n")) | |
1486 | |
1487 (setq registry-list ediff-session-registry) | |
1488 (while registry-list | |
1489 (setq elt (car registry-list) | |
1490 registry-list (cdr registry-list)) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1491 |
13130 | 1492 (if (ediff-buffer-live-p elt) |
19047 | 1493 (if (ediff-with-current-buffer elt |
13130 | 1494 (setq job-name ediff-metajob-name |
1495 meta-list ediff-meta-list) | |
1496 (and ediff-metajob-name | |
1497 (not (eq ediff-metajob-name 'ediff-registry)))) | |
1498 (progn | |
1499 (setq pt (point)) | |
1500 (insert (format " *group*\t%s: %s\n" | |
1501 (buffer-name elt) | |
1502 (ediff-abbrev-jobname job-name))) | |
1503 (insert (format "\t\t %s %s %s\n" | |
1504 (ediff-abbreviate-file-name | |
1505 (ediff-get-group-objA meta-list)) | |
1506 (ediff-abbreviate-file-name | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1507 (if (stringp |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1508 (ediff-get-group-objB meta-list)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1509 (ediff-get-group-objB meta-list) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1510 "")) |
13130 | 1511 (ediff-abbreviate-file-name |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1512 (if (stringp |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1513 (ediff-get-group-objC meta-list)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1514 (ediff-get-group-objC meta-list) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1515 "")))) |
13130 | 1516 (ediff-set-meta-overlay pt (point) elt)) |
1517 (progn | |
19047 | 1518 (ediff-with-current-buffer elt |
13130 | 1519 (setq bufAname (if (ediff-buffer-live-p ediff-buffer-A) |
1520 (buffer-name ediff-buffer-A) | |
1521 "!!!killed buffer!!!") | |
1522 bufBname (if (ediff-buffer-live-p ediff-buffer-B) | |
1523 (buffer-name ediff-buffer-B) | |
1524 "!!!killed buffer!!!") | |
1525 bufCname (cond ((not (ediff-3way-job)) | |
1526 "") | |
1527 ((ediff-buffer-live-p ediff-buffer-C) | |
1528 (buffer-name ediff-buffer-C)) | |
1529 (t "!!!killed buffer!!!"))) | |
1530 (setq total-diffs (format "%-4d" ediff-number-of-differences) | |
1531 cur-diff | |
1532 (cond ((= ediff-current-difference -1) " _") | |
1533 ((= ediff-current-difference | |
1534 ediff-number-of-differences) | |
1535 " $") | |
1536 (t (format | |
1537 "%4d" (1+ ediff-current-difference)))) | |
1538 job-name ediff-job-name)) | |
1539 ;; back in the meta buf | |
1540 (setq pt (point)) | |
1541 (insert cur-diff "/" total-diffs "\t" | |
1542 (buffer-name elt) | |
1543 (format ": %s" (ediff-abbrev-jobname job-name))) | |
1544 (insert | |
1545 "\n\t\t " bufAname " " bufBname " " bufCname "\n") | |
1546 (ediff-set-meta-overlay pt (point) elt)))) | |
1547 ) ; while | |
1548 (set-buffer-modified-p nil) | |
1549 (goto-char point) | |
1550 ))) | |
1551 | |
20206 | 1552 ;; Sets overlay around a meta record with 'ediff-meta-info property PROP |
1553 ;; If optional SESSION-NUMBER, make it a property of the overlay, | |
1554 ;; ediff-meta-session-number | |
39488
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
1555 ;; PROP is either the ctl or meta buffer (used when we work with the registry) |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
1556 ;; or a session meta descriptor of the form |
3856a43ac2bb
2001-09-27 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39258
diff
changeset
|
1557 ;; (SESSION-CTL-BUFFER STATUS OBJA OBJB OBJC) |
20206 | 1558 (defun ediff-set-meta-overlay (b e prop &optional session-number hidden) |
13130 | 1559 (let (overl) |
1560 (setq overl (ediff-make-overlay b e)) | |
85972
51aa47312c4b
* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
84862
diff
changeset
|
1561 (if (featurep 'emacs) |
13130 | 1562 (ediff-overlay-put overl 'mouse-face 'highlight) |
1563 (ediff-overlay-put overl 'highlight t)) | |
20206 | 1564 (ediff-overlay-put overl 'ediff-meta-info prop) |
1565 (ediff-overlay-put overl 'invisible hidden) | |
68997
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
1566 (ediff-overlay-put overl 'follow-link t) |
20206 | 1567 (if (numberp session-number) |
1568 (ediff-overlay-put overl 'ediff-meta-session-number session-number)))) | |
13130 | 1569 |
22286 | 1570 (defun ediff-mark-for-hiding-at-pos (unmark) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1571 "Mark session for hiding. With prefix arg, unmark." |
13130 | 1572 (interactive "P") |
1573 (let* ((pos (ediff-event-point last-command-event)) | |
1574 (meta-buf (ediff-event-buffer last-command-event)) | |
1575 ;; ediff-get-meta-info gives error if meta-buf or pos are invalid | |
1576 (info (ediff-get-meta-info meta-buf pos)) | |
20206 | 1577 (session-number (ediff-get-session-number-at-pos pos))) |
22286 | 1578 (ediff-mark-session-for-hiding info unmark) |
1579 (ediff-next-meta-item 1) | |
1580 (save-excursion | |
1581 (ediff-update-meta-buffer meta-buf nil session-number)) | |
13130 | 1582 )) |
1583 | |
22286 | 1584 ;; Returns whether session was marked or unmarked |
1585 (defun ediff-mark-session-for-hiding (info unmark) | |
1586 (let ((session-buf (ediff-get-session-buffer info)) | |
1587 ignore) | |
1588 (cond ((eq unmark 'mark) (setq unmark nil)) | |
1589 ((eq (ediff-get-session-status info) ?H) (setq unmark t)) | |
1590 (unmark ; says unmark, but the marker is different from H | |
1591 (setq ignore t))) | |
1592 (cond (ignore) | |
1593 (unmark (ediff-set-session-status info nil)) | |
1594 ;;; (if (ediff-buffer-live-p session-buf) | |
1595 ;;; (error "Can't hide active session, %s" (buffer-name session-buf))) | |
1596 (t (ediff-set-session-status info ?H)))) | |
1597 unmark) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1598 |
22286 | 1599 |
1600 (defun ediff-mark-for-operation-at-pos (unmark) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1601 "Mark session for a group operation. With prefix arg, unmark." |
13130 | 1602 (interactive "P") |
1603 (let* ((pos (ediff-event-point last-command-event)) | |
1604 (meta-buf (ediff-event-buffer last-command-event)) | |
1605 ;; ediff-get-meta-info gives error if meta-buf or pos are invalid | |
20206 | 1606 (info (ediff-get-meta-info meta-buf pos)) |
1607 (session-number (ediff-get-session-number-at-pos pos))) | |
22286 | 1608 (ediff-mark-session-for-operation info unmark) |
1609 (ediff-next-meta-item 1) | |
1610 (save-excursion | |
1611 (ediff-update-meta-buffer meta-buf nil session-number)) | |
13130 | 1612 )) |
1613 | |
22286 | 1614 |
1615 ;; returns whether session was unmarked. | |
1616 ;; remember: this is a toggle op | |
1617 (defun ediff-mark-session-for-operation (info unmark) | |
1618 (let (ignore) | |
1619 (cond ((eq unmark 'mark) (setq unmark nil)) | |
1620 ((eq (ediff-get-session-status info) ?*) (setq unmark t)) | |
1621 (unmark ; says unmark, but the marker is different from * | |
1622 (setq ignore t))) | |
1623 (cond (ignore) | |
1624 (unmark (ediff-set-session-status info nil)) | |
1625 (t (ediff-set-session-status info ?*)))) | |
1626 unmark) | |
1627 | |
1628 | |
13130 | 1629 (defun ediff-hide-marked-sessions (unhide) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1630 "Hide marked sessions. With prefix arg, unhide." |
13130 | 1631 (interactive "P") |
1632 (let ((grp-buf (ediff-get-group-buffer ediff-meta-list)) | |
1633 (meta-list (cdr ediff-meta-list)) | |
1634 (from (if unhide ?I ?H)) | |
1635 (to (if unhide ?H ?I)) | |
1636 (numMarked 0) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1637 active-sessions-exist session-buf elt) |
13130 | 1638 (while meta-list |
1639 (setq elt (car meta-list) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1640 meta-list (cdr meta-list) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1641 session-buf (ediff-get-session-buffer elt)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1642 |
13130 | 1643 (if (eq (ediff-get-session-status elt) from) |
1644 (progn | |
1645 (setq numMarked (1+ numMarked)) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1646 (if (and (eq to ?I) (buffer-live-p session-buf)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1647 ;; shouldn't hide active sessions |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1648 (setq active-sessions-exist t) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1649 (ediff-set-session-status elt to))))) |
13130 | 1650 (if (> numMarked 0) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1651 (ediff-update-meta-buffer grp-buf 'must-redraw) |
13130 | 1652 (beep) |
1653 (if unhide | |
1654 (message "Nothing to reveal...") | |
1655 (message "Nothing to hide..."))) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1656 (if active-sessions-exist |
20206 | 1657 (message "Note: Ediff didn't hide active sessions!")) |
13130 | 1658 )) |
1659 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1660 ;; Apply OPERATION to marked sessions. Operation expects one argument of type |
13130 | 1661 ;; meta-list member (not the first one), i.e., a regular session description. |
1662 ;; Returns number of marked sessions on which operation was performed | |
1663 (defun ediff-operate-on-marked-sessions (operation) | |
1664 (let ((grp-buf (ediff-get-group-buffer ediff-meta-list)) | |
1665 (meta-list (cdr ediff-meta-list)) | |
1666 (marksym ?*) | |
1667 (numMarked 0) | |
1668 (sessionNum 0) | |
19774 | 1669 (diff-buffer ediff-meta-diff-buffer) |
1670 session-buf elt) | |
13130 | 1671 (while meta-list |
1672 (setq elt (car meta-list) | |
1673 meta-list (cdr meta-list) | |
1674 sessionNum (1+ sessionNum)) | |
19774 | 1675 (cond ((eq (ediff-get-session-status elt) marksym) |
1676 (save-excursion | |
1677 (setq numMarked (1+ numMarked)) | |
1678 (funcall operation elt sessionNum))) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1679 ;; The following goes into a session represented by a subdirectory |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1680 ;; and applies operation to marked sessions there |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1681 ((and (ediff-meta-session-p elt) |
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1682 (ediff-buffer-live-p |
19774 | 1683 (setq session-buf (ediff-get-session-buffer elt)))) |
1684 (setq numMarked | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1685 (+ numMarked |
19774 | 1686 (ediff-with-current-buffer session-buf |
1687 ;; pass meta-diff along | |
1688 (setq ediff-meta-diff-buffer diff-buffer) | |
1689 ;; collect diffs in child group | |
1690 (ediff-operate-on-marked-sessions operation))))))) | |
20206 | 1691 (ediff-update-meta-buffer grp-buf 'must-redraw) ; just in case |
13130 | 1692 numMarked |
1693 )) | |
1694 | |
1695 (defun ediff-append-custom-diff (session sessionNum) | |
1696 (or (ediff-collect-diffs-metajob) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1697 (error "Can't compute multifile patch in this context")) |
13130 | 1698 (let ((session-buf (ediff-get-session-buffer session)) |
1699 (meta-diff-buff ediff-meta-diff-buffer) | |
1700 (metajob ediff-metajob-name) | |
1701 tmp-buf custom-diff-buf) | |
1702 (if (ediff-buffer-live-p session-buf) | |
19047 | 1703 (ediff-with-current-buffer session-buf |
13130 | 1704 (if (eq ediff-control-buffer session-buf) ; individual session |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1705 (progn |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1706 (ediff-compute-custom-diffs-maybe) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1707 (setq custom-diff-buf ediff-custom-diff-buffer))))) |
13130 | 1708 |
1709 (or (ediff-buffer-live-p meta-diff-buff) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1710 (error "Ediff: something wrong--killed multiple diff's buffer")) |
13130 | 1711 |
1712 (cond ((ediff-buffer-live-p custom-diff-buf) | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1713 ;; for live session buffers we do them first because the user may |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1714 ;; have changed them with respect to the underlying files |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101721
diff
changeset
|
1715 (with-current-buffer meta-diff-buff |
13130 | 1716 (goto-char (point-max)) |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65689
diff
changeset
|
1717 (insert-buffer-substring custom-diff-buf) |
13130 | 1718 (insert "\n"))) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1719 ;; if ediff session is not live, run diff directly on the files |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1720 ((memq metajob '(ediff-directories |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1721 ediff-merge-directories |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1722 ediff-merge-directories-with-ancestor)) |
13130 | 1723 ;; get diffs by calling shell command on ediff-custom-diff-program |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101721
diff
changeset
|
1724 (with-current-buffer |
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101721
diff
changeset
|
1725 (setq tmp-buf (get-buffer-create ediff-tmp-buffer)) |
13130 | 1726 (erase-buffer) |
1727 (shell-command | |
73486
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1728 (format |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1729 "%s %s %s %s" |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1730 (shell-quote-argument ediff-custom-diff-program) |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1731 ediff-custom-diff-options |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1732 (shell-quote-argument (ediff-get-session-objA-name session)) |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1733 (shell-quote-argument (ediff-get-session-objB-name session)) |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1734 ) |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1735 t) |
db25befb2938
2006-10-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
72516
diff
changeset
|
1736 ) |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101721
diff
changeset
|
1737 (with-current-buffer meta-diff-buff |
13130 | 1738 (goto-char (point-max)) |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65689
diff
changeset
|
1739 (insert-buffer-substring tmp-buf) |
13130 | 1740 (insert "\n"))) |
1741 (t | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42602
diff
changeset
|
1742 (ediff-kill-buffer-carefully meta-diff-buff) |
106697
ac408704629c
lisp/*: Fix typos in docstrings and messages.
Juanma Barranquero <lekktu@gmail.com>
parents:
106471
diff
changeset
|
1743 (error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1744 )) |
13130 | 1745 |
1746 (defun ediff-collect-custom-diffs () | |
1747 "Collect custom diffs of marked sessions in buffer `*Ediff Multifile Diffs*'. | |
1748 This operation is defined only for `ediff-directories' and | |
1749 `ediff-directory-revisions', since its intent is to produce | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1750 multifile patches. For `ediff-directory-revisions', we insist that |
13130 | 1751 all marked sessions must be active." |
1752 (interactive) | |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1753 (let ((coding-system-for-read ediff-coding-system-for-read)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1754 (or (ediff-buffer-live-p ediff-meta-diff-buffer) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1755 (setq ediff-meta-diff-buffer |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1756 (get-buffer-create |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1757 (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*")))) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1758 (ediff-with-current-buffer ediff-meta-diff-buffer |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1759 (setq buffer-read-only nil) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1760 (erase-buffer)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1761 (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1762 ;; did something |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1763 (progn |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1764 (display-buffer ediff-meta-diff-buffer 'not-this-window) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1765 (ediff-with-current-buffer ediff-meta-diff-buffer |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1766 (set-buffer-modified-p nil) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1767 (setq buffer-read-only t)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1768 (if (fboundp 'diff-mode) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1769 (with-current-buffer ediff-meta-diff-buffer |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1770 (diff-mode)))) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1771 (beep) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68997
diff
changeset
|
1772 (message "No marked sessions found")))) |
13130 | 1773 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1774 (defun ediff-meta-show-patch () |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1775 "Show the multi-file patch associated with this group session." |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1776 (interactive) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1777 (let* ((pos (ediff-event-point last-command-event)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1778 (meta-buf (ediff-event-buffer last-command-event)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1779 (info (ediff-get-meta-info meta-buf pos 'noerror)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1780 (patchbuffer ediff-meta-patchbufer)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1781 (if (ediff-buffer-live-p patchbuffer) |
19047 | 1782 (ediff-with-current-buffer patchbuffer |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1783 (save-restriction |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1784 (if (not info) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1785 (widen) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1786 (narrow-to-region |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1787 (ediff-get-session-objB-name info) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1788 (ediff-get-session-objC-name info))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1789 (set-buffer (get-buffer-create ediff-tmp-buffer)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1790 (erase-buffer) |
65856
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65689
diff
changeset
|
1791 (insert-buffer-substring patchbuffer) |
d64aeb0dc54e
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
65689
diff
changeset
|
1792 (goto-char (point-min)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1793 (display-buffer ediff-tmp-buffer 'not-this-window) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1794 )) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1795 (error "The patch buffer wasn't found")))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1796 |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1797 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1798 ;; This function executes in meta buffer. It knows where event happened. |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1799 (defun ediff-filegroup-action () |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42288
diff
changeset
|
1800 "Execute appropriate action for a selected session." |
13130 | 1801 (interactive) |
1802 (let* ((pos (ediff-event-point last-command-event)) | |
1803 (meta-buf (ediff-event-buffer last-command-event)) | |
1804 ;; ediff-get-meta-info gives error if meta-buf or pos are invalid | |
1805 (info (ediff-get-meta-info meta-buf pos)) | |
20206 | 1806 (session-buf (ediff-get-session-buffer info)) |
20343 | 1807 (session-number (ediff-get-session-number-at-pos pos meta-buf)) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1808 (default-regexp (eval ediff-default-filtering-regexp)) |
20206 | 1809 merge-autostore-dir file1 file2 file3 regexp) |
13130 | 1810 |
20206 | 1811 (setq file1 (ediff-get-session-objA-name info) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1812 file2 (ediff-get-session-objB-name info) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1813 file3 (ediff-get-session-objC-name info)) |
13130 | 1814 |
1815 ;; make sure we don't start on hidden sessions | |
1816 ;; ?H means marked for hiding. ?I means invalid (hidden). | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1817 (if (memq (ediff-get-session-status info) '(?I)) |
13130 | 1818 (progn |
1819 (beep) | |
1820 (if (y-or-n-p "This session is marked as hidden, unmark? ") | |
1821 (progn | |
1822 (ediff-set-session-status info nil) | |
20206 | 1823 (ediff-update-meta-buffer meta-buf nil session-number)) |
13130 | 1824 (error "Aborted")))) |
1825 | |
19047 | 1826 (ediff-with-current-buffer meta-buf |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1827 (setq merge-autostore-dir |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1828 (ediff-get-group-merge-autostore-dir ediff-meta-list)) |
13130 | 1829 (goto-char pos) ; if the user clicked on session--move point there |
1830 ;; First handle sessions involving directories (which are themselves | |
1831 ;; session groups) | |
1832 ;; After that handle individual sessions | |
19774 | 1833 (cond ((ediff-meta-session-p info) |
13130 | 1834 ;; do ediff/ediff-merge on subdirectories |
1835 (if (ediff-buffer-live-p session-buf) | |
1836 (ediff-show-meta-buffer session-buf) | |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1837 (setq regexp |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1838 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1839 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1840 (format |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1841 "Filter through regular expression (default %s): " |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1842 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1843 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1844 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1845 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
1846 (eval ediff-default-filtering-regexp))) |
13130 | 1847 (ediff-directories-internal |
1848 file1 file2 file3 regexp | |
1849 ediff-session-action-function | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1850 ediff-metajob-name |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1851 ;; make it update (car info) after startup |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1852 `(list (lambda () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1853 ;; child session group should know its parent |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1854 (setq ediff-parent-meta-buffer |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1855 (quote ,ediff-meta-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1856 ediff-meta-session-number |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1857 ,session-number) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1858 ;; and parent will know its child |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1859 (setcar (quote ,info) ediff-meta-buffer)))))) |
13130 | 1860 |
1861 ;; Do ediff-revision on a subdirectory | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1862 ((and (ediff-one-filegroup-metajob) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1863 (ediff-revision-metajob) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1864 (file-directory-p file1)) |
13130 | 1865 (if (ediff-buffer-live-p session-buf) |
1866 (ediff-show-meta-buffer session-buf) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1867 (setq regexp (read-string "Filter through regular expression: " |
13130 | 1868 nil 'ediff-filtering-regexp-history)) |
1869 (ediff-directory-revisions-internal | |
1870 file1 regexp | |
1871 ediff-session-action-function ediff-metajob-name | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1872 ;; make it update (car info) after startup |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1873 `(list (lambda () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1874 ;; child session group should know its parent and |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1875 ;; its number |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1876 (setq ediff-parent-meta-buffer |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1877 (quote ,ediff-meta-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1878 ediff-meta-session-number |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1879 ,session-number) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1880 ;; and parent will know its child |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1881 (setcar (quote ,info) ediff-meta-buffer)))))) |
13130 | 1882 |
1883 ;; From here on---only individual session handlers | |
1884 | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1885 ;; handle an individual session with a live control buffer |
13130 | 1886 ((ediff-buffer-live-p session-buf) |
19047 | 1887 (ediff-with-current-buffer session-buf |
13130 | 1888 (setq ediff-mouse-pixel-position (mouse-pixel-position)) |
1889 (ediff-recenter 'no-rehighlight))) | |
1890 | |
1891 ((ediff-problematic-session-p info) | |
1892 (beep) | |
1893 (if (y-or-n-p | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1894 "This session has no ancestor. Merge without the ancestor? ") |
13130 | 1895 (ediff-merge-files |
1896 file1 file2 | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1897 ;; provide startup hooks |
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1898 `(list (lambda () |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1899 (add-hook |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1900 'ediff-after-quit-hook-internal |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1901 (lambda () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1902 (if (ediff-buffer-live-p ,(current-buffer)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1903 (ediff-show-meta-buffer |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1904 ,(current-buffer) ,session-number))) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1905 nil 'local) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1906 (setq ediff-meta-buffer ,(current-buffer) |
20206 | 1907 ediff-meta-session-number |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1908 ,session-number) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1909 (setq ediff-merge-store-file |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1910 ,(if (ediff-nonempty-string-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1911 merge-autostore-dir) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1912 (concat |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1913 merge-autostore-dir |
29165
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1914 ediff-merge-filename-prefix |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1915 (file-name-nondirectory file1)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
1916 )) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1917 ;; make ediff-startup pass |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1918 ;; ediff-control-buffer back to the meta |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1919 ;; level; see below |
13130 | 1920 (setcar |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1921 (quote ,info) ediff-control-buffer)))) |
13130 | 1922 (error "Aborted"))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1923 ((ediff-one-filegroup-metajob) ; needs 1 file arg |
13130 | 1924 (funcall ediff-session-action-function |
1925 file1 | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1926 ;; provide startup hooks |
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1927 `(list (lambda () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1928 (add-hook |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1929 'ediff-after-quit-hook-internal |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1930 (lambda () |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1931 (if (ediff-buffer-live-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1932 ,(current-buffer)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1933 (ediff-show-meta-buffer |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1934 ,(current-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1935 ,session-number))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1936 nil 'local) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1937 (setq ediff-meta-buffer ,(current-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1938 ediff-meta-session-number |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1939 ,session-number) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1940 (setq ediff-merge-store-file |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1941 ,(if (ediff-nonempty-string-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1942 merge-autostore-dir) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1943 (concat |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1944 merge-autostore-dir |
29165
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1945 ediff-merge-filename-prefix |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1946 (file-name-nondirectory file1))) ) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1947 ;; make ediff-startup pass |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1948 ;; ediff-control-buffer back to the meta |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1949 ;; level; see below |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1950 (setcar |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1951 (quote ,info) ediff-control-buffer))))) |
13130 | 1952 ((not (ediff-metajob3)) ; need 2 file args |
1953 (funcall ediff-session-action-function | |
1954 file1 file2 | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1955 ;; provide startup hooks |
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1956 `(list (lambda () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1957 (add-hook |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1958 'ediff-after-quit-hook-internal |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1959 (lambda () |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1960 (if (ediff-buffer-live-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1961 ,(current-buffer)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1962 (ediff-show-meta-buffer |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1963 ,(current-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1964 ,session-number))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1965 nil 'local) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1966 (setq ediff-meta-buffer ,(current-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1967 ediff-meta-session-number |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1968 ,session-number) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1969 (setq ediff-merge-store-file |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1970 ,(if (ediff-nonempty-string-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1971 merge-autostore-dir) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1972 (concat |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1973 merge-autostore-dir |
29165
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1974 ediff-merge-filename-prefix |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1975 (file-name-nondirectory file1))) ) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1976 ;; make ediff-startup pass |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1977 ;; ediff-control-buffer back to the meta |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1978 ;; level; see below |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1979 (setcar |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1980 (quote ,info) ediff-control-buffer))))) |
13130 | 1981 ((ediff-metajob3) ; need 3 file args |
1982 (funcall ediff-session-action-function | |
1983 file1 file2 file3 | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1984 ;; arrange startup hooks |
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
1985 `(list (lambda () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1986 (add-hook |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1987 'ediff-after-quit-hook-internal |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1988 (lambda () |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1989 (if (ediff-buffer-live-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1990 ,(current-buffer)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1991 (ediff-show-meta-buffer |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1992 ,(current-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1993 ,session-number))) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1994 nil 'local) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1995 (setq ediff-merge-store-file |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1996 ,(if (ediff-nonempty-string-p |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1997 merge-autostore-dir) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1998 (concat |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1999 merge-autostore-dir |
29165
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
2000 ediff-merge-filename-prefix |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2001 (file-name-nondirectory file1))) ) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2002 (setq ediff-meta-buffer , (current-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2003 ediff-meta-session-number |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2004 ,session-number) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2005 ;; this arranges that ediff-startup will pass |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2006 ;; the value of ediff-control-buffer back to |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2007 ;; the meta level, to the record in the meta |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2008 ;; list containing the information about the |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2009 ;; session associated with that |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2010 ;; ediff-control-buffer |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2011 (setcar |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
2012 (quote ,info) ediff-control-buffer))))) |
13130 | 2013 ) ; cond |
2014 ) ; eval in meta-buf | |
2015 )) | |
2016 | |
2017 (defun ediff-registry-action () | |
2018 "Switch to a selected session." | |
2019 (interactive) | |
2020 (let* ((pos (ediff-event-point last-command-event)) | |
2021 (buf (ediff-event-buffer last-command-event)) | |
2022 (ctl-buf (ediff-get-meta-info buf pos))) | |
2023 | |
2024 (if (ediff-buffer-live-p ctl-buf) | |
2025 ;; check if this is ediff-control-buffer or ediff-meta-buffer | |
19047 | 2026 (if (ediff-with-current-buffer ctl-buf |
13130 | 2027 (eq (key-binding "q") 'ediff-quit-meta-buffer)) |
2028 ;; it's a meta-buffer -- last action should just display it | |
20206 | 2029 (ediff-show-meta-buffer ctl-buf t) |
13130 | 2030 ;; it's a session buffer -- invoke go back to session |
19047 | 2031 (ediff-with-current-buffer ctl-buf |
13130 | 2032 (setq ediff-mouse-pixel-position (mouse-pixel-position)) |
2033 (ediff-recenter 'no-rehighlight))) | |
2034 (beep) | |
2035 (message "You've selected a stale session --- try again") | |
2036 (ediff-update-registry)) | |
19047 | 2037 (ediff-with-current-buffer buf |
13130 | 2038 (goto-char pos)) |
2039 )) | |
2040 | |
2041 | |
20206 | 2042 ;; If session number is t, means don't update meta buffer |
2043 (defun ediff-show-meta-buffer (&optional meta-buf session-number) | |
13130 | 2044 "Show the session group buffer." |
2045 (interactive) | |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29165
diff
changeset
|
2046 (run-hooks 'ediff-before-directory-setup-hooks) |
13130 | 2047 (let (wind frame silent) |
2048 (if meta-buf (setq silent t)) | |
2049 | |
2050 (setq meta-buf (or meta-buf ediff-meta-buffer)) | |
2051 (cond ((not (bufferp meta-buf)) | |
2052 (error "This Ediff session is not part of a session group")) | |
2053 ((not (ediff-buffer-live-p meta-buf)) | |
2054 (error | |
2055 "Can't find this session's group panel -- session itself is ok"))) | |
2056 | |
20206 | 2057 (cond ((numberp session-number) |
2058 (ediff-update-meta-buffer meta-buf nil session-number)) | |
2059 ;; if session-number is t, don't update | |
2060 (session-number) | |
2061 (t (ediff-cleanup-meta-buffer meta-buf))) | |
2062 | |
19047 | 2063 (ediff-with-current-buffer meta-buf |
13130 | 2064 (save-excursion |
2065 (cond ((setq wind (ediff-get-visible-buffer-window meta-buf)) | |
2066 (or silent | |
2067 (message | |
2068 "Already showing the group panel for this session")) | |
2069 (set-window-buffer wind meta-buf) | |
2070 (select-window wind)) | |
2071 ((window-live-p (setq wind ediff-window-C)) ;in merge--merge buf | |
2072 (set-window-buffer ediff-window-C meta-buf) | |
2073 (select-window wind)) | |
2074 ((window-live-p (setq wind ediff-window-A)) | |
2075 (set-window-buffer ediff-window-A meta-buf) | |
2076 (select-window wind)) | |
2077 ((window-live-p (setq wind ediff-window-B)) | |
2078 (set-window-buffer ediff-window-B meta-buf) | |
2079 (select-window wind)) | |
2080 ((and | |
2081 (setq wind | |
2082 (ediff-get-visible-buffer-window ediff-registry-buffer)) | |
2083 (ediff-window-display-p)) | |
2084 (select-window wind) | |
2085 (other-window 1) | |
2086 (set-window-buffer (selected-window) meta-buf)) | |
2087 (t (ediff-skip-unsuitable-frames 'ok-unsplittable) | |
2088 (set-window-buffer (selected-window) meta-buf))) | |
2089 )) | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
2090 (if (and (ediff-window-display-p) |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
2091 (window-live-p |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
2092 (setq wind (ediff-get-visible-buffer-window meta-buf)))) |
13130 | 2093 (progn |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
2094 (setq frame (window-frame wind)) |
13130 | 2095 (raise-frame frame) |
2096 (ediff-reset-mouse frame))) | |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42288
diff
changeset
|
2097 (sit-for 0) ; sometimes needed to synch the display and ensure that the |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42288
diff
changeset
|
2098 ; point ends up after the just completed session |
13130 | 2099 (run-hooks 'ediff-show-session-group-hook) |
2100 )) | |
2101 | |
20206 | 2102 (defun ediff-show-current-session-meta-buffer () |
2103 (interactive) | |
2104 (ediff-show-meta-buffer nil ediff-meta-session-number)) | |
2105 | |
13130 | 2106 (defun ediff-show-meta-buff-from-registry () |
2107 "Display the session group buffer for a selected session group." | |
2108 (interactive) | |
2109 (let* ((pos (ediff-event-point last-command-event)) | |
2110 (meta-buf (ediff-event-buffer last-command-event)) | |
2111 (info (ediff-get-meta-info meta-buf pos)) | |
2112 (meta-or-session-buf info)) | |
19047 | 2113 (ediff-with-current-buffer meta-or-session-buf |
20206 | 2114 (ediff-show-meta-buffer nil t)))) |
13130 | 2115 |
2116 ;;;###autoload | |
2117 (defun ediff-show-registry () | |
2118 "Display Ediff's registry." | |
2119 (interactive) | |
2120 (ediff-update-registry) | |
2121 (if (not (ediff-buffer-live-p ediff-registry-buffer)) | |
2122 (error "No active Ediff sessions or corrupted session registry")) | |
2123 (let (wind frame) | |
2124 ;; for some reason, point moves in ediff-registry-buffer, so we preserve it | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
2125 ;; explicitly |
19047 | 2126 (ediff-with-current-buffer ediff-registry-buffer |
13130 | 2127 (save-excursion |
2128 (cond ((setq wind | |
2129 (ediff-get-visible-buffer-window ediff-registry-buffer)) | |
2130 (message "Already showing the registry") | |
2131 (set-window-buffer wind ediff-registry-buffer) | |
2132 (select-window wind)) | |
2133 ((window-live-p ediff-window-C) | |
2134 (set-window-buffer ediff-window-C ediff-registry-buffer) | |
2135 (select-window ediff-window-C)) | |
2136 ((window-live-p ediff-window-A) | |
2137 (set-window-buffer ediff-window-A ediff-registry-buffer) | |
2138 (select-window ediff-window-A)) | |
2139 ((window-live-p ediff-window-B) | |
2140 (set-window-buffer ediff-window-B ediff-registry-buffer) | |
2141 (select-window ediff-window-B)) | |
2142 ((and (setq wind | |
2143 (ediff-get-visible-buffer-window ediff-meta-buffer)) | |
2144 (ediff-window-display-p)) | |
2145 (select-window wind) | |
2146 (other-window 1) | |
2147 (set-window-buffer (selected-window) ediff-registry-buffer)) | |
2148 (t (ediff-skip-unsuitable-frames 'ok-unsplittable) | |
2149 (set-window-buffer (selected-window) ediff-registry-buffer))) | |
2150 )) | |
2151 (if (ediff-window-display-p) | |
2152 (progn | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
2153 (setq frame |
13130 | 2154 (window-frame |
2155 (ediff-get-visible-buffer-window ediff-registry-buffer))) | |
2156 (raise-frame frame) | |
2157 (ediff-reset-mouse frame))) | |
2158 (run-hooks 'ediff-show-registry-hook) | |
2159 )) | |
2160 | |
2161 ;;;###autoload | |
2162 (defalias 'eregistry 'ediff-show-registry) | |
2163 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2164 ;; If meta-buf doesn't exist, it is created. In that case, id doesn't have a |
13130 | 2165 ;; parent meta-buf |
2166 ;; Check if META-BUF exists before calling this function | |
20206 | 2167 ;; Optional MUST-REDRAW, if non-nil, would force redrawal of the whole meta |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2168 ;; buffer. Otherwise, it will just go over the buffer and update activity marks |
20206 | 2169 ;; and session status. |
2170 ;; SESSION-NUMBER, if specified, says which session caused the update. | |
2171 (defun ediff-update-meta-buffer (meta-buf &optional must-redraw session-number) | |
2172 (if (ediff-buffer-live-p meta-buf) | |
2173 (ediff-with-current-buffer meta-buf | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2174 (let (overl) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2175 (cond (must-redraw ; completely redraw the meta buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2176 (funcall ediff-meta-redraw-function ediff-meta-list)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2177 ((numberp session-number) ; redraw only for the given session |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2178 (ediff-update-session-marker-in-dir-meta-buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2179 session-number)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2180 (t ; update what changed only, but scan the entire meta buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2181 (ediff-update-markers-in-dir-meta-buffer ediff-meta-list))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2182 (setq overl (ediff-get-meta-overlay-at-pos (point))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2183 ;; skip the invisible sessions |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2184 (while (and overl (ediff-overlay-get overl 'invisible)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2185 (ediff-next-meta-item1) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2186 (setq overl (ediff-get-meta-overlay-at-pos (point)))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2187 )))) |
13130 | 2188 |
2189 (defun ediff-update-registry () | |
19047 | 2190 (ediff-with-current-buffer (current-buffer) |
13130 | 2191 (if (ediff-buffer-live-p ediff-registry-buffer) |
2192 (ediff-redraw-registry-buffer) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
2193 (ediff-prepare-meta-buffer |
13130 | 2194 'ediff-registry-action |
2195 ediff-session-registry | |
2196 "*Ediff Registry" | |
2197 'ediff-redraw-registry-buffer | |
2198 'ediff-registry)) | |
2199 )) | |
2200 | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
2201 ;; If meta-buf exists, it is redrawn along with parent. |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
2202 ;; Otherwise, nothing happens. |
13130 | 2203 (defun ediff-cleanup-meta-buffer (meta-buffer) |
2204 (if (ediff-buffer-live-p meta-buffer) | |
19047 | 2205 (ediff-with-current-buffer meta-buffer |
13130 | 2206 (ediff-update-meta-buffer meta-buffer) |
2207 (if (ediff-buffer-live-p ediff-parent-meta-buffer) | |
20206 | 2208 (ediff-update-meta-buffer |
2209 ediff-parent-meta-buffer nil ediff-meta-session-number))))) | |
13130 | 2210 |
20206 | 2211 ;; t if no session is in progress |
13130 | 2212 (defun ediff-safe-to-quit (meta-buffer) |
2213 (if (ediff-buffer-live-p meta-buffer) | |
2214 (let ((lis ediff-meta-list) | |
2215 (cont t) | |
2216 buffer-read-only) | |
20206 | 2217 ;;(ediff-update-meta-buffer meta-buffer) |
19047 | 2218 (ediff-with-current-buffer meta-buffer |
13130 | 2219 (setq lis (cdr lis)) ; discard the description part of meta-list |
2220 (while (and cont lis) | |
2221 (if (ediff-buffer-live-p | |
2222 (ediff-get-group-buffer lis)) ; in progress | |
2223 (setq cont nil)) | |
2224 (setq lis (cdr lis))) | |
2225 cont)))) | |
2226 | |
2227 (defun ediff-quit-meta-buffer () | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
2228 "If the group has no active session, delete the meta buffer. |
13130 | 2229 If no session is in progress, ask to confirm before deleting meta buffer. |
2230 Otherwise, bury the meta buffer. | |
2231 If this is a session registry buffer then just bury it." | |
2232 (interactive) | |
2233 (let* ((buf (current-buffer)) | |
2234 (dir-diffs-buffer ediff-dir-diffs-buffer) | |
2235 (meta-diff-buffer ediff-meta-diff-buffer) | |
20206 | 2236 (session-number ediff-meta-session-number) |
13130 | 2237 (parent-buf ediff-parent-meta-buffer) |
2238 (dont-show-registry (eq buf ediff-registry-buffer))) | |
2239 (if dont-show-registry | |
2240 (bury-buffer) | |
20206 | 2241 ;;(ediff-cleanup-meta-buffer buf) |
13130 | 2242 (cond ((and (ediff-safe-to-quit buf) |
2243 (y-or-n-p "Quit this session group? ")) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
2244 (run-hooks 'ediff-quit-session-group-hook) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2245 (message "") |
13130 | 2246 (ediff-dispose-of-meta-buffer buf)) |
2247 ((ediff-safe-to-quit buf) | |
2248 (bury-buffer)) | |
2249 (t | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2250 (error |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2251 "This session group has active sessions---cannot exit"))) |
20206 | 2252 (ediff-update-meta-buffer parent-buf nil session-number) |
13130 | 2253 (ediff-kill-buffer-carefully dir-diffs-buffer) |
2254 (ediff-kill-buffer-carefully meta-diff-buffer) | |
2255 (if (ediff-buffer-live-p parent-buf) | |
2256 (progn | |
2257 (setq dont-show-registry t) | |
20206 | 2258 (ediff-show-meta-buffer parent-buf session-number))) |
13130 | 2259 ) |
2260 (or dont-show-registry | |
2261 (ediff-show-registry)))) | |
2262 | |
2263 (defun ediff-dispose-of-meta-buffer (buf) | |
2264 (setq ediff-session-registry (delq buf ediff-session-registry)) | |
19047 | 2265 (ediff-with-current-buffer buf |
13130 | 2266 (if (ediff-buffer-live-p ediff-dir-diffs-buffer) |
2267 (kill-buffer ediff-dir-diffs-buffer))) | |
2268 (kill-buffer buf)) | |
47939
5f47d61ffbdc
Fix typo in comment.
Juanma Barranquero <lekktu@gmail.com>
parents:
44028
diff
changeset
|
2269 |
13130 | 2270 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
2271 ;; Obtain information on a meta record where the user clicked or typed |
13130 | 2272 ;; BUF is the buffer where this happened and POINT is the position |
2273 ;; If optional NOERROR arg is given, don't report error and return nil if no | |
2274 ;; meta info is found on line. | |
2275 (defun ediff-get-meta-info (buf point &optional noerror) | |
2276 (let (result olist tmp) | |
2277 (if (and point (ediff-buffer-live-p buf)) | |
19047 | 2278 (ediff-with-current-buffer buf |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2279 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2280 (setq result |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2281 (if (setq tmp (extent-at point buf 'ediff-meta-info)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2282 (ediff-overlay-get tmp 'ediff-meta-info))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2283 (setq olist |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2284 (mapcar (lambda (elt) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2285 (unless (overlay-get elt 'invisible) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2286 (overlay-get elt 'ediff-meta-info))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2287 (overlays-at point))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2288 (while (and olist (null (car olist))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2289 (setq olist (cdr olist))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2290 (setq result (car olist))))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2291 (or result |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2292 (unless noerror |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2293 (ediff-update-registry) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2294 (error "No session info in this line"))))) |
13130 | 2295 |
20206 | 2296 |
2297 (defun ediff-get-meta-overlay-at-pos (point) | |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2298 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2299 (extent-at point (current-buffer) 'ediff-meta-info) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2300 (let* ((overl-list (overlays-at point)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2301 (overl (car overl-list))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2302 (while (and overl (null (overlay-get overl 'ediff-meta-info))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2303 (setq overl-list (cdr overl-list) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2304 overl (car overl-list))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2305 overl))) |
20206 | 2306 |
93652
6523ed37006c
2008-04-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
92502
diff
changeset
|
2307 (defun ediff-get-session-number-at-pos (point &optional meta-buffer) |
20343 | 2308 (setq meta-buffer (if (ediff-buffer-live-p meta-buffer) |
2309 meta-buffer | |
2310 (current-buffer))) | |
2311 (ediff-with-current-buffer meta-buffer | |
2312 (ediff-overlay-get | |
2313 (ediff-get-meta-overlay-at-pos point) 'ediff-meta-session-number))) | |
20206 | 2314 |
2315 | |
2316 ;; Return location of the next meta overlay after point | |
13130 | 2317 (defun ediff-next-meta-overlay-start (point) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2318 (if (eobp) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2319 (goto-char (point-min)) |
20206 | 2320 (let ((overl (ediff-get-meta-overlay-at-pos point))) |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2321 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2322 (progn ; xemacs |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2323 (if overl |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2324 (setq overl (next-extent overl)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2325 (setq overl (next-extent (current-buffer)))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2326 (if overl |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2327 (extent-start-position overl) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2328 (point-max))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2329 ;; emacs |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2330 (if overl |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2331 ;; note: end of current overlay is the beginning of the next one |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2332 (overlay-end overl) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2333 (next-overlay-change point)))))) |
13130 | 2334 |
20206 | 2335 |
13130 | 2336 (defun ediff-previous-meta-overlay-start (point) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2337 (if (bobp) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2338 (goto-char (point-max)) |
20206 | 2339 (let ((overl (ediff-get-meta-overlay-at-pos point))) |
92502
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2340 (if (featurep 'xemacs) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2341 (progn |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2342 (if overl |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2343 (setq overl (previous-extent overl)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2344 (setq overl (previous-extent (current-buffer)))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2345 (if overl |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2346 (extent-start-position overl) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2347 (point-min))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2348 (if overl (setq point (overlay-start overl))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2349 ;; to get to the beginning of prev overlay |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2350 (if (not (bobp)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2351 ;; trick to overcome an emacs bug--doesn't always find previous |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2352 ;; overlay change correctly |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2353 (setq point (1- point))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2354 (setq point (previous-overlay-change point)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2355 ;; If we are not over an overlay after subtracting 1, it means we are |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2356 ;; in the description area preceding session records. In this case, |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2357 ;; goto the top of the registry buffer. |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2358 (or (car (overlays-at point)) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2359 (setq point (point-min))) |
e0c237a822d5
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
2360 point)))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2361 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2362 ;; this is the action invoked when the user selects a patch from the meta |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2363 ;; buffer. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2364 (defun ediff-patch-file-form-meta (file &optional startup-hooks) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2365 (let* ((pos (ediff-event-point last-command-event)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2366 (meta-buf (ediff-event-buffer last-command-event)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2367 ;; ediff-get-meta-info gives error if meta-buf or pos are invalid |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2368 (info (ediff-get-meta-info meta-buf pos)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2369 (meta-patchbuf ediff-meta-patchbufer) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2370 session-buf beg-marker end-marker) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2371 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2372 (if (or (file-directory-p file) (string-match "/dev/null" file)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2373 (error "`%s' is not an ordinary file" (file-name-as-directory file))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2374 (setq session-buf (ediff-get-session-buffer info) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2375 beg-marker (ediff-get-session-objB-name info) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2376 end-marker (ediff-get-session-objC-name info)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2377 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2378 (or (ediff-buffer-live-p session-buf) ; either an active patch session |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2379 (null session-buf) ; or it is a virgin session |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2380 (error |
44028
182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
43714
diff
changeset
|
2381 "Patch has already been applied to this file -- can't repeat!")) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2382 |
19047 | 2383 (ediff-with-current-buffer meta-patchbuf |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2384 (save-restriction |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2385 (widen) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2386 (narrow-to-region beg-marker end-marker) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2387 (ediff-patch-file-internal meta-patchbuf file startup-hooks))))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2388 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2389 |
22286 | 2390 (defun ediff-unmark-all-for-operation () |
2391 "Unmark all sessions marked for operation." | |
2392 (interactive) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2393 (let ((list (cdr ediff-meta-list)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2394 elt) |
22286 | 2395 (while (setq elt (car list)) |
2396 (ediff-mark-session-for-operation elt 'unmark) | |
2397 (setq list (cdr list)))) | |
2398 (ediff-update-meta-buffer (current-buffer) 'must-redraw)) | |
2399 | |
2400 (defun ediff-unmark-all-for-hiding () | |
2401 "Unmark all sessions marked for hiding." | |
2402 (interactive) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2403 (let ((list (cdr ediff-meta-list)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2404 elt) |
22286 | 2405 (while (setq elt (car list)) |
2406 (ediff-mark-session-for-hiding elt 'unmark) | |
2407 (setq list (cdr list)))) | |
2408 (ediff-update-meta-buffer (current-buffer) 'must-redraw)) | |
2409 | |
2410 | |
42288
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2411 ;; ACTION is ?h, ?m, ?=: to mark for hiding, mark for operation, or simply |
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2412 ;; indicate which are equal files |
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2413 (defun ediff-meta-mark-equal-files (&optional action) |
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2414 "Run through the session list and mark identical files. |
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2415 This is used only for sessions that involve 2 or 3 files at the same time. |
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2416 ACTION is an optional argument that can be ?h, ?m, ?=, to mark for hiding, mark |
68489
6d1e5d8e3112
(ediff-meta-buffer-keymap-setup-hook, ediff-before-session-group-setup-hooks,
Juanma Barranquero <lekktu@gmail.com>
parents:
65856
diff
changeset
|
2417 for operation, or simply indicate which are equal files. If it is nil, then |
106192
a2ee981efbec
2009-11-22 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
105994
diff
changeset
|
2418 `(ediff-last-command-char)' is used to decide which action to take." |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2419 (interactive) |
42288
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2420 (if (null action) |
106192
a2ee981efbec
2009-11-22 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
105994
diff
changeset
|
2421 (setq action (ediff-last-command-char))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2422 (let ((list (cdr ediff-meta-list)) |
22286 | 2423 marked1 marked2 marked3 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2424 fileinfo1 fileinfo2 fileinfo3 elt) |
106697
ac408704629c
lisp/*: Fix typos in docstrings and messages.
Juanma Barranquero <lekktu@gmail.com>
parents:
106471
diff
changeset
|
2425 (message "Comparing files...") |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2426 (while (setq elt (car list)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2427 (setq fileinfo1 (ediff-get-session-objA elt) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2428 fileinfo2 (ediff-get-session-objB elt) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2429 fileinfo3 (ediff-get-session-objC elt)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2430 (ediff-set-file-eqstatus fileinfo1 nil) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2431 (ediff-set-file-eqstatus fileinfo2 nil) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2432 (ediff-set-file-eqstatus fileinfo3 nil) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2433 |
22286 | 2434 (setq marked1 t |
2435 marked2 t | |
2436 marked3 t) | |
2437 (or (ediff-mark-if-equal fileinfo1 fileinfo2) | |
2438 (setq marked1 nil)) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2439 (if (ediff-metajob3) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2440 (progn |
22286 | 2441 (or (ediff-mark-if-equal fileinfo1 fileinfo3) |
2442 (setq marked2 nil)) | |
2443 (or (ediff-mark-if-equal fileinfo2 fileinfo3) | |
2444 (setq marked3 nil)))) | |
2445 (if (and marked1 marked2 marked3) | |
42288
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2446 (cond ((eq action ?h) |
22286 | 2447 (ediff-mark-session-for-hiding elt 'mark)) |
42288
3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
39488
diff
changeset
|
2448 ((eq action ?m) |
22286 | 2449 (ediff-mark-session-for-operation elt 'mark)) |
2450 )) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22286
diff
changeset
|
2451 (setq list (cdr list))) |
106697
ac408704629c
lisp/*: Fix typos in docstrings and messages.
Juanma Barranquero <lekktu@gmail.com>
parents:
106471
diff
changeset
|
2452 (message "Comparing files... Done")) |
60151
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
2453 (setq ediff-recurse-to-subdirectories nil) |
20206 | 2454 (ediff-update-meta-buffer (current-buffer) 'must-redraw)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2455 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2456 ;; mark files 1 and 2 as equal, if they are. |
22286 | 2457 ;; returns t, if something was marked |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2458 (defun ediff-mark-if-equal (fileinfo1 fileinfo2) |
20206 | 2459 (let ((f1 (car fileinfo1)) |
2460 (f2 (car fileinfo2))) | |
60151
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
2461 (if (and (stringp f1) (stringp f2) (ediff-same-contents f1 f2)) |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
2462 (progn |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
2463 (ediff-set-file-eqstatus fileinfo1 t) |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
2464 (ediff-set-file-eqstatus fileinfo2 t) |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
56388
diff
changeset
|
2465 )) |
22286 | 2466 )) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
2467 |
13130 | 2468 |
2469 | |
101721
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101010
diff
changeset
|
2470 ;; Local Variables: |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101010
diff
changeset
|
2471 ;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101010
diff
changeset
|
2472 ;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101010
diff
changeset
|
2473 ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101010
diff
changeset
|
2474 ;; End: |
13130 | 2475 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93652
diff
changeset
|
2476 ;; arch-tag: c8a76898-f96f-4d9c-be9d-129134017188 |
13607
71a4a349d998
Renamed from ediff-meta.el. Changed provide.
Richard M. Stallman <rms@gnu.org>
parents:
13216
diff
changeset
|
2477 ;;; ediff-mult.el ends here |