Mercurial > emacs
annotate lisp/ediff.el @ 106615:bd7f2c3eba70
Typo.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Fri, 18 Dec 2009 00:52:39 +0000 |
parents | 9fe246ccb486 |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1 ;;; ediff.el --- a comprehensive visual interface to diff & patch |
14169 | 2 |
64762
41bb365f41c4
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64485
diff
changeset
|
3 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
100908 | 4 ;; 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
7267 | 5 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
6 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
7267 | 7 ;; Created: February 2, 1994 |
33390
d574be791ed3
* ediff.el (ediff-regions-internal, ediff-documentation):
Dave Love <fx@gnu.org>
parents:
33019
diff
changeset
|
8 ;; Keywords: comparing, merging, patching, tools, unix |
7267 | 9 |
94116
842d446b22d9
Cleanup the bug-report email addresses and make sure the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93975
diff
changeset
|
10 ;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this |
842d446b22d9
Cleanup the bug-report email addresses and make sure the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93975
diff
changeset
|
11 ;; file on 20/3/2008, and the maintainer agreed that when a bug is |
842d446b22d9
Cleanup the bug-report email addresses and make sure the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93975
diff
changeset
|
12 ;; filed in the Emacs bug reporting system against this file, a copy |
842d446b22d9
Cleanup the bug-report email addresses and make sure the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93975
diff
changeset
|
13 ;; of the bug report be sent to the maintainer's email address. |
842d446b22d9
Cleanup the bug-report email addresses and make sure the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93975
diff
changeset
|
14 |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
15 (defconst ediff-version "2.81.4" "The current version of Ediff") |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
16 (defconst ediff-date "December 7, 2009" "Date of last update") |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
17 |
8874
716969785d08
(ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents:
8524
diff
changeset
|
18 |
7267 | 19 ;; This file is part of GNU Emacs. |
20 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
21 ;; GNU Emacs is free software: you can redistribute it and/or modify |
7267 | 22 ;; 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
|
23 ;; 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
|
24 ;; (at your option) any later version. |
7267 | 25 |
26 ;; GNU Emacs is distributed in the hope that it will be useful, | |
27 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
28 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 ;; GNU General Public License for more details. | |
30 | |
31 ;; 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
|
32 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
7267 | 33 |
34 ;;; Commentary: | |
35 | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
36 ;; Never read that diff output again! |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
37 ;; Apply patch interactively! |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
38 ;; Merge with ease! |
7267 | 39 |
8303
33ef3e3234dd
(Emacs 19 menu setup): Move back to top level and do it only if purify-flag.
Richard M. Stallman <rms@gnu.org>
parents:
7709
diff
changeset
|
40 ;; This package provides a convenient way of simultaneous browsing through |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
41 ;; the differences between a pair (or a triple) of files or buffers. The |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
42 ;; files being compared, file-A, file-B, and file-C (if applicable) are |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
43 ;; shown in separate windows (side by side, one above the another, or in |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
44 ;; separate frames), and the differences are highlighted as you step |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
45 ;; through them. You can also copy difference regions from one buffer to |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
46 ;; another (and recover old differences if you change your mind). |
7267 | 47 |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
48 ;; Ediff also supports merging operations on files and buffers, including |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
49 ;; merging using ancestor versions. Both comparison and merging operations can |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
50 ;; be performed on directories, i.e., by pairwise comparison of files in those |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
51 ;; directories. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
52 |
7267 | 53 ;; In addition, Ediff can apply a patch to a file and then let you step |
8303
33ef3e3234dd
(Emacs 19 menu setup): Move back to top level and do it only if purify-flag.
Richard M. Stallman <rms@gnu.org>
parents:
7709
diff
changeset
|
54 ;; though both files, the patched and the original one, simultaneously, |
7267 | 55 ;; difference-by-difference. You can even apply a patch right out of a |
56 ;; mail buffer, i.e., patches received by mail don't even have to be saved. | |
57 ;; Since Ediff lets you copy differences between buffers, you can, in | |
58 ;; effect, apply patches selectively (i.e., you can copy a difference | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
59 ;; region from file_orig to file, thereby undoing any particular patch that |
7267 | 60 ;; you don't like). |
61 | |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
62 ;; Ediff is aware of version control, which lets the user compare |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
63 ;; files with their older versions. Ediff can also work with remote and |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
64 ;; compressed files. Details are given below. |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
65 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
66 ;; Finally, Ediff supports directory-level comparison, merging and patching. |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
67 ;; See the on-line manual for details. |
7267 | 68 |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
69 ;; This package builds upon the ideas borrowed from emerge.el and several |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
70 ;; Ediff's functions are adaptations from emerge.el. Much of the functionality |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
71 ;; Ediff provides is also influenced by emerge.el. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
72 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
73 ;; The present version of Ediff supersedes Emerge. It provides a superior user |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
74 ;; interface and has numerous major features not found in Emerge. In |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
75 ;; particular, it can do patching, and 2-way and 3-way file comparison, |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
76 ;; merging, and directory operations. |
7267 | 77 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
78 |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
79 |
7267 | 80 ;;; Bugs: |
81 | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
82 ;; 1. The undo command doesn't restore deleted regions well. That is, if |
7267 | 83 ;; you delete all characters in a difference region and then invoke |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
84 ;; `undo', the reinstated text will most likely be inserted outside of |
7424 | 85 ;; what Ediff thinks is the current difference region. (This problem |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
86 ;; doesn't seem to exist with XEmacs.) |
7424 | 87 ;; |
88 ;; If at any point you feel that difference regions are no longer correct, | |
89 ;; you can hit '!' to recompute the differences. | |
90 | |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
91 ;; 2. On a monochrome display, the repertoire of faces with which to |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
92 ;; highlight fine differences is limited. By default, Ediff is using |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
93 ;; underlining. However, if the region is already underlined by some other |
7424 | 94 ;; overlays, there is no simple way to temporarily remove that residual |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
95 ;; underlining. This problem occurs when a buffer is highlighted with |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
96 ;; hilit19.el or font-lock.el packages. If this residual highlighting gets |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
97 ;; in the way, you can do the following. Both font-lock.el and hilit19.el |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
98 ;; provide commands for unhighlighting buffers. You can either place these |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
99 ;; commands in `ediff-prepare-buffer-hook' (which will unhighlight every |
7424 | 100 ;; buffer used by Ediff) or you can execute them interactively, at any time |
101 ;; and on any buffer. | |
102 | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
103 |
7424 | 104 ;;; Acknowledgements: |
105 | |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
106 ;; Ediff was inspired by Dale R. Worley's <drw@math.mit.edu> emerge.el. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
107 ;; Ediff would not have been possible without the help and encouragement of |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
108 ;; its many users. See Ediff on-line Info for the full list of those who |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
109 ;; helped. Improved defaults in Ediff file-name reading commands. |
7424 | 110 |
7267 | 111 ;;; Code: |
112 | |
93652
6523ed37006c
2008-04-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87691
diff
changeset
|
113 (provide 'ediff) |
7424 | 114 |
18054 | 115 ;; Compiler pacifier |
87691
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
116 (eval-and-compile |
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
117 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) |
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
118 |
86474
daebf666bc9a
Load dired and ediff-*.el files silently.
Glenn Morris <rgm@gnu.org>
parents:
86440
diff
changeset
|
119 |
18054 | 120 (eval-when-compile |
93652
6523ed37006c
2008-04-04 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87691
diff
changeset
|
121 (require 'dired) |
94604
c0dfa9027738
Simplify compilation requirements.
Glenn Morris <rgm@gnu.org>
parents:
94116
diff
changeset
|
122 (require 'ediff-util) |
c0dfa9027738
Simplify compilation requirements.
Glenn Morris <rgm@gnu.org>
parents:
94116
diff
changeset
|
123 (require 'ediff-ptch)) |
18054 | 124 ;; end pacifier |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
125 |
18054 | 126 (require 'ediff-init) |
127 (require 'ediff-mult) ; required because of the registry stuff | |
128 | |
129 (defgroup ediff nil | |
64005
255e80725dac
(ediff): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents:
62963
diff
changeset
|
130 "A comprehensive visual interface to diff & patch." |
19462 | 131 :tag "Ediff" |
18054 | 132 :group 'tools) |
133 | |
134 | |
135 (defcustom ediff-use-last-dir nil | |
100171 | 136 "If t, Ediff will use previous directory as default when reading file name." |
18054 | 137 :type 'boolean |
138 :group 'ediff) | |
139 | |
18839 | 140 ;; Last directory used by an Ediff command for file-A. |
141 (defvar ediff-last-dir-A nil) | |
142 ;; Last directory used by an Ediff command for file-B. | |
143 (defvar ediff-last-dir-B nil) | |
144 ;; Last directory used by an Ediff command for file-C. | |
145 (defvar ediff-last-dir-C nil) | |
146 ;; Last directory used by an Ediff command for the ancestor file. | |
147 (defvar ediff-last-dir-ancestor nil) | |
148 ;; Last directory used by an Ediff command as the output directory for merge. | |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
149 (defvar ediff-last-merge-autostore-dir nil) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
150 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
151 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
152 ;; Used as a startup hook to set `_orig' patch file read-only. |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
153 (defun ediff-set-read-only-in-buf-A () |
19047 | 154 (ediff-with-current-buffer ediff-buffer-A |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
155 (toggle-read-only 1))) |
7267 | 156 |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
157 ;; Return a plausible default for ediff's first file: |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
158 ;; In dired, return the file number FILENO (or 0) in the list |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
159 ;; (all-selected-files, filename under the cursor), where directories are |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
160 ;; ignored. Otherwise, return DEFAULT file name, if non-nil. Else, |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
161 ;; if the buffer is visiting a file, return that file name. |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
162 (defun ediff-get-default-file-name (&optional default fileno) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
163 (cond ((eq major-mode 'dired-mode) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
164 (let ((current (dired-get-filename nil 'no-error)) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
165 (marked (condition-case nil |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
166 (dired-get-marked-files 'no-dir) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
167 (error nil))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
168 aux-list choices result) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
169 (or (integerp fileno) (setq fileno 0)) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
170 (if (stringp default) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
171 (setq aux-list (cons default aux-list))) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
172 (if (and (stringp current) (not (file-directory-p current))) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
173 (setq aux-list (cons current aux-list))) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
174 (setq choices (nconc marked aux-list)) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
175 (setq result (elt choices fileno)) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
176 (or result |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
177 default))) |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
178 ((stringp default) default) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
179 ((buffer-file-name (current-buffer)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
180 (file-name-nondirectory (buffer-file-name (current-buffer)))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
181 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
182 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
183 ;;; Compare files/buffers |
7267 | 184 |
185 ;;;###autoload | |
186 (defun ediff-files (file-A file-B &optional startup-hooks) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
187 "Run Ediff on a pair of files, FILE-A and FILE-B." |
7267 | 188 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
189 (let ((dir-A (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
190 ediff-last-dir-A |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
191 default-directory)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
192 dir-B f) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
193 (list (setq f (ediff-read-file-name |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
194 "File A to compare" |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
195 dir-A |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
196 (ediff-get-default-file-name) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
197 'no-dirs)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
198 (ediff-read-file-name "File B to compare" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
199 (setq dir-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
200 (if ediff-use-last-dir |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
201 ediff-last-dir-B |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
202 (file-name-directory f))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
203 (progn |
72974
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
204 (ediff-add-to-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
205 'file-name-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
206 (ediff-abbreviate-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
207 (expand-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
208 (file-name-nondirectory f) |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
209 dir-B))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
210 (ediff-get-default-file-name f 1))) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
211 ))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
212 (ediff-files-internal file-A |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
213 (if (file-directory-p file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
214 (expand-file-name |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
215 (file-name-nondirectory file-A) file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
216 file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
217 nil ; file-C |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
218 startup-hooks |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
219 'ediff-files)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
220 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
221 ;;;###autoload |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
222 (defun ediff-files3 (file-A file-B file-C &optional startup-hooks) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
223 "Run Ediff on three files, FILE-A, FILE-B, and FILE-C." |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
224 (interactive |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
225 (let ((dir-A (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
226 ediff-last-dir-A |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
227 default-directory)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
228 dir-B dir-C f ff) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
229 (list (setq f (ediff-read-file-name |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
230 "File A to compare" |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
231 dir-A |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
232 (ediff-get-default-file-name) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
233 'no-dirs)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
234 (setq ff (ediff-read-file-name "File B to compare" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
235 (setq dir-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
236 (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
237 ediff-last-dir-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
238 (file-name-directory f))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
239 (progn |
72974
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
240 (ediff-add-to-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
241 'file-name-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
242 (ediff-abbreviate-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
243 (expand-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
244 (file-name-nondirectory f) |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
245 dir-B))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
246 (ediff-get-default-file-name f 1)))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
247 (ediff-read-file-name "File C to compare" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
248 (setq dir-C (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
249 ediff-last-dir-C |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
250 (file-name-directory ff))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
251 (progn |
72974
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
252 (ediff-add-to-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
253 'file-name-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
254 (ediff-abbreviate-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
255 (expand-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
256 (file-name-nondirectory ff) |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
257 dir-C))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
258 (ediff-get-default-file-name ff 2))) |
7267 | 259 ))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
260 (ediff-files-internal file-A |
7424 | 261 (if (file-directory-p file-B) |
262 (expand-file-name | |
263 (file-name-nondirectory file-A) file-B) | |
264 file-B) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
265 (if (file-directory-p file-C) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
266 (expand-file-name |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
267 (file-name-nondirectory file-A) file-C) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
268 file-C) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
269 startup-hooks |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
270 'ediff-files3)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
271 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
272 ;;;###autoload |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
273 (defalias 'ediff3 'ediff-files3) |
7267 | 274 |
275 | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
276 (defun ediff-find-file (file-var buffer-name &optional last-dir hooks-var) |
101721
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
277 "Visit FILE and arrange its buffer to Ediff's liking. |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
278 FILE-VAR is actually a variable symbol whose value must contain a true |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
279 file name. |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
280 BUFFER-NAME is a variable symbol, which will get the buffer object into |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
281 which FILE is read. |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
282 LAST-DIR is the directory variable symbol where FILE's |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
283 directory name should be returned. HOOKS-VAR is a variable symbol that will |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
284 be assigned the hook to be executed after `ediff-startup' is finished. |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
285 `ediff-find-file' arranges that the temp files it might create will be |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
286 deleted." |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
287 (let* ((file (symbol-value file-var)) |
19774 | 288 (file-magic (ediff-filename-magic-p file)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
289 (temp-file-name-prefix (file-name-nondirectory file))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
290 (cond ((not (file-readable-p file)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
291 (error "File `%s' does not exist or is not readable" file)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
292 ((file-directory-p file) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
293 (error "File `%s' is a directory" file))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
294 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
295 ;; some of the commands, below, require full file name |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
296 (setq file (expand-file-name file)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
297 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
298 ;; Record the directory of the file |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
299 (if last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
300 (set last-dir (expand-file-name (file-name-directory file)))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
301 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
302 ;; Setup the buffer |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
303 (set buffer-name (find-file-noselect file)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
304 |
19047 | 305 (ediff-with-current-buffer (symbol-value buffer-name) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
306 (widen) ; Make sure the entire file is seen |
18054 | 307 (cond (file-magic ; file has a handler, such as jka-compr-handler or |
308 ;;; ange-ftp-hook-function--arrange for temp file | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
309 (ediff-verify-file-buffer 'magic) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
310 (setq file |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
311 (ediff-make-temp-file |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
312 (current-buffer) temp-file-name-prefix)) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
313 (set hooks-var (cons `(lambda () (delete-file ,file)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
314 (symbol-value hooks-var)))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
315 ;; file processed via auto-mode-alist, a la uncompress.el |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
316 ((not (equal (file-truename file) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
317 (file-truename (buffer-file-name)))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
318 (setq file |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
319 (ediff-make-temp-file |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
320 (current-buffer) temp-file-name-prefix)) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
321 (set hooks-var (cons `(lambda () (delete-file ,file)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
322 (symbol-value hooks-var)))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
323 (t ;; plain file---just check that the file matches the buffer |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
324 (ediff-verify-file-buffer)))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
325 (set file-var file))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
326 |
20206 | 327 ;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer |
328 (defun ediff-files-internal (file-A file-B file-C startup-hooks job-name | |
329 &optional merge-buffer-file) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
330 (let (buf-A buf-B buf-C) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
331 (if (string= file-A file-B) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
332 (error "Files A and B are the same")) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
333 (if (stringp file-C) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
334 (or (and (string= file-A file-C) (error "Files A and C are the same")) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
335 (and (string= file-B file-C) (error "Files B and C are the same")))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
336 (message "Reading file %s ... " file-A) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
337 ;;(sit-for 0) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
338 (ediff-find-file 'file-A 'buf-A 'ediff-last-dir-A 'startup-hooks) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
339 (message "Reading file %s ... " file-B) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
340 ;;(sit-for 0) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
341 (ediff-find-file 'file-B 'buf-B 'ediff-last-dir-B 'startup-hooks) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
342 (if (stringp file-C) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
343 (progn |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
344 (message "Reading file %s ... " file-C) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
345 ;;(sit-for 0) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
346 (ediff-find-file |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
347 'file-C 'buf-C |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
348 (if (eq job-name 'ediff-merge-files-with-ancestor) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
349 'ediff-last-dir-ancestor 'ediff-last-dir-C) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
350 'startup-hooks))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
351 (ediff-setup buf-A file-A |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
352 buf-B file-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
353 buf-C file-C |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
354 startup-hooks |
20206 | 355 (list (cons 'ediff-job-name job-name)) |
356 merge-buffer-file))) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
357 |
87691
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
358 (declare-function diff-latest-backup-file "diff" (fn)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
359 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
360 ;;;###autoload |
7267 | 361 (defalias 'ediff 'ediff-files) |
362 | |
46766
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
363 ;;;###autoload |
104277
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
364 (defun ediff-current-file () |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
365 "Start ediff between current buffer and its file on disk. |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
366 This command can be used instead of `revert-buffer'. If there is |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
367 nothing to revert then this command fails." |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
368 (interactive) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
369 (unless (or revert-buffer-function |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
370 revert-buffer-insert-file-contents-function |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
371 (and buffer-file-number |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
372 (or (buffer-modified-p) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
373 (not (verify-visited-file-modtime |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
374 (current-buffer)))))) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
375 (error "Nothing to revert")) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
376 (let* ((auto-save-p (and (recent-auto-save-p) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
377 buffer-auto-save-file-name |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
378 (file-readable-p buffer-auto-save-file-name) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
379 (y-or-n-p |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
380 "Buffer has been auto-saved recently. Compare with auto-save file? "))) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
381 (file-name (if auto-save-p |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
382 buffer-auto-save-file-name |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
383 buffer-file-name)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
384 (revert-buf-name (concat "FILE=" file-name)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
385 (revert-buf (get-buffer revert-buf-name)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
386 (current-major major-mode)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
387 (unless file-name |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
388 (error "Buffer does not seem to be associated with any file")) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
389 (when revert-buf |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
390 (kill-buffer revert-buf) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
391 (setq revert-buf nil)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
392 (setq revert-buf (get-buffer-create revert-buf-name)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
393 (with-current-buffer revert-buf |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
394 (insert-file-contents file-name) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
395 ;; Assume same modes: |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
396 (funcall current-major)) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
397 (ediff-buffers revert-buf (current-buffer)))) |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
398 |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
399 |
affb617d6101
2009-08-15 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
101721
diff
changeset
|
400 ;;;###autoload |
46766
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
401 (defun ediff-backup (file) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
402 "Run Ediff on FILE and its backup file. |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
403 Uses the latest backup, if there are several numerical backups. |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
404 If this file is a backup, `ediff' it with its original." |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
405 (interactive (list (read-file-name "Ediff (file with backup): "))) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
406 ;; The code is taken from `diff-backup'. |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
407 (require 'diff) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
408 (let (bak ori) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
409 (if (backup-file-name-p file) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
410 (setq bak file |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
411 ori (file-name-sans-versions file)) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
412 (setq bak (or (diff-latest-backup-file file) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
413 (error "No backup found for %s" file)) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
414 ori file)) |
bc3820ad92b2
(ediff-backup): New autoloaded command.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44028
diff
changeset
|
415 (ediff-files bak ori))) |
7267 | 416 |
417 ;;;###autoload | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
418 (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name) |
7267 | 419 "Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B." |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
420 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
421 (let (bf) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
422 (list (setq bf (read-buffer "Buffer A to compare: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
423 (ediff-other-buffer "") t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
424 (read-buffer "Buffer B to compare: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
425 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
426 ;; realign buffers so that two visible bufs will be |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
427 ;; at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
428 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
429 (ediff-other-buffer bf)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
430 t)))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
431 (or job-name (setq job-name 'ediff-buffers)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
432 (ediff-buffers-internal buffer-A buffer-B nil startup-hooks job-name)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
433 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
434 ;;;###autoload |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
435 (defalias 'ebuffers 'ediff-buffers) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
436 |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
437 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
438 ;;;###autoload |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
439 (defun ediff-buffers3 (buffer-A buffer-B buffer-C |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
440 &optional startup-hooks job-name) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
441 "Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C." |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
442 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
443 (let (bf bff) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
444 (list (setq bf (read-buffer "Buffer A to compare: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
445 (ediff-other-buffer "") t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
446 (setq bff (read-buffer "Buffer B to compare: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
447 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
448 ;; realign buffers so that two visible |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
449 ;; bufs will be at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
450 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
451 (ediff-other-buffer bf)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
452 t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
453 (read-buffer "Buffer C to compare: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
454 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
455 ;; realign buffers so that three visible |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
456 ;; bufs will be at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
457 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
458 (ediff-other-buffer (list bf bff))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
459 t) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
460 ))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
461 (or job-name (setq job-name 'ediff-buffers3)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
462 (ediff-buffers-internal buffer-A buffer-B buffer-C startup-hooks job-name)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
463 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
464 ;;;###autoload |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
465 (defalias 'ebuffers3 'ediff-buffers3) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
466 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
467 |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
468 |
20206 | 469 ;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer |
470 (defun ediff-buffers-internal (buf-A buf-B buf-C startup-hooks job-name | |
471 &optional merge-buffer-file) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
472 (let* ((buf-A-file-name (buffer-file-name (get-buffer buf-A))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
473 (buf-B-file-name (buffer-file-name (get-buffer buf-B))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
474 (buf-C-is-alive (ediff-buffer-live-p buf-C)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
475 (buf-C-file-name (if buf-C-is-alive |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
476 (buffer-file-name (get-buffer buf-B)))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
477 file-A file-B file-C) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
478 (unwind-protect |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
479 (progn |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
480 (if (not (ediff-buffer-live-p buf-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
481 (error "Buffer %S doesn't exist" buf-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
482 (if (not (ediff-buffer-live-p buf-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
483 (error "Buffer %S doesn't exist" buf-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
484 (let ((ediff-job-name job-name)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
485 (if (and ediff-3way-comparison-job |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
486 (not buf-C-is-alive)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
487 (error "Buffer %S doesn't exist" buf-C))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
488 (if (stringp buf-A-file-name) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
489 (setq buf-A-file-name (file-name-nondirectory buf-A-file-name))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
490 (if (stringp buf-B-file-name) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
491 (setq buf-B-file-name (file-name-nondirectory buf-B-file-name))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
492 (if (stringp buf-C-file-name) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
493 (setq buf-C-file-name (file-name-nondirectory buf-C-file-name))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
494 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
495 (setq file-A (ediff-make-temp-file buf-A buf-A-file-name) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
496 file-B (ediff-make-temp-file buf-B buf-B-file-name)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
497 (if buf-C-is-alive |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
498 (setq file-C (ediff-make-temp-file buf-C buf-C-file-name))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
499 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
500 (ediff-setup (get-buffer buf-A) file-A |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
501 (get-buffer buf-B) file-B |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
502 (if buf-C-is-alive (get-buffer buf-C)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
503 file-C |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
504 (cons `(lambda () |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
505 (delete-file ,file-A) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
506 (delete-file ,file-B) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
507 (if (stringp ,file-C) (delete-file ,file-C))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
508 startup-hooks) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
509 (list (cons 'ediff-job-name job-name)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
510 merge-buffer-file)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
511 (if (and (stringp file-A) (file-exists-p file-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
512 (delete-file file-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
513 (if (and (stringp file-B) (file-exists-p file-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
514 (delete-file file-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
515 (if (and (stringp file-C) (file-exists-p file-C)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
516 (delete-file file-C))))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
517 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
518 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
519 ;;; Directory and file group operations |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
520 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
521 ;; Get appropriate default name for directory: |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
522 ;; If ediff-use-last-dir, use ediff-last-dir-A. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
523 ;; In dired mode, use the directory that is under the point (if any); |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
524 ;; otherwise, use default-directory |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
525 (defun ediff-get-default-directory-name () |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
526 (cond (ediff-use-last-dir ediff-last-dir-A) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
527 ((eq major-mode 'dired-mode) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
528 (let ((f (dired-get-filename nil 'noerror))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
529 (if (and (stringp f) (file-directory-p f)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
530 f |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
531 default-directory))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
532 (t default-directory))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
533 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
534 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
535 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
536 (defun ediff-directories (dir1 dir2 regexp) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
537 "Run Ediff on a pair of directories, DIR1 and DIR2, comparing files that have |
48371
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
538 the same name in both. The third argument, REGEXP, is nil or a regular |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
539 expression; only file names that match the regexp are considered." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
540 (interactive |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
541 (let ((dir-A (ediff-get-default-directory-name)) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
542 (default-regexp (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
543 f) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
544 (list (setq f (read-directory-name |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
545 "Directory A to compare:" dir-A nil 'must-match)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
546 (read-directory-name "Directory B to compare:" |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
547 (if ediff-use-last-dir |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
548 ediff-last-dir-B |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
549 (ediff-strip-last-dir f)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
550 nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
551 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
552 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
553 (format "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
|
554 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
555 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
556 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
557 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
558 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
559 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
560 (ediff-directories-internal |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
561 dir1 dir2 nil regexp 'ediff-files 'ediff-directories |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
562 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
563 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
564 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
565 (defalias 'edirs 'ediff-directories) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
566 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
567 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
568 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
569 (defun ediff-directory-revisions (dir1 regexp) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
570 "Run Ediff on a directory, DIR1, comparing its files with their revisions. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
571 The second argument, REGEXP, is a regular expression that filters the file |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
572 names. Only the files that are under revision control are taken into account." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
573 (interactive |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
574 (let ((dir-A (ediff-get-default-directory-name)) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
575 (default-regexp (eval ediff-default-filtering-regexp)) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
576 ) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
577 (list (read-directory-name |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
578 "Directory to compare with revision:" dir-A nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
579 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
580 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
581 (format "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
|
582 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
583 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
584 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
585 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
586 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
587 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
588 (ediff-directory-revisions-internal |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
589 dir1 regexp 'ediff-revision 'ediff-directory-revisions |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
590 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
591 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
592 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
593 (defalias 'edir-revisions 'ediff-directory-revisions) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
594 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
595 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
596 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
597 (defun ediff-directories3 (dir1 dir2 dir3 regexp) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
598 "Run Ediff on three directories, DIR1, DIR2, and DIR3, comparing files that |
48371
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
599 have the same name in all three. The last argument, REGEXP, is nil or a |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
600 regular expression; only file names that match the regexp are considered." |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
601 |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
602 (interactive |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
603 (let ((dir-A (ediff-get-default-directory-name)) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
604 (default-regexp (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
605 f) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
606 (list (setq f (read-directory-name "Directory A to compare:" dir-A nil)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
607 (setq f (read-directory-name "Directory B to compare:" |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
608 (if ediff-use-last-dir |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
609 ediff-last-dir-B |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
610 (ediff-strip-last-dir f)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
611 nil 'must-match)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
612 (read-directory-name "Directory C to compare:" |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
613 (if ediff-use-last-dir |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
614 ediff-last-dir-C |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
615 (ediff-strip-last-dir f)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
616 nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
617 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
618 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
619 (format "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
|
620 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
621 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
622 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
623 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
624 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
625 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
626 (ediff-directories-internal |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
627 dir1 dir2 dir3 regexp 'ediff-files3 'ediff-directories3 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
628 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
629 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
630 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
631 (defalias 'edirs3 'ediff-directories3) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
632 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
633 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
634 (defun ediff-merge-directories (dir1 dir2 regexp &optional merge-autostore-dir) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
635 "Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have |
48371
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
636 the same name in both. The third argument, REGEXP, is nil or a regular |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
637 expression; only file names that match the regexp are considered." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
638 (interactive |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
639 (let ((dir-A (ediff-get-default-directory-name)) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
640 (default-regexp (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
641 f) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
642 (list (setq f (read-directory-name "Directory A to merge:" |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
643 dir-A nil 'must-match)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
644 (read-directory-name "Directory B to merge:" |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
645 (if ediff-use-last-dir |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
646 ediff-last-dir-B |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
647 (ediff-strip-last-dir f)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
648 nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
649 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
650 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
651 (format "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
|
652 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
653 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
654 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
655 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
656 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
657 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
658 (ediff-directories-internal |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
659 dir1 dir2 nil regexp 'ediff-merge-files 'ediff-merge-directories |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
660 nil merge-autostore-dir |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
661 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
662 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
663 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
664 (defalias 'edirs-merge 'ediff-merge-directories) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
665 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
666 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
667 (defun ediff-merge-directories-with-ancestor (dir1 dir2 ancestor-dir regexp |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
668 &optional |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
669 merge-autostore-dir) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
670 "Merge files in directories DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
671 Ediff merges files that have identical names in DIR1, DIR2. If a pair of files |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
672 in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge |
48371
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
673 without ancestor. The fourth argument, REGEXP, is nil or a regular expression; |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
674 only file names that match the regexp are considered." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
675 (interactive |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
676 (let ((dir-A (ediff-get-default-directory-name)) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
677 (default-regexp (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
678 f) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
679 (list (setq f (read-directory-name "Directory A to merge:" dir-A nil)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
680 (setq f (read-directory-name "Directory B to merge:" |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
681 (if ediff-use-last-dir |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
682 ediff-last-dir-B |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
683 (ediff-strip-last-dir f)) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
684 nil 'must-match)) |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
685 (read-directory-name "Ancestor directory:" |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
686 (if ediff-use-last-dir |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
687 ediff-last-dir-C |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
688 (ediff-strip-last-dir f)) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
689 nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
690 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
691 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
692 (format "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
|
693 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
694 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
695 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
696 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
697 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
698 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
699 (ediff-directories-internal |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
700 dir1 dir2 ancestor-dir regexp |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
701 'ediff-merge-files-with-ancestor 'ediff-merge-directories-with-ancestor |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
702 nil merge-autostore-dir |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
703 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
704 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
705 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
706 (defun ediff-merge-directory-revisions (dir1 regexp |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
707 &optional merge-autostore-dir) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
708 "Run Ediff on a directory, DIR1, merging its files with their revisions. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
709 The second argument, REGEXP, is a regular expression that filters the file |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
710 names. Only the files that are under revision control are taken into account." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
711 (interactive |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
712 (let ((dir-A (ediff-get-default-directory-name)) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
713 (default-regexp (eval ediff-default-filtering-regexp)) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
714 ) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
715 (list (read-directory-name |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
716 "Directory to merge with revisions:" dir-A nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
717 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
718 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
719 (format "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
|
720 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
721 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
722 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
723 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
724 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
725 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
726 (ediff-directory-revisions-internal |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
727 dir1 regexp 'ediff-merge-revisions 'ediff-merge-directory-revisions |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
728 nil merge-autostore-dir |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
729 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
730 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
731 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
732 (defalias 'edir-merge-revisions 'ediff-merge-directory-revisions) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
733 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
734 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
735 (defun ediff-merge-directory-revisions-with-ancestor (dir1 regexp |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
736 &optional |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
737 merge-autostore-dir) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
738 "Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
739 The second argument, REGEXP, is a regular expression that filters the file |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
740 names. Only the files that are under revision control are taken into account." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
741 (interactive |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
742 (let ((dir-A (ediff-get-default-directory-name)) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
743 (default-regexp (eval ediff-default-filtering-regexp)) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
744 ) |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
745 (list (read-directory-name |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
746 "Directory to merge with revisions and ancestors:" |
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
747 dir-A nil 'must-match) |
52828
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
748 (read-string |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
749 (if (stringp default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
750 (format "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
|
751 default-regexp) |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
752 "Filter through regular expression: ") |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
753 nil |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
754 'ediff-filtering-regexp-history |
d08ef8842be1
2003-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
52401
diff
changeset
|
755 (eval ediff-default-filtering-regexp)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
756 ))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
757 (ediff-directory-revisions-internal |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
758 dir1 regexp 'ediff-merge-revisions-with-ancestor |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
759 'ediff-merge-directory-revisions-with-ancestor |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
760 nil merge-autostore-dir |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
761 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
762 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
763 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
764 (defalias |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
765 'edir-merge-revisions-with-ancestor |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
766 'ediff-merge-directory-revisions-with-ancestor) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
767 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
768 ;;;###autoload |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
769 (defalias 'edirs-merge-with-ancestor 'ediff-merge-directories-with-ancestor) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
770 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
771 ;; Run ediff-action (ediff-files, ediff-merge, ediff-merge-with-ancestors) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
772 ;; on a pair of directories (three directories, in case of ancestor). |
48371
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
773 ;; The third argument, REGEXP, is nil or a regular expression; |
1b4ba54b52de
2002-11-17 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
46766
diff
changeset
|
774 ;; only file names that match the regexp are considered. |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
775 ;; JOBNAME is the symbol indicating the meta-job to be performed. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
776 ;; MERGE-AUTOSTORE-DIR is the directory in which to store merged files. |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
777 (defun ediff-directories-internal (dir1 dir2 dir3 regexp action jobname |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
778 &optional startup-hooks |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
779 merge-autostore-dir) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
780 (if (stringp dir3) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
781 (setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3)))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
782 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
783 (cond ((string= dir1 dir2) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
784 (error "Directories A and B are the same: %s" dir1)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
785 ((and (eq jobname 'ediff-directories3) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
786 (string= dir1 dir3)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
787 (error "Directories A and C are the same: %s" dir1)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
788 ((and (eq jobname 'ediff-directories3) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
789 (string= dir2 dir3)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
790 (error "Directories B and C are the same: %s" dir1))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
791 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
792 (if merge-autostore-dir |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
793 (or (stringp merge-autostore-dir) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
794 (error "%s: Directory for storing merged files must be a string" |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
795 jobname))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
796 (let (;; dir-diff-struct is of the form (common-list diff-list) |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
797 ;; It is a structure where ediff-intersect-directories returns |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
798 ;; commonalities and differences among directories |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
799 dir-diff-struct |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
800 meta-buf) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
801 (if (and ediff-autostore-merges |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
802 (ediff-merge-metajob jobname) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
803 (not merge-autostore-dir)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
804 (setq merge-autostore-dir |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
805 (read-directory-name "Save merged files in directory: " |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
806 (if ediff-use-last-dir |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
807 ediff-last-merge-autostore-dir |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
808 (ediff-strip-last-dir dir1)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
809 nil |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
810 'must-match))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
811 ;; verify we are not merging into an orig directory |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
812 (if merge-autostore-dir |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
813 (cond ((and (stringp dir1) (string= merge-autostore-dir dir1)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
814 (or (y-or-n-p |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
815 "Directory for saving merged files = Directory A. Sure? ") |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
816 (error "Directory merge aborted"))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
817 ((and (stringp dir2) (string= merge-autostore-dir dir2)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
818 (or (y-or-n-p |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
819 "Directory for saving merged files = Directory B. Sure? ") |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
820 (error "Directory merge aborted"))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
821 ((and (stringp dir3) (string= merge-autostore-dir dir3)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
822 (or (y-or-n-p |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
823 "Directory for saving merged files = Ancestor Directory. Sure? ") |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
824 (error "Directory merge aborted"))))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
825 |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
826 (setq dir-diff-struct (ediff-intersect-directories |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
827 jobname |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
828 regexp dir1 dir2 dir3 merge-autostore-dir)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
829 (setq startup-hooks |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
830 ;; this sets various vars in the meta buffer inside |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
831 ;; ediff-prepare-meta-buffer |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
832 (cons `(lambda () |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
833 ;; tell what to do if the user clicks on a session record |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
834 (setq ediff-session-action-function (quote ,action)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
835 ;; set ediff-dir-difference-list |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
836 (setq ediff-dir-difference-list |
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
837 (cdr (quote ,dir-diff-struct)))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
838 startup-hooks)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
839 (setq meta-buf (ediff-prepare-meta-buffer |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
840 'ediff-filegroup-action |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
841 (car dir-diff-struct) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
842 "*Ediff Session Group Panel" |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
843 'ediff-redraw-directory-group-buffer |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
844 jobname |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
845 startup-hooks)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
846 (ediff-show-meta-buffer meta-buf) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
847 )) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
848 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
849 ;; MERGE-AUTOSTORE-DIR can be given to tell ediff where to store the merged |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
850 ;; files |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
851 (defun ediff-directory-revisions-internal (dir1 regexp action jobname |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
852 &optional startup-hooks |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
853 merge-autostore-dir) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
854 (setq dir1 (if (file-directory-p dir1) dir1 (file-name-directory dir1))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
855 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
856 (if merge-autostore-dir |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
857 (or (stringp merge-autostore-dir) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
858 (error "%S: Directory for storing merged files must be a string" |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
859 jobname))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
860 (let (file-list meta-buf) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
861 (if (and ediff-autostore-merges |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
862 (ediff-merge-metajob jobname) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
863 (not merge-autostore-dir)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
864 (setq merge-autostore-dir |
71382
4033086b16b6
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
70416
diff
changeset
|
865 (read-directory-name "Save merged files in directory: " |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
866 (if ediff-use-last-dir |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
867 ediff-last-merge-autostore-dir |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
868 (ediff-strip-last-dir dir1)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
869 nil |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
870 'must-match))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
871 ;; verify merge-autostore-dir != dir1 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
872 (if (and merge-autostore-dir |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
873 (stringp dir1) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
874 (string= merge-autostore-dir dir1)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
875 (or (y-or-n-p |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
876 "Directory for saving merged file = directory A. Sure? ") |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
877 (error "Merge of directory revisions aborted"))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
878 |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
879 (setq file-list |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
880 (ediff-get-directory-files-under-revision |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
881 jobname regexp dir1 merge-autostore-dir)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
882 (setq startup-hooks |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
883 ;; this sets various vars in the meta buffer inside |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
884 ;; ediff-prepare-meta-buffer |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
885 (cons `(lambda () |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
886 ;; tell what to do if the user clicks on a session record |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
887 (setq ediff-session-action-function (quote ,action))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
888 startup-hooks)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
889 (setq meta-buf (ediff-prepare-meta-buffer |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
890 'ediff-filegroup-action |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
891 file-list |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
892 "*Ediff Session Group Panel" |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
893 'ediff-redraw-directory-group-buffer |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
894 jobname |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
895 startup-hooks)) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
896 (ediff-show-meta-buffer meta-buf) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
897 )) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
898 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
899 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
900 ;;; Compare regions and windows |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
901 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
902 ;;;###autoload |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
903 (defun ediff-windows-wordwise (dumb-mode &optional wind-A wind-B startup-hooks) |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
904 "Compare WIND-A and WIND-B, which are selected by clicking, wordwise. |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
905 With prefix argument, DUMB-MODE, or on a non-windowing display, works as |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
906 follows: |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
907 If WIND-A is nil, use selected window. |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
908 If WIND-B is nil, use window next to WIND-A." |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
909 (interactive "P") |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
910 (ediff-windows dumb-mode wind-A wind-B |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
911 startup-hooks 'ediff-windows-wordwise 'word-mode)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
912 |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
913 ;;;###autoload |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
914 (defun ediff-windows-linewise (dumb-mode &optional wind-A wind-B startup-hooks) |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
915 "Compare WIND-A and WIND-B, which are selected by clicking, linewise. |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
916 With prefix argument, DUMB-MODE, or on a non-windowing display, works as |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
917 follows: |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
918 If WIND-A is nil, use selected window. |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
919 If WIND-B is nil, use window next to WIND-A." |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
920 (interactive "P") |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
921 (ediff-windows dumb-mode wind-A wind-B |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
922 startup-hooks 'ediff-windows-linewise nil)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
923 |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
924 ;; Compare WIND-A and WIND-B, which are selected by clicking. |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
925 ;; With prefix argument, DUMB-MODE, or on a non-windowing display, |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
926 ;; works as follows: |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
927 ;; If WIND-A is nil, use selected window. |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
928 ;; If WIND-B is nil, use window next to WIND-A. |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
929 (defun ediff-windows (dumb-mode wind-A wind-B startup-hooks job-name word-mode) |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
930 (if (or dumb-mode (not (ediff-window-display-p))) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
931 (setq wind-A (ediff-get-next-window wind-A nil) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
932 wind-B (ediff-get-next-window wind-B wind-A)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
933 (setq wind-A (ediff-get-window-by-clicking wind-A nil 1) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
934 wind-B (ediff-get-window-by-clicking wind-B wind-A 2))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
935 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
936 (let ((buffer-A (window-buffer wind-A)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
937 (buffer-B (window-buffer wind-B)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
938 beg-A end-A beg-B end-B) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
939 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
940 (save-excursion |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
941 (save-window-excursion |
14040 | 942 (sit-for 0) ; sync before using window-start/end -- a precaution |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
943 (select-window wind-A) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
944 (setq beg-A (window-start) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
945 end-A (window-end)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
946 (select-window wind-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
947 (setq beg-B (window-start) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
948 end-B (window-end)))) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
949 (setq buffer-A |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
950 (ediff-clone-buffer-for-window-comparison |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
951 buffer-A wind-A "-Window.A-") |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
952 buffer-B |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
953 (ediff-clone-buffer-for-window-comparison |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
954 buffer-B wind-B "-Window.B-")) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
955 (ediff-regions-internal |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
956 buffer-A beg-A end-A buffer-B beg-B end-B |
18054 | 957 startup-hooks job-name word-mode nil))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
958 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
959 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
960 ;;;###autoload |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
961 (defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
962 "Run Ediff on a pair of regions in specified buffers. |
75389
11ae87f329da
2007-01-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
963 Regions \(i.e., point and mark\) can be set in advance or marked interactively. |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
964 This function is effective only for relatively small regions, up to 200 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
965 lines. For large regions, use `ediff-regions-linewise'." |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
966 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
967 (let (bf) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
968 (list (setq bf (read-buffer "Region's A buffer: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
969 (ediff-other-buffer "") t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
970 (read-buffer "Region's B buffer: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
971 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
972 ;; realign buffers so that two visible bufs will be |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
973 ;; at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
974 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
975 (ediff-other-buffer bf)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
976 t)))) |
8303
33ef3e3234dd
(Emacs 19 menu setup): Move back to top level and do it only if purify-flag.
Richard M. Stallman <rms@gnu.org>
parents:
7709
diff
changeset
|
977 (if (not (ediff-buffer-live-p buffer-A)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
978 (error "Buffer %S doesn't exist" buffer-A)) |
8303
33ef3e3234dd
(Emacs 19 menu setup): Move back to top level and do it only if purify-flag.
Richard M. Stallman <rms@gnu.org>
parents:
7709
diff
changeset
|
979 (if (not (ediff-buffer-live-p buffer-B)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
980 (error "Buffer %S doesn't exist" buffer-B)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
981 |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
982 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
983 (let ((buffer-A |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
984 (ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-")) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
985 (buffer-B |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
986 (ediff-clone-buffer-for-region-comparison buffer-B "-Region.B-")) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
987 reg-A-beg reg-A-end reg-B-beg reg-B-end) |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105372
diff
changeset
|
988 (with-current-buffer buffer-A |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
989 (setq reg-A-beg (region-beginning) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
990 reg-A-end (region-end)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
991 (set-buffer buffer-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
992 (setq reg-B-beg (region-beginning) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
993 reg-B-end (region-end))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
994 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
995 (ediff-regions-internal |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
996 (get-buffer buffer-A) reg-A-beg reg-A-end |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
997 (get-buffer buffer-B) reg-B-beg reg-B-end |
18054 | 998 startup-hooks 'ediff-regions-wordwise 'word-mode nil))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
999 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1000 ;;;###autoload |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
1001 (defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1002 "Run Ediff on a pair of regions in specified buffers. |
75389
11ae87f329da
2007-01-23 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
75347
diff
changeset
|
1003 Regions \(i.e., point and mark\) can be set in advance or marked interactively. |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1004 Each region is enlarged to contain full lines. |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1005 This function is effective for large regions, over 100-200 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1006 lines. For small regions, use `ediff-regions-wordwise'." |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1007 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1008 (let (bf) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1009 (list (setq bf (read-buffer "Region A's buffer: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1010 (ediff-other-buffer "") t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1011 (read-buffer "Region B's buffer: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1012 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1013 ;; realign buffers so that two visible bufs will be |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1014 ;; at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1015 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1016 (ediff-other-buffer bf)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1017 t)))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1018 (if (not (ediff-buffer-live-p buffer-A)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1019 (error "Buffer %S doesn't exist" buffer-A)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1020 (if (not (ediff-buffer-live-p buffer-B)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1021 (error "Buffer %S doesn't exist" buffer-B)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1022 |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1023 (let ((buffer-A |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
1024 (ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-")) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1025 (buffer-B |
43714
1c34b0b56515
* ediff-init.el: comments.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
42706
diff
changeset
|
1026 (ediff-clone-buffer-for-region-comparison buffer-B "-Region.B-")) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1027 reg-A-beg reg-A-end reg-B-beg reg-B-end) |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105372
diff
changeset
|
1028 (with-current-buffer buffer-A |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1029 (setq reg-A-beg (region-beginning) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1030 reg-A-end (region-end)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1031 ;; enlarge the region to hold full lines |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1032 (goto-char reg-A-beg) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1033 (beginning-of-line) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1034 (setq reg-A-beg (point)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1035 (goto-char reg-A-end) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1036 (end-of-line) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1037 (or (eobp) (forward-char)) ; include the newline char |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1038 (setq reg-A-end (point)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1039 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1040 (set-buffer buffer-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1041 (setq reg-B-beg (region-beginning) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1042 reg-B-end (region-end)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1043 ;; enlarge the region to hold full lines |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1044 (goto-char reg-B-beg) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1045 (beginning-of-line) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1046 (setq reg-B-beg (point)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1047 (goto-char reg-B-end) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1048 (end-of-line) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1049 (or (eobp) (forward-char)) ; include the newline char |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1050 (setq reg-B-end (point)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1051 ) ; save excursion |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1052 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1053 (ediff-regions-internal |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1054 (get-buffer buffer-A) reg-A-beg reg-A-end |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1055 (get-buffer buffer-B) reg-B-beg reg-B-end |
18839 | 1056 startup-hooks 'ediff-regions-linewise nil nil))) ; no word mode |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1057 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1058 ;; compare region beg-A to end-A of buffer-A |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1059 ;; to regions beg-B -- end-B in buffer-B. |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1060 (defun ediff-regions-internal (buffer-A beg-A end-A buffer-B beg-B end-B |
18054 | 1061 startup-hooks job-name word-mode |
1062 setup-parameters) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1063 (let ((tmp-buffer (get-buffer-create ediff-tmp-buffer)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1064 overl-A overl-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1065 file-A file-B) |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1066 (unwind-protect |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1067 (progn |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1068 ;; in case beg/end-A/B aren't markers--make them into markers |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1069 (ediff-with-current-buffer buffer-A |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1070 (setq beg-A (move-marker (make-marker) beg-A) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1071 end-A (move-marker (make-marker) end-A))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1072 (ediff-with-current-buffer buffer-B |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1073 (setq beg-B (move-marker (make-marker) beg-B) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1074 end-B (move-marker (make-marker) end-B))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1075 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1076 ;; make file-A |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1077 (if word-mode |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1078 (ediff-wordify beg-A end-A buffer-A tmp-buffer) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1079 (ediff-copy-to-buffer beg-A end-A buffer-A tmp-buffer)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1080 (setq file-A (ediff-make-temp-file tmp-buffer "regA")) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1081 |
106471
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1082 ;; make file-B |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1083 (if word-mode |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1084 (ediff-wordify beg-B end-B buffer-B tmp-buffer) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1085 (ediff-copy-to-buffer beg-B end-B buffer-B tmp-buffer)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1086 (setq file-B (ediff-make-temp-file tmp-buffer "regB")) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1087 |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1088 (setq overl-A (ediff-make-bullet-proof-overlay beg-A end-A buffer-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1089 (setq overl-B (ediff-make-bullet-proof-overlay beg-B end-B buffer-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1090 (ediff-setup buffer-A file-A |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1091 buffer-B file-B |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1092 nil nil ; buffer & file C |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1093 (cons `(lambda () |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1094 (delete-file ,file-A) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1095 (delete-file ,file-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1096 startup-hooks) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1097 (append |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1098 (list (cons 'ediff-word-mode word-mode) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1099 (cons 'ediff-narrow-bounds (list overl-A overl-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1100 (cons 'ediff-job-name job-name)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1101 setup-parameters))) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1102 (if (and (stringp file-A) (file-exists-p file-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1103 (delete-file file-A)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1104 (if (and (stringp file-B) (file-exists-p file-B)) |
9fe246ccb486
2009-12-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
106192
diff
changeset
|
1105 (delete-file file-B))) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1106 )) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1107 |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1108 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1109 ;;; Merge files and buffers |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1110 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1111 ;;;###autoload |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1112 (defalias 'ediff-merge 'ediff-merge-files) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1113 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1114 (defsubst ediff-merge-on-startup () |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1115 (ediff-do-merge 0) |
60151
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
55943
diff
changeset
|
1116 ;; Can't remember why this is here, but it may cause the automatically merged |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
55943
diff
changeset
|
1117 ;; buffer to be lost. So, keep the buffer modified. |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
55943
diff
changeset
|
1118 ;;(ediff-with-current-buffer ediff-buffer-C |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
55943
diff
changeset
|
1119 ;; (set-buffer-modified-p nil)) |
905bf9de87af
* ediff.el (ediff-set-diff-overlays-in-one-buffer,
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
55943
diff
changeset
|
1120 ) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1121 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1122 ;;;###autoload |
20206 | 1123 (defun ediff-merge-files (file-A file-B |
1124 ;; MERGE-BUFFER-FILE is the file to be | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1125 ;; associated with the merge buffer |
20206 | 1126 &optional startup-hooks merge-buffer-file) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1127 "Merge two files without ancestor." |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1128 (interactive |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1129 (let ((dir-A (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1130 ediff-last-dir-A |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1131 default-directory)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1132 dir-B f) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1133 (list (setq f (ediff-read-file-name |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1134 "File A to merge" |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1135 dir-A |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1136 (ediff-get-default-file-name) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1137 'no-dirs)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1138 (ediff-read-file-name "File B to merge" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1139 (setq dir-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1140 (if ediff-use-last-dir |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1141 ediff-last-dir-B |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1142 (file-name-directory f))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1143 (progn |
72974
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1144 (ediff-add-to-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1145 'file-name-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1146 (ediff-abbreviate-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1147 (expand-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1148 (file-name-nondirectory f) |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1149 dir-B))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
1150 (ediff-get-default-file-name f 1))) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1151 ))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1152 (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1153 (ediff-files-internal file-A |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1154 (if (file-directory-p file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1155 (expand-file-name |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1156 (file-name-nondirectory file-A) file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1157 file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1158 nil ; file-C |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1159 startup-hooks |
20206 | 1160 'ediff-merge-files |
1161 merge-buffer-file)) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1162 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1163 ;;;###autoload |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1164 (defun ediff-merge-files-with-ancestor (file-A file-B file-ancestor |
20206 | 1165 &optional |
1166 startup-hooks | |
1167 ;; MERGE-BUFFER-FILE is the file | |
1168 ;; to be associated with the | |
1169 ;; merge buffer | |
1170 merge-buffer-file) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1171 "Merge two files with ancestor." |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1172 (interactive |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1173 (let ((dir-A (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1174 ediff-last-dir-A |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1175 default-directory)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1176 dir-B dir-ancestor f ff) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1177 (list (setq f (ediff-read-file-name |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1178 "File A to merge" |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1179 dir-A |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1180 (ediff-get-default-file-name) |
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1181 'no-dirs)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1182 (setq ff (ediff-read-file-name "File B to merge" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1183 (setq dir-B |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1184 (if ediff-use-last-dir |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1185 ediff-last-dir-B |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1186 (file-name-directory f))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1187 (progn |
72974
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1188 (ediff-add-to-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1189 'file-name-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1190 (ediff-abbreviate-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1191 (expand-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1192 (file-name-nondirectory f) |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1193 dir-B))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
1194 (ediff-get-default-file-name f 1)))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1195 (ediff-read-file-name "Ancestor file" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1196 (setq dir-ancestor |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1197 (if ediff-use-last-dir |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1198 ediff-last-dir-ancestor |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1199 (file-name-directory ff))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1200 (progn |
72974
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1201 (ediff-add-to-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1202 'file-name-history |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1203 (ediff-abbreviate-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1204 (expand-file-name |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1205 (file-name-nondirectory ff) |
54ea774c3eed
* viper.el: Bumped up version/date of update to reflect the substantial
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
71382
diff
changeset
|
1206 dir-ancestor))) |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
1207 (ediff-get-default-file-name ff 2))) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1208 ))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1209 (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1210 (ediff-files-internal file-A |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1211 (if (file-directory-p file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1212 (expand-file-name |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1213 (file-name-nondirectory file-A) file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1214 file-B) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1215 file-ancestor |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1216 startup-hooks |
20206 | 1217 'ediff-merge-files-with-ancestor |
1218 merge-buffer-file)) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1219 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1220 ;;;###autoload |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1221 (defalias 'ediff-merge-with-ancestor 'ediff-merge-files-with-ancestor) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1222 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1223 ;;;###autoload |
20206 | 1224 (defun ediff-merge-buffers (buffer-A buffer-B |
1225 &optional | |
1226 ;; MERGE-BUFFER-FILE is the file to be | |
1227 ;; associated with the merge buffer | |
1228 startup-hooks job-name merge-buffer-file) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1229 "Merge buffers without ancestor." |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1230 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1231 (let (bf) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1232 (list (setq bf (read-buffer "Buffer A to merge: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1233 (ediff-other-buffer "") t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1234 (read-buffer "Buffer B to merge: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1235 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1236 ;; realign buffers so that two visible bufs will be |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1237 ;; at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1238 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1239 (ediff-other-buffer bf)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1240 t)))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1241 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1242 (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1243 (or job-name (setq job-name 'ediff-merge-buffers)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1244 (ediff-buffers-internal |
20206 | 1245 buffer-A buffer-B nil startup-hooks job-name merge-buffer-file)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1246 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1247 ;;;###autoload |
20206 | 1248 (defun ediff-merge-buffers-with-ancestor (buffer-A buffer-B buffer-ancestor |
1249 &optional | |
1250 startup-hooks | |
1251 job-name | |
1252 ;; MERGE-BUFFER-FILE is the | |
1253 ;; file to be associated | |
1254 ;; with the merge buffer | |
1255 merge-buffer-file) | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1256 "Merge buffers with ancestor." |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1257 (interactive |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1258 (let (bf bff) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1259 (list (setq bf (read-buffer "Buffer A to merge: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1260 (ediff-other-buffer "") t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1261 (setq bff (read-buffer "Buffer B to merge: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1262 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1263 ;; realign buffers so that two visible |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1264 ;; bufs will be at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1265 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1266 (ediff-other-buffer bf)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1267 t)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1268 (read-buffer "Ancestor buffer: " |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1269 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1270 ;; realign buffers so that three visible |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1271 ;; bufs will be at the top |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1272 (save-window-excursion (other-window 1)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1273 (ediff-other-buffer (list bf bff))) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1274 t) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1275 ))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1276 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1277 (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1278 (or job-name (setq job-name 'ediff-merge-buffers-with-ancestor)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1279 (ediff-buffers-internal |
20206 | 1280 buffer-A buffer-B buffer-ancestor startup-hooks job-name merge-buffer-file)) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1281 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1282 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1283 ;;;###autoload |
20206 | 1284 (defun ediff-merge-revisions (&optional file startup-hooks merge-buffer-file) |
1285 ;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer | |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1286 "Run Ediff by merging two revisions of a file. |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1287 The file is the optional FILE argument or the file visited by the current |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1288 buffer." |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1289 (interactive) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1290 (if (stringp file) (find-file file)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1291 (let (rev1 rev2) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1292 (setq rev1 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1293 (read-string |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1294 (format |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1295 "Version 1 to merge (default %s's working version): " |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1296 (if (stringp file) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1297 (file-name-nondirectory file) "current buffer"))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1298 rev2 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1299 (read-string |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1300 (format |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1301 "Version 2 to merge (default %s): " |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1302 (if (stringp file) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1303 (file-name-nondirectory file) "current buffer")))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1304 (ediff-load-version-control) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1305 ;; ancestor-revision=nil |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1306 (funcall |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1307 (intern (format "ediff-%S-merge-internal" ediff-version-control-package)) |
20206 | 1308 rev1 rev2 nil startup-hooks merge-buffer-file))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1309 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1310 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1311 ;;;###autoload |
20206 | 1312 (defun ediff-merge-revisions-with-ancestor (&optional |
1313 file startup-hooks | |
1314 ;; MERGE-BUFFER-FILE is the file to | |
1315 ;; be associated with the merge | |
1316 ;; buffer | |
1317 merge-buffer-file) | |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1318 "Run Ediff by merging two revisions of a file with a common ancestor. |
42706 | 1319 The file is the optional FILE argument or the file visited by the current |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1320 buffer." |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1321 (interactive) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1322 (if (stringp file) (find-file file)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1323 (let (rev1 rev2 ancestor-rev) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1324 (setq rev1 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1325 (read-string |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1326 (format |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1327 "Version 1 to merge (default %s's working version): " |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1328 (if (stringp file) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1329 (file-name-nondirectory file) "current buffer"))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1330 rev2 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1331 (read-string |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1332 (format |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1333 "Version 2 to merge (default %s): " |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1334 (if (stringp file) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1335 (file-name-nondirectory file) "current buffer"))) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1336 ancestor-rev |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1337 (read-string |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1338 (format |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1339 "Ancestor version (default %s's base revision): " |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1340 (if (stringp file) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1341 (file-name-nondirectory file) "current buffer")))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1342 (ediff-load-version-control) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1343 (funcall |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1344 (intern (format "ediff-%S-merge-internal" ediff-version-control-package)) |
20206 | 1345 rev1 rev2 ancestor-rev startup-hooks merge-buffer-file))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1346 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1347 ;;; Apply patch |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1348 |
7709
d88d94461e5d
(ediff-patch-buffer): Fix autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
1349 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1350 (defun ediff-patch-file (&optional arg patch-buf) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1351 "Run Ediff by patching SOURCE-FILENAME. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1352 If optional PATCH-BUF is given, use the patch in that buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1353 and don't ask the user. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1354 If prefix argument, then: if even argument, assume that the patch is in a |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1355 buffer. If odd -- assume it is in a file." |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1356 (interactive "P") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1357 (let (source-dir source-file) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1358 (require 'ediff-ptch) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1359 (setq patch-buf |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1360 (ediff-get-patch-buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1361 (if arg (prefix-numeric-value arg)) patch-buf)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1362 (setq source-dir (cond (ediff-use-last-dir ediff-last-dir-patch) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1363 ((and (not ediff-patch-default-directory) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1364 (buffer-file-name patch-buf)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1365 (file-name-directory |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1366 (expand-file-name |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1367 (buffer-file-name patch-buf)))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1368 (t default-directory))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1369 (setq source-file |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1370 (read-file-name |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1371 "File to patch (directory, if multifile patch): " |
35411
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
34860
diff
changeset
|
1372 ;; use an explicit initial file |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
34860
diff
changeset
|
1373 source-dir nil nil (ediff-get-default-file-name))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1374 (ediff-dispatch-file-patching-job patch-buf source-file))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1375 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1376 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1377 (defun ediff-patch-buffer (&optional arg patch-buf) |
64485
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1378 "Run Ediff by patching the buffer specified at prompt. |
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1379 Without the optional prefix ARG, asks if the patch is in some buffer and |
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1380 prompts for the buffer or a file, depending on the answer. |
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1381 With ARG=1, assumes the patch is in a file and prompts for the file. |
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1382 With ARG=2, assumes the patch is in a buffer and prompts for the buffer. |
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1383 PATCH-BUF is an optional argument, which specifies the buffer that contains the |
2273b7101b27
* viper-cmd.el (viper-escape-to-state): bug fix
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64215
diff
changeset
|
1384 patch. If not given, the user is prompted according to the prefix argument." |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1385 (interactive "P") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1386 (require 'ediff-ptch) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1387 (setq patch-buf |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1388 (ediff-get-patch-buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1389 (if arg (prefix-numeric-value arg)) patch-buf)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1390 (ediff-patch-buffer-internal |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1391 patch-buf |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1392 (read-buffer |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1393 "Which buffer to patch? " |
68997
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
1394 (ediff-other-buffer patch-buf)))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1395 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1396 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1397 ;;;###autoload |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1398 (defalias 'epatch 'ediff-patch-file) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1399 ;;;###autoload |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1400 (defalias 'epatch-buffer 'ediff-patch-buffer) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1401 |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1402 |
7267 | 1403 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1404 |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1405 ;;; Versions Control functions |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1406 |
7267 | 1407 ;;;###autoload |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1408 (defun ediff-revision (&optional file startup-hooks) |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1409 "Run Ediff by comparing versions of a file. |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1410 The file is an optional FILE argument or the file entered at the prompt. |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1411 Default: the file visited by the current buffer. |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1412 Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1413 ;; if buffer is non-nil, use that buffer instead of the current buffer |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
1414 (interactive "P") |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1415 (if (not (stringp file)) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1416 (setq file |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1417 (ediff-read-file-name "Compare revisions for file" |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1418 (if ediff-use-last-dir |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1419 ediff-last-dir-A |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1420 default-directory) |
42602
633233bf2bbf
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
38514
diff
changeset
|
1421 (ediff-get-default-file-name) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1422 'no-dirs))) |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1423 (find-file file) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1424 (if (and (buffer-modified-p) |
73970
53a71b783884
(ediff-revision): Use `format', not `message', in `y-or-n-p' call.
Juanma Barranquero <lekktu@gmail.com>
parents:
73486
diff
changeset
|
1425 (y-or-n-p (format "Buffer %s is modified. Save buffer? " |
53a71b783884
(ediff-revision): Use `format', not `message', in `y-or-n-p' call.
Juanma Barranquero <lekktu@gmail.com>
parents:
73486
diff
changeset
|
1426 (buffer-name)))) |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1427 (save-buffer (current-buffer))) |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
1428 (let (rev1 rev2) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1429 (setq rev1 |
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1430 (read-string |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1431 (format "Revision 1 to compare (default %s's latest revision): " |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1432 (file-name-nondirectory file))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1433 rev2 |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1434 (read-string |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65627
diff
changeset
|
1435 (format "Revision 2 to compare (default %s's current state): " |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33390
diff
changeset
|
1436 (file-name-nondirectory file)))) |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
1437 (ediff-load-version-control) |
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
1438 (funcall |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1439 (intern (format "ediff-%S-internal" ediff-version-control-package)) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1440 rev1 rev2 startup-hooks) |
12083
2bfc61a5fbe7
don't make the patch buffer RO.
Karl Heuer <kwzh@gnu.org>
parents:
11760
diff
changeset
|
1441 )) |
18839 | 1442 |
1443 | |
1444 ;;;###autoload | |
1445 (defalias 'erevision 'ediff-revision) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1446 |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1447 |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1448 ;; Test if version control package is loaded and load if not |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1449 ;; Is SILENT is non-nil, don't report error if package is not found. |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1450 (defun ediff-load-version-control (&optional silent) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1451 (require 'ediff-vers) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1452 (or (featurep ediff-version-control-package) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1453 (if (locate-library (symbol-name ediff-version-control-package)) |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1454 (progn |
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1455 (message "") ; kill the message from `locate-library' |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1456 (require ediff-version-control-package)) |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1457 (or silent |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
22287
diff
changeset
|
1458 (error "Version control package %S.el not found. Use vc.el instead" |
11041
17b319a26eea
Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents:
8874
diff
changeset
|
1459 ediff-version-control-package))))) |
13133
0e069b2940ae
(ediff-files,ediff-merge-files): better file-name defaults.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12880
diff
changeset
|
1460 |
7267 | 1461 |
13217
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1462 ;;;###autoload |
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1463 (defun ediff-version () |
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1464 "Return string describing the version of Ediff. |
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1465 When called interactively, displays the version." |
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1466 (interactive) |
106192
a2ee981efbec
2009-11-22 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
105994
diff
changeset
|
1467 ;; called-interactively-p - not in XEmacs |
a2ee981efbec
2009-11-22 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
105994
diff
changeset
|
1468 ;; (if (called-interactively-p 'interactive) |
a2ee981efbec
2009-11-22 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
105994
diff
changeset
|
1469 (if (interactive-p) |
87096
a99a2e8bc21e
Fix possibly buggy calls to `message'.
Deepak Goel <deego@gnufans.org>
parents:
86474
diff
changeset
|
1470 (message "%s" (ediff-version)) |
13217
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1471 (format "Ediff %s of %s" ediff-version ediff-date))) |
c3f879af05db
(ediff-version): is now autoloaded.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13133
diff
changeset
|
1472 |
86474
daebf666bc9a
Load dired and ediff-*.el files silently.
Glenn Morris <rgm@gnu.org>
parents:
86440
diff
changeset
|
1473 ;; info is run first, and will autoload info.el. |
87691
f2c8fd594360
2008-01-10 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
87678
diff
changeset
|
1474 (declare-function Info-goto-node "info" (nodename &optional fork)) |
7267 | 1475 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1476 ;;;###autoload |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1477 (defun ediff-documentation (&optional node) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1478 "Display Ediff's manual. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1479 With optional NODE, goes to that node." |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1480 (interactive) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1481 (let ((ctl-window ediff-control-window) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1482 (ctl-buf ediff-control-buffer)) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1483 |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1484 (ediff-skip-unsuitable-frames) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1485 (condition-case nil |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1486 (progn |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1487 (pop-to-buffer (get-buffer-create "*info*")) |
85972
51aa47312c4b
* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
85825
diff
changeset
|
1488 (info (if (featurep 'xemacs) "ediff.info" "ediff")) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1489 (if node |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1490 (Info-goto-node node) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1491 (message "Type `i' to search for a specific topic")) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1492 (raise-frame (selected-frame))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1493 (error (beep 1) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1494 (with-output-to-temp-buffer ediff-msg-buffer |
33390
d574be791ed3
* ediff.el (ediff-regions-internal, ediff-documentation):
Dave Love <fx@gnu.org>
parents:
33019
diff
changeset
|
1495 (ediff-with-current-buffer standard-output |
d574be791ed3
* ediff.el (ediff-regions-internal, ediff-documentation):
Dave Love <fx@gnu.org>
parents:
33019
diff
changeset
|
1496 (fundamental-mode)) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
15480
diff
changeset
|
1497 (princ ediff-BAD-INFO)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1498 (if (window-live-p ctl-window) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1499 (progn |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1500 (select-window ctl-window) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1501 (set-window-buffer ctl-window ctl-buf))))))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49428
diff
changeset
|
1502 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1503 |
55943
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1504 (dolist (mess '("^Errors in diff output. Diff output is in " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1505 "^Hmm... I don't see an Ediff command around here...$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1506 "^Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1507 ": This command runs in Ediff Control Buffer only!$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1508 ": Invalid op in ediff-check-version$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1509 "^ediff-shrink-window-C can be used only for merging jobs$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1510 "^Lost difference info on these directories$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1511 "^This command is inapplicable in the present context$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1512 "^This session group has no parent$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1513 "^Can't hide active session, $" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1514 "^Ediff: something wrong--no multiple diffs buffer$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1515 "^Can't make context diff for Session $" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1516 "^The patch buffer wasn't found$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1517 "^Aborted$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1518 "^This Ediff session is not part of a session group$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1519 "^No active Ediff sessions or corrupted session registry$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1520 "^No session info in this line$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1521 "^`.*' is not an ordinary file$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1522 "^Patch appears to have failed$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1523 "^Recomputation of differences cancelled$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1524 "^No fine differences in this mode$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1525 "^Lost connection to ancestor buffer...sorry$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1526 "^Not merging with ancestor$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1527 "^Don't know how to toggle read-only in buffer " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1528 "Emacs is not running as a window application$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1529 "^This command makes sense only when merging with an ancestor$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1530 "^At end of the difference list$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1531 "^At beginning of the difference list$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1532 "^Nothing saved for diff .* in buffer " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1533 "^Buffer is out of sync for file " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1534 "^Buffer out of sync for file " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1535 "^Output from `diff' not found$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1536 "^You forgot to specify a region in buffer " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1537 "^All right. Make up your mind and come back...$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1538 "^Current buffer is not visiting any file$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1539 "^Failed to retrieve revision: $" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1540 "^Can't determine display width.$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1541 "^File `.*' does not exist or is not readable$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1542 "^File `.*' is a directory$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1543 "^Buffer .* doesn't exist$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1544 "^Directories . and . are the same: " |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1545 "^Directory merge aborted$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1546 "^Merge of directory revisions aborted$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1547 "^Buffer .* doesn't exist$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1548 "^There is no file to merge$" |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1549 "^Version control package .*.el not found. Use vc.el instead$")) |
b54f2d3d90fc
Move Ediff's debug-ignored-errors from bindings.el.
Juri Linkov <juri@jurta.org>
parents:
52828
diff
changeset
|
1550 (add-to-list 'debug-ignored-errors mess)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1551 |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1552 |
64215
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
1553 (require 'ediff-util) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
1554 |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
1555 (run-hooks 'ediff-load-hook) |
a4c59075cac8
* viper-cmd.el (viper--key-maps): new variable.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
64091
diff
changeset
|
1556 |
68997
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
1557 |
101721
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
1558 ;; Local Variables: |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
1559 ;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
1560 ;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
1561 ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
c55394eee0de
Follow commenting conventions.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
1562 ;; End: |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14169
diff
changeset
|
1563 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93773
diff
changeset
|
1564 ;; arch-tag: 97c71396-db02-4f41-8b48-6a51c3348fcc |
7267 | 1565 ;;; ediff.el ends here |