annotate lisp/ediff.el @ 11943:ea533622fb8b

(reserved_heap_size,allocate_heap): Defined. (sbrk): Use allocate_heap.
author Geoff Voelker <voelker@cs.washington.edu>
date Fri, 26 May 1995 05:27:52 +0000
parents 898ec89f5379
children 2bfc61a5fbe7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
11234
4d2a2fe1d8d7 Update copyright.
Karl Heuer <kwzh@gnu.org>
parents: 11058
diff changeset
2 ;;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 ;; Author: Michael Kifer <kifer@cs.sunysb.edu>
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Created: February 2, 1994
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
6 ;; Keywords: comparing, merging, patching, version control.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
8 (defconst ediff-version "2.19" "The current version of Ediff")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
9 (defconst ediff-date "March 14, 1995" "Date of last update")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
10
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
11 ;; LCD Archive Entry:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
12 ;; ediff|Michael Kifer|kifer@cs.sunysb.edu|
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
13 ;; A comprehensive visual interface to diff and patch|
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
14 ;; 14-March-95|2.19|~/packages/ediff.shar.Z|
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
15
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
16
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; This file is part of GNU Emacs.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; GNU Emacs is free software; you can redistribute it and/or modify
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 ;; it under the terms of the GNU General Public License as published by
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ;; the Free Software Foundation; either version 2, or (at your option)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 ;; any later version.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 ;; GNU Emacs is distributed in the hope that it will be useful,
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; GNU General Public License for more details.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;; You should have received a copy of the GNU General Public License
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;; along with GNU Emacs; see the file COPYING. If not, write to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 ;;; Commentary:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;; ----------
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
36 ;; Never read that diff output again!
7391
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
37 ;; Apply patch selectively, like a pro!
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
38 ;; Merge with ease!
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
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
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
41 ;; the differences between a pair (or a tripple) of files or buffers. The
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
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 ;; 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
49 ;; though both files, the patched and the original one, simultaneously,
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 ;; difference-by-difference. You can even apply a patch right out of a
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 ;; mail buffer, i.e., patches received by mail don't even have to be saved.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 ;; Since Ediff lets you copy differences between buffers, you can, in
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 ;; 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
54 ;; region from file_orig to file, thereby undoing any particular patch that
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 ;; you don't like).
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
57 ;; This package builds upon the ideas borrowed from emerge.el and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
58 ;; several Ediff's functions are adaptations from emerge.el.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
59 ;; Much of the functionality of Ediff is also influenced by emerge.el.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
61 ;; The present version of Ediff supersedes Emerge. It provides a superior
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
62 ;; user interface and has many features not found in Emerge. In particular,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
63 ;; it can do patching and 2-way and 3-way file comparison in addition to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
64 ;; merging.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
66 ;; Ediff is aware of version control, which lets the user compare
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
67 ;; files with their older versions. Ediff can also work with remote and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
68 ;; compressed files. Details are given below.
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
69
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 ;;; Remarks:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 ;; -------
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
74 ;; 1. Ediff is heavily dependent on the new features of Emacs 19.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
75 ;; It won't run under Emacs 18 at all.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
76 ;; 2. If running XEmacs, Ediff requires at least version 19.9.
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
77 ;; 3. The function ediff-revision requires the version of vc.el that comes
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
78 ;; with Emacs 19.22 and XEmacs 19.10 and later, or rcs.el version 1.67
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
79 ;; or later. See "Version control support", below.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 ;;; Installation and use:
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
83 ;; ---------------------
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
85 ;; The user can invoke Ediff interactively using the following functions:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
86 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
87 ;; ediff-files - compare two files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
88 ;; ediff - alias for ediff-files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
89 ;; ediff-buffers - compare two buffers
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
91 ;; ediff-files3 - compare three files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
92 ;; ediff3 - alias for ediff-files3
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
93 ;; ediff-buffers3 - compare three buffers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
94 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
95 ;; ediff-windows - compare windows
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
96 ;; ediff-small-regions - compare small regions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
97 ;; ediff-large-regions - compare large regions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
98 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
99 ;; ediff-revision - compare buffer & version
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
100 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 ;; ediff-patch-file - patch file then compare
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
102 ;; epatch - alias for ediff-patch-file
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 ;; ediff-patch-buffer - patch buffer then compare
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
104 ;; epatch-buffer - alias for ediff-patch-buffer
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
105 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
106 ;; ediff-merge-files - merge two files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
107 ;; ediff-merge - alias for ediff-merge-files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
108 ;; ediff-merge-files-with-ancestor - same but with ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
109 ;; ediff-merge-with-ancestor - alias for the above
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
110 ;; ediff-merge-buffers - merge two buffers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
111 ;; ediff-merge-buffers-with-ancestor - same but with ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
112 ;; ediff-merge-revisions - same but with ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
113 ;; ediff-merge-revisions-with-ancestor - same but with ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
114 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 ;; To use Ediff, put this in your .emacs file:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 ;;
7391
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
119 ;; (autoload 'ediff-buffers "ediff" "Visual interface to diff" t)
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
120 ;; (autoload 'ediff "ediff" "Visual interface to diff" t)
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
121 ;; (autoload 'ediff-files "ediff" "Visual interface to diff" t)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
122 ;; (autoload 'ediff-buffers3 "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
123 ;; (autoload 'ediff3 "ediff3" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
124 ;; (autoload 'ediff-files3 "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
125 ;; (autoload 'ediff-merge "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
126 ;; (autoload 'ediff-merge-files "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
127 ;; (autoload 'ediff-merge-files-with-ancestor "ediff"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
128 ;; "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
129 ;; (autoload 'ediff-merge-with-ancestor "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
130 ;; (autoload 'ediff-merge-buffers "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
131 ;; (autoload 'ediff-merge-buffers-with-ancestor "ediff"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
132 ;; "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
133 ;; (autoload 'ediff-merge-revisions "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
134 ;; (autoload 'ediff-merge-revisions-with-ancestor "ediff"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
135 ;; "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
136 ;; (autoload 'ediff-windows "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
137 ;; (autoload 'ediff-small-regions "ediff" "Visual interface to diff" t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
138 ;; (autoload 'ediff-large-regions "ediff" "Visual interface to diff" t)
7391
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
139 ;; (autoload 'epatch "ediff" "Visual interface to patch" t)
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
140 ;; (autoload 'ediff-patch-file "ediff" "Visual interface to patch" t)
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
141 ;; (autoload 'ediff-patch-buffer "ediff" "Visual interface to patch" t)
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
142 ;; (autoload 'epatch-buffer "ediff" "Visual interface to patch" t)
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
143 ;; (autoload 'ediff-revision "ediff"
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
144 ;; "Interface to diff & version control" t)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 ;; If you want Ediff to be loaded from the very beginning, you should have
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 ;; (require 'ediff)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 ;; in your .emacs file. This way it is also easier to figure out changes
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 ;; to the default Ediff setting, if such changes become necessary --- see
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 ;; Customization.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
155 ;; All the above functions use the diff program to find different
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
156 ;; regions. They process diff output and display it to the user in a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
157 ;; convenient form.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
158 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
159 ;; The functions ediff-files, ediff-buffers, ediff-files3, ediff-buffers3
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
160 ;; first display the coarse, line-based difference regions, as commonly
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
161 ;; found by the diff program.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
162 ;; Since diff may report fairly large chunks of text as being
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
163 ;; different even though the difference may be contained in a few words or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
164 ;; even in the white space or line breaks, Ediff will further refine the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
165 ;; regions to indicate which exact words differ. If the only difference is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
166 ;; in the white space and line breaks, Ediff will say so.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
167 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
168 ;; The functions ediff-windows, ediff-small-regions and ediff-large-regions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
169 ;; do comparison on parts of buffers (which must already exist).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
170 ;; Since ediff-windows and ediff-small-regions are intended for relatively
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
171 ;; small segments of the buffers, comparison is done on the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
172 ;; word-basis rather than line basis. No refinement is necessary in this
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
173 ;; case. This technique is effective only for relatively small
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
174 ;; regions (perhaps, up to 100 lines), as these functions have a relatively
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
175 ;; slow startup.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
176 ;; To compare large regions, use ediff-large-regions. In this mode, Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
177 ;; displays differences as it would if invoked via ediff-files or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
178 ;; ediff-buffers.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
179 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
180 ;; The functions ediff-patch-file and ediff-patch-buffer apply a patch
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
181 ;; to a file or a buffer and then run Ediff on these buffers, displaying
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
182 ;; the difference regions.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
183 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
184 ;; Finally, for files under version control, ediff-revisions will compare a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
185 ;; file to one of its versions.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 ;;; Compilation
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188 ;; -----------
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190 ;; When you byte-compile Ediff, you will get some warnings about functions
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 ;; being undefined. These can be safely ignored.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
192 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 ;;; Customization:
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
195 ;; --------------
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
197 ;; Hooks:
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
198 ;; -----
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 ;; If you don't like the default setting, you can change it through the
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 ;; various variables and hooks. In particular, the following hooks are
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 ;; available:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203 ;; ediff-load-hooks
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
204 ;; ediff-keymap-setup-hooks
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 ;; ediff-before-setup-windows-hooks
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
206 ;; ediff-after-setup-windows-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
207 ;; ediff-before-setup-control-frame-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
208 ;; ediff-after-setup-control-frame-hooks
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
209 ;; ediff-startup-hooks
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
210 ;; ediff-select-hooks
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211 ;; ediff-unselect-hooks
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 ;; ediff-suspend-hooks
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 ;; ediff-quit-hooks
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 ;; ediff-prepare-buffer-hooks
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
215 ;; ediff-display-help-hooks
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 ;; The hooks in ediff-load-hooks can be used to change defaults after Ediff
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
218 ;; is loaded. The hooks in ediff-keymap-setup-hooks can be used to alter
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
219 ;; bindings in Ediff's keymap. These hooks are called right after the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
220 ;; default bindings are set.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
221 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
222 ;; The hooks in ediff-before/after-setup-windows-hooks,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
223 ;; ediff-suspend-hooks, and ediff-quit-hooks can be used to save and then
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
224 ;; restore whatever window configuration you want.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
225
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
226 ;; Note that, by default, ediff-quit-hooks is set to a function,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
227 ;; ediff-cleanup-mess, which cleans after Ediff, as appropriate in most
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
228 ;; cases. It is rather unlikely that the user will want to change
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
229 ;; it. However, the user may want add other hooks to ediff-quit-hooks,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
230 ;; either before or after ediff-cleanup-mess (see the documentation for
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
231 ;; add-hook on how to do this). One should be aware that hooks executing
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
232 ;; before ediff-cleanup-mess start in ediff-control-buffer; they should
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
233 ;; also leave ediff-control-buffer as the current buffer. Hooks that are
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
234 ;; executed after ediff-cleanup-mess will have either buffer A or buffer B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
235 ;; as the current buffer.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
236
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
237 ;; If you are using packages such as mode-line.el to alter
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
238 ;; the buffer identification field in the mode line, you may have to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
239 ;; restore this field after exiting Ediff by calling an appropriate
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
240 ;; function from a hook in ediff-quit-hooks (in case of mode-line.el, the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
241 ;; function to call would be mode-line-abbreviate-buffer-identification).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
242 ;; This should be done from a hook that runs before ediff-default-quit-hook,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
243 ;; since such hooks run from within ediff-control-buffer, where buffers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
244 ;; A, B, and C can be accessed via the variables ediff-buffer-A,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
245 ;; ediff-buffer-B, ediff-buffer-C.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
246
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
247 ;; The hooks ediff-before/after-setup-control-frame-hooks can be used to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
248 ;; change how and where Ediff Control Panel is displayed, when it is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
249 ;; displayed in a separate frame.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
250
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
251 ;; However, be aware that many variables that drive Ediff are local to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
252 ;; Ediff Control Panel, which requires special care in writing these hooks.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
253 ;; Take a look at ediff-default-suspend-hook and ediff-default-quit-hook to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
254 ;; see what's involved.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
255
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
256 ;; The hooks in ediff-prepare-buffer-hooks are executed for each Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
257 ;; buffer (A, B, C) right after these buffers are arranged. Ediff runs the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
258 ;; hooks in ediff-display-help-hooks each time after setting up the help
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
259 ;; message. Finally, ediff-mode-hooks are run just after ediff-mode is set
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
260 ;; up in the control buffer. This is done before any windows or frames are
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
261 ;; created. One can use it to set local variables that determine the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
262 ;; look of the display.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
263
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
264 ;; Quick help:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
265 ;; ----------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
266 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
267 ;; Ediff provides quick help using its control panel window. Since this
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
268 ;; window takes a fair share of the screen real estate, you can toggle it
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
269 ;; off by hitting `?'. The control window will then shrink to just one
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
270 ;; line and a mode line, displaying a short help message. The variable
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 ;; ediff-prefer-long-help-message
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
273 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
274 ;; Tells Ediff whether the user wants the short message initially or the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
275 ;; long one. By default, it is set to nil, meaning that the short message
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
276 ;; will be shown on startup. Set this to t, if you want the long message
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
277 ;; initially.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
278 ;; If you want to change the appearance of the help message on a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
279 ;; per-buffer basis, you must use ediff-startup-hooks to change the value
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
280 ;; of ediff-help-message, which is a variable local to ediff-control-buffer.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
281
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
282 ;; Window and frame configuration:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
283 ;; -------------------------------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
284
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
285 ;; In a non-windowing display, Ediff sets things up in one frame, splitting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
286 ;; it between a small control window and the windows for file-A, file-B,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
287 ;; and file-C. The split between these latter windows can be horizontal or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
288 ;; vertical, which can be changed interactively by hitting `|' while the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
289 ;; cursor is in the control window.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
290 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
291 ;; On a window display, Ediff sets up a dedicated frame for Ediff Control
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
292 ;; Panel and then it would choose windows as follows: If one of the buffers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
293 ;; is invisible, it will be displayed in the currently selected frame. If
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
294 ;; a buffer is visible, it will be displayed in the frame it is visible.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
295 ;; If, according to the above criteria, the two buffers fall into the same
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
296 ;; frame, then be it---the frame will be shared by the two. The same
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
297 ;; algorithm works when you hit `C-l' (ediff-recenter), `p'
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
298 ;; (ediff-previous-difference), `n', etc.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
299 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
300 ;; Thus, you can compare files in one frame or in different frames.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
301 ;; The former is done by default, while the latter can be achieved by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
302 ;; arranging files A, B (and C, if applicable) to be seen in different
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
303 ;; frames. Ediff respects these arrangements, automatically adapting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
304 ;; itself to the multi-frame mode.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
305
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
306 ;; Ediff uses the variables
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
307 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
308 ;; ediff-control-frame-parameters
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
309 ;; ediff-control-frame-position-function
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
310 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
311 ;; to set up its control panels. The user can change or augment
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
312 ;; ediff-control-frame-parameters including the font, color, etc. The X
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
313 ;; resource name of Ediff Control Panel frames is `Ediff'. Under X-windows,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
314 ;; you can use this name to set up preferences in your ~/.Xdefaults
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
315 ;; (~/.xrdb, or whatever is in use). Usually this is preferable to changing
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
316 ;; ediff-control-frame-parameters directly. For instance, you can specify
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
317 ;; in ~/.Xdefaults where the control frame is to be sitting on the screen
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
318 ;; using the resource
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
319 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
320 ;; Ediff*geometry
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
321 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
322 ;; In general, any X resource pertaining the control frame can be reached
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
323 ;; via the prefix `Ediff*'.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
325 ;; The prefered way of specifying the position of the control frame is by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
326 ;; setting the variable ediff-control-frame-position-function to be a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
327 ;; function to be called in order to determine the desired location for the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
328 ;; control frame. The default value of this variable is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
329 ;; `ediff-make-frame-position'. This function places the control frame in
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
330 ;; the vicinity of the North-East corner of the frame displaying buffer A.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
331 ;; A pair of variables,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
332 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
333 ;; ediff-narrow-control-frame-leftward-shift
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
334 ;; ediff-wide-control-frame-rightward-shift
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
335 ;; ediff-control-frame-upward-shift
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
336 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
337 ;; can be used to adjust the location produced by ediff-make-frame-position.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
338 ;; The first variable specifies the number of characters for shifting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
339 ;; the control frame from the rightmost edge of frame A when the control
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
340 ;; frame is displayed as a small window.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
341 ;; The second variable specifies the rightward shift of the control frame
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
342 ;; from the left edge of frame A when the control frame shows the full
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
343 ;; menu of options.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
344 ;; The third variable specifies the number of pixels for the upward shift
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
345 ;; of the control frame.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
346 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
347 ;; If you truly and absolutely dislike the way Ediff sets up windows and if
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
348 ;; you can't customize this via frame parameters, the last resort is to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
349 ;; rewrite the function `ediff-setup-windows'. However, we believe that
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
350 ;; detaching Ediff Control Panel from the rest and making it into a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
351 ;; separate frame offers an important opportunity by allowing you to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
352 ;; iconify that frame. Under Emacs, the icon will usually accept all of the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
353 ;; Ediff commands, but will free up valuable real estate on your screen
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
354 ;; (this may depend on the window manager, though). Iconifying won't do any
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
355 ;; good under XEmacs since XEmacs icons do not seem to be sensitive to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
356 ;; keyboard input. The saving grace is that, even if not iconified, the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
357 ;; control frame is very small, smaller than some icons, so it doesn't take
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
358 ;; much space in any case.
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 ;; The variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
361 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
362 ;; ediff-prefer-iconified-control-frame
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
363 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
364 ;; if t, will cause the control frame to become iconified automatically when
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
365 ;; the help message is toggled off. This saves valuable real estate on the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
366 ;; screen. Toggling help back will deiconify the control frame.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
367 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
368 ;; To start ediff with an iconified Control Panel, you should set the above
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
369 ;; to t and ediff-prefer-long-help-message to nil.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
370
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
371 ;; The variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
372 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
373 ;; ediff-window-setup-function
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
374 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
375 ;; Controls the way windows are setup. The above multiframe setup is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
376 ;; achieved via ediff-setup-windows-multiframe function, which is a default
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
377 ;; on windowing displays (except for XEmacs 19.10 and earlier, which has a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
378 ;; bug that breaks the multiframe display). The plain setup, one where all
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
379 ;; windows are always in one frame, is done via ediff-setup-windows-plain,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
380 ;; which is the default on a non-windowing display (or in an xterm window).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
381 ;; In fact, under Emacs, you can switch freely between these two setups by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
382 ;; executing the command `ediff-toggle-multiframe'. However, don't try to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
383 ;; do it under XEmacs, as it gets thoroughly confused if you switch from
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
384 ;; multiframe setup to plain setup within the same Ediff session.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
385
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
386 ;; If you don't like either of these setups, write your own function. See
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
387 ;; the documentation for ediff-window-setup-function for the basic
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
388 ;; guidelines. However, writing window setups is not easy, so, before
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
389 ;; embarking on this job, you may want to take a close look at
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
390 ;; ediff-setup-windows-plain and ediff-setup-windows-multiframe.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
391
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
392 ;; The user can run multiple Ediff sessions at once, by invoking it several
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
393 ;; times without exiting the previous Ediff sessions. Different sessions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
394 ;; may even operate on the same pair of files. So, in principle, it is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
395 ;; possible to do, say, pairwise comparison of three (or more) different
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
396 ;; files. Each session would have its own Ediff Control Panel and all the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
397 ;; regarding a particular session is local to the associated control panel
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
398 ;; buffer. You can switch between sessions by suspending one session and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
399 ;; then switching to another control panel. (Different control panel
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
400 ;; buffers are distinguished by a numerical suffix, e.g., Ediff Control
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
401 ;; Panel<3>.) Thus, if you would like to compare three files pairwise,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
402 ;; you can do this by preparing three different frames, each with its data
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
403 ;; buffer to be compared. (No, I am not saying that such a 3way
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
404 ;; comparison is very easy to do.)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
405 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
406 ;; If you need to conduct multiple Ediff sessions on the same file, one
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
407 ;; thing should be kept in mind: each time you invoke Ediff on a buffer that
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
408 ;; already participates in another Ediff session, that buffer should not
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
409 ;; have any ASCII Ediff flags in it. (Highlighting with faces is OK.) If
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
410 ;; flags are not removed, difference overlays won't be set correctly
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
411 ;; for the second invocation of Ediff. The simplest way to remove ASCII
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
412 ;; flags from an Ediff buffer is to hit `h' and thus switch to highlighting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
413 ;; with faces (unhighlighting on a dumb terminal).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
414
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
415 ;; Remote and Compressed Files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
416 ;; ---------------------------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
417
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
418 ;; Ediff will work with remote, compressed, and encrypted files. Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
419 ;; supports ange-ftp.el, jka-compr.el, uncompress.el and crypt++.el, but
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
420 ;; it may work with other similar packages as well. This
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
421 ;; means that you can compare files residing on another machine, or you
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
422 ;; can apply a patch to a file on another machine (even the patch itself
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
423 ;; can be a remote file!).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
424 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
425 ;; When patching compressed or remote files, Ediff doesn't rename the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
426 ;; source file into source-file-name_orig (unlike what `patch' would
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
427 ;; usually do). Instead, the source file retains its name and the result
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
428 ;; of applying the patch is placed in a temporary file that has the suffix
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
429 ;; `_patched'. Generally, this applies to files that are handled using
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
430 ;; black magic, such as special file handlers (ange-ftp and some
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
431 ;; compression and encryption packages all use this method).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
432 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
433 ;; Regular files are treated by `patch' in the usual manner, i.e., the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
434 ;; original is renamed into source-name_orig and the result of the patch
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
435 ;; is placed into the file source-name. (Ediff uses `_orig' instead of
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
436 ;; the usual `.orig' for compatibility with systems like VMS.)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
437
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
438 ;;
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
439 ;; Selective browsing: Control over stepping through difference regions
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
440 ;; --------------------------------------------------------------------
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
441 ;;
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
442 ;; Sometimes it is convenient to be able to step through only some
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
443 ;; difference regions, those that satisfy certain conditions and to ignore
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
444 ;; all others. The commands `#f' and `#h' let the user specify regular
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
445 ;; expressions to control the way Ediff skips to the next or previous
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
446 ;; difference. Typing `#f' lets one specify of regular expressions,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
447 ;; regexp-A, regexp-B, and regexp-C.
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
448 ;; Ediff will then start stepping only through those difference regions where
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
449 ;; the region in buffer A matches regexp-A and/or the region in buffer B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
450 ;; matches regexp-B, etc. Whether `and' or `or' should be used depends on
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
451 ;; how the user responds to a prompt.
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
452 ;; Similarly, using `#h', one specifies expressions that match difference
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
453 ;; regions to be ignored while stepping through the differences. That is, if
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
454 ;; the buffer A part matches regexp-A, the buffer B part matches regexp B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
455 ;; and (if applicable) buffer-C part matches regexp-C, then the region will
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
456 ;; be ignored by ediff-next-difference and ediff-previous-difference commands.
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
457 ;;
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
458 ;; Hitting `#f' and `#h' toggles this feature on/off.
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
459 ;;
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
460 ;; Note that selective browsing affects only ediff-next-difference and
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
461 ;; ediff-previous-difference, i.e., the commands invoked by typing n/SPC
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
462 ;; and p/DEL. You can still jump directly (using `j' or `ga/gb/gc') to any
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
463 ;; numbered difference. Also, it should be understood, that #f and #h do
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
464 ;; not change the position of the point in the buffers. The effect of these
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
465 ;; commands is seen only when the user types `n' or `p', i.e., when
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
466 ;; Ediff is told to jump to the next or previous difference.
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
467 ;;
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
468 ;; Users can supply their own functions that specify how Ediff should do
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
469 ;; selective browsing. To change the default Ediff function, add a function to
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
470 ;; ediff-load-hooks which will do the following assignments:
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
471 ;;
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
472 ;; (fset ediff-hide-regexp-matches 'your-hide-function)
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
473 ;; (fset ediff-focus-on-regexp-matches 'your-focus-function)
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
474 ;;
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
475 ;; Useful hints: To specify a regexp that matches everything, don't simply
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
476 ;; type RET in response to a prompt. Typing RET tells Ediff to accept the
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
477 ;; default value, which may not be what you want. Instead, one should enter
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
478 ;; something like `^' or `$' --- which would match every line.
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
479 ;;
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
480 ;; If the user doesn't remember if selective browsing is in effect and
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
481 ;; which regexps are being used, the status command, `i', will supply
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
482 ;; the requisite information.
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
483 ;;
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
484 ;; In addition to the ability to ignore regions that match regular
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
485 ;; expressions, Ediff can be ordered to start skipping over certain
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
486 ;; `inessential' regions. This is controlled by the variable
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
487 ;;
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
488 ;; ediff-ignore-similar-regions
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
489 ;;
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
490 ;; which, if set to t, will cause Ediff to skip over difference regions
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
491 ;; that has been found similar, i.e., where the only differences are those
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
492 ;; in the white space and newlines.
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
493 ;;
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
494 ;; Note: In order for this feature to work, auto-refining of difference
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
495 ;; regions must be on, since otherwise Ediff won't know if there are no
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
496 ;; fine differences between regions. Under X, auto-refining is a default,
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
497 ;; but it is nixed on a dumb terminal or in an Xterm window. Therefore, in
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
498 ;; a non-windowing environment, the user must explicitly turn
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
499 ;; auto-refining on (e.g., by typing `@').
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
500 ;;
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
501 ;; CAUTION: If many inessential regions appear in a row, Ediff may take a
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
502 ;; long time to jump to the next region because it has to compute fine
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
503 ;; differences of all intermediate regions.
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
504 ;;
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
505 ;;
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
506 ;; Highlighting difference regions
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
507 ;; -------------------------------
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
508 ;; The second group of Ediff variables that could be changed, if you so
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509 ;; wish, is:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
511 ;; ediff-before-flag-bol
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
512 ;; ediff-after-flag-eol
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513 ;; ediff-before-flag-mol
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
514 ;; ediff-after-flag-mol
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
515 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
516 ;; ediff-current-diff-face-A
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
517 ;; ediff-current-diff-face-B
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
518 ;; ediff-current-diff-face-C
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
519 ;; ediff-fine-diff-face-A
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
520 ;; ediff-fine-diff-face-B
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
521 ;; ediff-fine-diff-face-C
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
522 ;; ediff-even-diff-face-A
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
523 ;; ediff-even-diff-face-B
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
524 ;; ediff-even-diff-face-C
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
525 ;; ediff-odd-diff-face-A
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
526 ;; ediff-odd-diff-face-B
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
527 ;; ediff-odd-diff-face-C
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
528 ;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
529 ;; The first four are ASCII strings that mark the beginning and the end of
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
530 ;; the differences found in files A, B, and C. Ediff uses different flags
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
531 ;; to highlight regions that begin/end at the beginning of a line or in a
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
532 ;; middle of a line.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
533
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
534 ;; The rest are the faces used to highlight text on X displays. On X
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
535 ;; displays, Ediff uses ediff-current-diff-face-A/B/C to highlight the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
536 ;; current difference region.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
537 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
538 ;; The faces ediff-fine-diff-face-A/B/C
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
539 ;; are used to show the fine differences between the current differences
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
540 ;; regions in buffers A, B, and C, respectively.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
541 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
542 ;; Non-current difference regions are displayed in alternating
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
543 ;; faces: ediff-even/odd-diff-face-A/B/C. The odd and the even
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
544 ;; faces are actually identical on monochrome displays, because it is
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
545 ;; rather poor in what you can do on such a display. So, I chose to use
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
546 ;; italics to highlight other differences. Any ideas would be welcome.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
547 ;; There are two ways to change the default setting for highlighting faces:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
548 ;; either change the variables, as in
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
549 ;;
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
550 ;; (setq ediff-current-diff-face-A 'bold-italic)
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
551 ;;
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
552 ;; or
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
553 ;;
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
554 ;; (setq ediff-current-diff-face-A
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
555 ;; (copy-face 'bold-italic 'ediff-current-diff-face-A))
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
556 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
557 ;; or by selectively modifying the defaults:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
558 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
559 ;; (add-hook 'ediff-load-hooks
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
560 ;; (function (lambda ()
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
561 ;; (set-face-foreground ediff-current-diff-face-B "blue")
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
562 ;; (set-face-background ediff-current-diff-face-B "red")
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
563 ;; (make-face-italic ediff-current-diff-face-B))))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
564 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
565 ;; You may also want to take a look at how the above faces are defined in
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
566 ;; Ediff.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567 ;;
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
568 ;; Note: it is not recommended to use `internal-get-face' (or `get-face' in
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
569 ;; XEmacs) when defining faces for Ediff, since this may cause
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
570 ;; problems when there are several frames with different font sizes.
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
571 ;; Instead, use copy-face or set/make-face-* as shown above.
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
572 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
573 ;; The last variable in this group,
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
574 ;;
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
575 ;; ediff-highlight-all-diffs
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
576 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
577 ;; indicates whether---on a window system---the user wants differences to be
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
578 ;; marked using ASCII strings (like on a dumb terminal) or using colors and
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
579 ;; highlighting. Normally, Ediff highlights all differences, but the selected
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
580 ;; difference is highlighted more visibly. One can cycle through various
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
581 ;; modes of highlighting by hitting `h'. By default, Ediff starts in the
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
582 ;; mode where all difference regions are highlighted. If you prefer to
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
583 ;; start in the mode where unselected differences are not highlighted, you
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
584 ;; should set ediff-highlight-all-diffs to nil.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
585 ;; You will still be able to turn on highlighting of all differences by
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
586 ;; hitting `h'.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
587 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
588 ;; If you want to change the above variables, they must be set
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
589 ;; BEFORE Ediff is loaded.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
590 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591 ;; Note: Ediff lets you switch between the two types of highlighting. That
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
592 ;; is you can switch, interactively, from highlighting using faces to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
593 ;; highlighting using ASCII flags, and back. Of course, toggling has
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594 ;; effect only on a window system. On a dumb terminal or in an xterm
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
595 ;; window, the only available option is highlighting with ASCII flags.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
596 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
597 ;; Selective display
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
598 ;; -----------------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
599 ;; If buffers being compared are narrowed at the time of invocation of Ediff,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
600 ;; ediff-buffers will preserve the narrowing range. However, if ediff-files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
601 ;; is invoked on the files visited by these buffers, narrowing will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
602 ;; turned off, since we assume that the user wants to compare the entire files.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
603 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
604 ;; Invocation of ediff-small/large-regions and ediff-windows will cause
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
605 ;; Ediff to set new narrowing ranges. However, the old ranges are preserved
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
606 ;; and will be returned to after quitting or by hitting `%'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
607 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
608 ;; Two variables control the behavior of ediff-windows,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
609 ;; ediff-small-regions, and ediff-large-regions with respect to narrowing:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
610 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
611 ;; ediff-start-narrowed
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
612 ;; ediff-quit-widened
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
613 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
614 ;; If ediff-start-narrowed is t, then Ediff will narrow display to the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
615 ;; appropriate range if it is invoked as ediff-windows or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
616 ;; ediff-small/large-regions.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
617 ;; If it is nil, then narrowing will not take place. However, the user can
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
618 ;; still toggle narrowing on and off by typing `%'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
619 ;; Similarly, ediff-quit-widened controls whether Ediff should restore
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
620 ;; the visibility range that existed before the current invocation.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
621 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
622 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
623 ;; Refinement of difference regions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
624 ;; --------------------------------
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
625 ;; Ediff has variables that control the way fine differences are
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
626 ;; highlighted. This feature lets the user highlight the exact words that
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
627 ;; make the difference regions in comparison buffers different. This process
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
628 ;; ignores spaces, tabs, and newlines.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
629 ;;
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
630 ;; ediff-auto-refine
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
631 ;; ediff-auto-refine-limit
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
632 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
633 ;; By default, `ediff-auto-refine' is `on', which means that fine differences
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
634 ;; within regions will be highlighted automatically. On a slow system, this
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
635 ;; feature may be undesirable. In any case, the user can always toggle
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
636 ;; auto-refining on/off/nix by hitting `@'. When auto-refining is off, fine
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
637 ;; differences will be shown only for regions for which these differences
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
638 ;; have been computed and saved before. If auto-refining is nixed, fine
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
639 ;; differences will not be shown at all. Hitting `*' will compute and
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
640 ;; display fine differences for the current difference region regardless of
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
641 ;; whether auto-refining is on, off, or nixed.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
642 ;; If auto-refining is on, the variable `ediff-auto-refine-limit' limits
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
643 ;; the size of the regions to be auto-refined. This variable guards against
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
644 ;; possible slow-down that may be caused by an extraordinary large
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
645 ;; difference region.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
646 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
647 ;; However, the user can always force region refining by typing `*'.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
648 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
649 ;; Sometimes, when a difference region has too many differences between the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
650 ;; variants, highlighting of fine differences stands in the way, especially
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
651 ;; on color displays. If that is the case, the user can invoke `*' with a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
652 ;; negative prefix argument, which would unhighlight fine diffs for the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
653 ;; current region.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
654 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
655 ;; To unhighlight fine differences in all diff regions, use the command
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
656 ;; `@'. Repeated typing of this key cycles through three different states:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
657 ;; auto-refining, no-auto-refining, and unhighlighting of all fine
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
658 ;; differences.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
659 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
660 ;; The variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
661 ;;
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
662 ;; ediff-forward-word-function
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
663 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
664 ;; allows the user to control how fine differences are computed.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
665 ;; The value must be a lisp function that determines how the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
666 ;; current difference region should be split into words.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
667 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
668 ;; Fine diferences are computed by first splitting the current difference
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
669 ;; region into words and then passing this along to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
670 ;; `ediff-diff-program'. For the default ediff-forward-word-function,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
671 ;; `ediff-forward-word', a word is a string consisting of letters, `-', or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
672 ;; `_', a string of punctuation symbols, a string of digits, or a string
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
673 ;; consisting of symbols that are neither space, nor a letter.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
674 ;;
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
675 ;; Patch and diff programs
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
676 ;; -----------------------
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
677 ;; The next group of variables determines the programs to be used for
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
678 ;; applying patches and for computing the main difference regions (not the
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
679 ;; fine difference regions):
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
680 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
681 ;; ediff-patch-program
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
682 ;; ediff-patch-options
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
683 ;; ediff-diff-program
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
684 ;; ediff-diff-options
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
685 ;; ediff-diff3-program
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
686 ;; ediff-diff3-options
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
687 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
688 ;; Warning about VMS: The output from VMS DIFF is not yet supported.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
689 ;; Instead, make sure some implementation of Unix diff on VMS is used.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
690 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
691 ;; These specify the functions that produce differences and do patching.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
692 ;; The *-options variables specify which options to pass to these programs.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
693 ;; It is unlikely that you would want to change these.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
694 ;; However, sometimes you may want to tell diff to ignore spaces and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
695 ;; such. Use the option '-w' for that.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
696 ;; Diff has several other useful options (type 'man diff' to find out).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
697 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
698 ;; However, Ediff doesn't let you use the option '-c', as it doesn't
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
699 ;; recognize this format yet. However, if you need to save the output from
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
700 ;; diff in a special form, Ediff lets you specify ``custom'' diff format
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
701 ;; using the following two variables:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
702 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
703 ;; ediff-custom-diff-program
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
704 ;; ediff-custom-diff-options
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
705 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
706 ;; The output generated by ediff-custom-diff-program (which doesn't even
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
707 ;; have to be a Unix-style diff!) is not used by Ediff, except that you can
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
708 ;; save if using ediff-save-buffer function (normally bound to `wd' key
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
709 ;; sequence).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
710 ;; However, Ediff is not the preferred way of producing diff output in
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
711 ;; Emacs, unless you also intend to use Ediff to browse through the diff'ed
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
712 ;; files. This is because diff.el (M-x diff), which also comes with Emacs,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
713 ;; is much faster in yielding the output of diff, while Ediff consumes many
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
714 ;; resources.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
715
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
716 ;; Support for diff3 and merging
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
717 ;; -----------------------------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
718
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
719 ;; Ediff supports 3way comparison via the functions `ediff-files3' and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
720 ;; `ediff-buffers3'. The interface is the same as for 2-way comparison.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
721 ;; In 3-way comparison and merging, Ediff indicates if any two difference
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
722 ;; regions are identical. For instance, if the current region in buffer A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
723 ;; is the same as the region in buffer C, then the mode line of buffer A will
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
724 ;; display [=diff(C)] and the mode line of buffer C will display [=diff(A)].
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
725 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
726 ;; Merging is done according to the following algorithm.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
727 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
728 ;; If a diff region in one of the buffers, say B, differs from the ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
729 ;; while the region in the other buffer, A, doesn't, then the merge buffer,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
730 ;; C, gets the B's region. Similarly when buffer A's region differs from
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
731 ;; the ancestor and B's doesn't.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
732 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
733 ;; If both regions, A and B, differ from the ancestor, then Ediff chooses
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
734 ;; according to the value of
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
735 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
736 ;; ediff-default-variant
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
737 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
738 ;; If the value is `default-A' then A's region is chosen. If it is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
739 ;; `default-B' then B's region is chosen. If the value of the above
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
740 ;; variable is `combined' then the region in buffer C will look like this:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
741 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
742 ;; #ifdef NEW /* variant A */
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
743 ;; diff region from buffer A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
744 ;; #else /* variant B */
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
745 ;; diff region from buffer B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
746 ;; #endif /* NEW */
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
747 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
748 ;; The actual strings that separate the regions copied from bufer A and B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
749 ;; are controled by the variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
750 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
751 ;; ediff-combination-pattern
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
752 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
753 ;; which must be a list of three strings.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
754 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
755 ;; In addition to the state of the difference, during merging Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
756 ;; displays the state of the merge for each region. If a difference came
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
757 ;; from buffer A by default (because both regions A and B were different
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
758 ;; from the ancestor and ediff-default-variant was set to `default-A')
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
759 ;; then [=diff(A) default-A] is displayed in the mode line. If the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
760 ;; difference in buffer C came, say, from buffer B because the diff region
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
761 ;; in that buffer differs from the ancestor, but the region in buffer A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
762 ;; doesn't (if merging with an ancestor) then [=diff(B) prefer-B] is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
763 ;; displayed. The indicators default-A/B and prefer-A/B are inspired by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
764 ;; emerge.el and have the same meaning.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
765 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
766 ;; Another indicator of the state of merge is `combined'. It appears
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
767 ;; with any difference region in buffer C that was obtained by combining
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
768 ;; the difference regions in buffers A and B as explained above.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
769 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
770 ;; Note that the state-of-difference indicators `=diff(A)' and `=diff(B)'
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
771 ;; above are not redundant, even in the present of a state-of-merge
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
772 ;; indicator, as the two serve different purposes. For instance, if the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
773 ;; mode line displays [=diff(B) prefer(B)] and you copy a diff region from
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
774 ;; buffer A to buffer C then `=diff(B)' will change to `diff-A' and the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
775 ;; mode line will display [=diff(A) prefer-B].
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
776 ;; This indicates that the difference region in buffer C is identical to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
777 ;; that in buffer A, but originally buffer C's region came from buffer B.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
778 ;; This is useful to know because the original diff region in buffer C can
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
779 ;; be recovered by typing `r'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
780 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
781 ;; Ediff never changes the state-of-merge indicator, except as a result of
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
782 ;; the `!' command (see below), in which case the indicator is lost.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
783 ;; On the other hand, the state-of-difference indicator is changed
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
784 ;; automatically by the copying/recovery commands, `a', `b', `r', `+'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
785 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
786 ;; If Ediff is asked to recompute differences via the command `!', the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
787 ;; information about origins of the regions in the merge buffer (default-A,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
788 ;; prefer-B, or combined) will be lost. This is because recomputing
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
789 ;; differences in this case means running diff3 on buffers A, B, and the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
790 ;; merge buffer, not on the ancestor buffer. (It makes no sense to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
791 ;; recompute differences with the ancestor, since Ediff assumes that the user
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
792 ;; doesn't edit buffers A and B, but he may have edited buffer C, and these
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
793 ;; changes are to be preserved.) Since some difference regions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
794 ;; may disappear as a result of editing in buffer C and others may arise,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
795 ;; there is generally no simple way to tell where the various regions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
796 ;; in the merge buffer came from.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
797 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
798 ;; In 3-way comparison, Ediff tries to disregard regions consisting of
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
799 ;; white space only as much as possible. For instance, if, say, the current
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
800 ;; region in buffer A consists of the white space only (or if it is empty),
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
801 ;; Ediff will not take it into account for the purpose of computing fine
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
802 ;; differences. The result is that Ediff can provide more visual
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
803 ;; information regarding the actual fine differences in the non-white
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
804 ;; regions B and C. Moreover, if the regions in buffers B and C differ in
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
805 ;; the white space only, then a message to this effect will be displayed.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
806 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
807 ;; In merging, the variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
808 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
809 ;; ediff-merge-window-share
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
810 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
811 ;; controls the split between window C (the window for the merge-buffer)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
812 ;; and the windows for buffers A and B. The default is 0.5. To make the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
813 ;; merge-buffer window smaller, reduce this amount. It is not recommended
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
814 ;; to increase the size of the merge-window to more than half the frame
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
815 ;; (i.e., to increase the default value of ediff-merge-window-share),
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
816 ;; since it is then hard to see the contents of buffers A and B.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
817 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
818 ;; The user can temporarily shrink the merge window to just one line by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
819 ;; typing `s'. This change is temporary, until Ediff finds a reason to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
820 ;; redraw the screen. Typing `s' again will restore the original window size.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
821 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
822 ;; With a positive prefix argument, this command will make the merge window
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
823 ;; slightly taller. This change will hold throughout the current Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
824 ;; session. With `-' or a negative prefix argument, the command `s' makes
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
825 ;; the merge window slightly shorter. This change also holds through the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
826 ;; entire current Ediff session.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
827 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
828 ;; Ediff lets the user automatically skip regions where one of the buffer's
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
829 ;; regions is prefered because it disagrees with the ancestor, while the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
830 ;; other buffer agrees with the ancestor. In this case, Ediff displays only
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
831 ;; the difference regions where the changes made to the original clash with
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
832 ;; each other. The variable that controls this behavior is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
833 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
834 ;; ediff-show-clashes-only
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
835 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
836 ;; The value of this variable can be toggled interactively, by typing `$'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
837 ;; Note that this variable controls only how Ediff chooses the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
838 ;; next/previous difference to show. The user can still jump directly to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
839 ;; any difference using the command `j' (with prefix argument specifying
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
840 ;; the difference number).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
841
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
842 ;; Version control support
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
843 ;; -----------------------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
844 ;; Ediff supports version control via vc.el (in the standard
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
845 ;; distribution of Emacs 19) and rcs.el. The latter is a package written by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
846 ;; Sebastian Kremer <sk@thp.Uni-Koeln.DE>, which is available in
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
847 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
848 ;; ftp.cs.buffalo.edu:pub/Emacs/rcs.tar.Z
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
849 ;; ftp.uni-koeln.de:/pub/gnu/emacs/rcs.tar.Z
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
850 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
851 ;; To specify which version control package you are using, set the variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
852 ;; ediff-version-control-package, e.g.,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
853 ;; (setq ediff-version-control-package 'rcs)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
854 ;; The default, is `vc'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
855 ;; Note: both packages provide access to RCS, but only vc.el comes standard
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
856 ;; with Emacs and XEmacs.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
857 ;; For files under revision control, one key (usually `=') is bound to the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
858 ;; function ediff-revision, which runs Ediff on the current buffer and one
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
859 ;; of its versions. Use the variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
860 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
861 ;; ediff-revision-key
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
862 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
863 ;; if you want to change this binding, e.g., (setq ediff-revision-key "\C-cD")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
864
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 ;;
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
866 ;; Mode line
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
867 ;; ---------
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
868 ;;
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
869 ;; When Ediff is running, the mode line of Ediff Control Panel buffer
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
870 ;; displays the current difference being displayed and the total number of
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
871 ;; difference regions in the two files.
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
872 ;;
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
873 ;; The mode line of the buffers being compared displays the type of the
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
874 ;; buffer (`A:' or `B:') and (usually) the file name. Ediff is trying to be
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
875 ;; intelligent in choosing mode line buffer identification. In particular,
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
876 ;; it works well with uniquify.el and mode-line.el packages (which improve
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
877 ;; on the default way in which Emacs displays buffer identification).
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
878 ;; If you don't like the way Ediff identifies its buffers, there is always
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
879 ;; ediff-prepare-buffer-hooks, which can be used to modify the mode line.
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
880 ;;
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
881 ;; Miscellaneous
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
882 ;; -------------
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
883 ;; The last batch of variables that can be modified is
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
885 ;; ediff-split-window-function
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
886 ;; ediff-merge-split-window-function
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
887 ;; ediff-make-wide-display-function
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888 ;; ediff-use-last-dir
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
889 ;; ediff-no-emacs-help-in-control-buffer
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
890 ;; ediff-toggle-read-only-function
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
891
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892 ;; ediff-split-window-function controls the way you want the window be
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
893 ;; split between file-A and file-B (and file-C, if applicable). It
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
894 ;; defaults to vertical split, but you can set it to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
895 ;; split-window-horizontally, if you want.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
896 ;; The variable ediff-merge-split-window-function controls how windows are
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
897 ;; split between buffers A and B in merging jobs.
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 ;; Ediff lets you toggle the way
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
900 ;; windows are split, so you can try different settings interactively.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
901 ;; Note: if file-A and file-B (and file-C, if applicable) are in different
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
902 ;; frames, windows are not split, regardless of the value
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
903 ;; ediff-split-window-function. Instead, other windows on these frames are
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
904 ;; deleted and Ediff starts displaying file-A/B/C using these
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
905 ;; frames, one file per frame. You can then switch to one-frame mode
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
906 ;; simply by hiding one of the buffers A/B/C.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
907 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
908 ;; Note that if Ediff detects that the two buffers it compares are residing in
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
909 ;; separate frames, it assumes that the user wants them to be so displayed
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
910 ;; and stops splitting windows. Instead, it will arrange each buffer to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
911 ;; occupy its own frame (possibly shared with Ediff's help window).
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
912 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
913 ;; The user can swap the windows in which buffers are displayed by typing `~'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
914 ;; Furthermore, the user can toggle wide/regular display by typing
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
915 ;; `m'. This is particularly useful when files are compared side-by-side.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
916 ;; By default, the display is widened without changing its height. However,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
917 ;; the user can set the variable
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
918 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
919 ;; ediff-make-wide-display-function
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
920 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
921 ;; to contain the name of a function to be called to widen the frame in
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
922 ;; which to display the buffers. See the documentation string for
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
923 ;; `ediff-make-wide-display-function' for details. It is also recommended
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
924 ;; to look into how the default function, `ediff-make-wide-display' is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
925 ;; written.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
926 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
927 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
928 ;; The variable ediff-use-last-dir controls the way Ediff presents the
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
929 ;; default directory when it prompts the user for files to compare. If nil,
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
930 ;; Ediff will use the default directory of the current buffer when it
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
931 ;; prompts the user for file names. Otherwise, it will use the
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
932 ;; directories it had previously used for file-A/B/C.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
933 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
934 ;; The variable ediff-no-emacs-help-in-control-buffer, if set to t, makes C-h
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
935 ;; behave like the DEL key, i.e., it will move you back to the previous
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
936 ;; difference rather than invoking help. This is useful when, in an xterm
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
937 ;; window or on a dumb terminal, the Backspace key is bound to C-h and is
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
938 ;; positioned more conveniently than the DEL key.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
939 ;;
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
940 ;; The variable ediff-toggle-read-only-function can be used to change the
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
941 ;; way Ediff toggles the read-only property in its buffers.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
942 ;; By default, Ediff uses toggle-read-only. For files under version
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
943 ;; control, Ediff first tries to check the files out.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
944
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
945
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
946 ;;; Commands
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
947 ;; --------
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
948
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
949 ;; All Ediff commands are displayed in a help window, unless you hit '?' to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 ;; shrink it to just one line. You can redisplay the help window by hitting
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
951 ;; '?' again.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
952 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
953 ;; Many Ediff commands take numeric prefix arguments. For instance, if you
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
954 ;; hit a number, N, and then `j' (ediff-jump-to-difference), Ediff will
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
955 ;; take you to Nth difference. Hitting a number, N, and then `ab'
7419
0d0a01a0310c Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7391
diff changeset
956 ;; (ediff-diff-to-diff) will copy Nth difference from buffer A to buffer B.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
957 ;; Hitting `ba' does copying in the other direction. Likewise, `ca' would
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
958 ;; copy from buffer C to buffer A (if buffer C exists, of course).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
959 ;; Likewise, a number, N, followed by `ra' will restore the Nth difference
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
960 ;; region in buffer A (if it was previously saved as a result of copying
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
961 ;; from buffer B to A).
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
962 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
963 ;; Without the prefix argument, all commands operate on the current
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
964 ;; difference region.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
965 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
966 ;; The total number of differences and the current difference number are
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
967 ;; always displayed in the mode line of the control window.
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
968 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
969 ;; If, after making changes to buffers A, B, or C, you decide to save them,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
970 ;; it is recommended to use `ediff-save-buffer', which is bound to `wa', `wb',
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
971 ;; and `wc' (`wa will save buffer A, `wb' saves buffer B, etc.).
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
972 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
973 ;; Typing `wd' saves the diff output in a file.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
974
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
975 ;; The command `s' is used only for merging. It allows the user to shrink
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
976 ;; window C to its minimal size, thereby exposing as much of buffers A and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
977 ;; B as possible.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
978 ;; This command is intended only for temporary viewing. Therefore, Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
979 ;; will restore the original window size for buffer C whenever window
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
980 ;; configuration is changed by the user (on toggling help, split,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
981 ;; etc.). However, recentering and jumping to a difference doesn't affect
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
982 ;; window C. Typing `s' again restores the original size of the merge
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
983 ;; window.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
984 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
985 ;; With a positive prefix argument, the command `s' makes the merge
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
986 ;; window, window C, slightly taller. With `-' or a negative prefix
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
987 ;; argument, `s' makes window C slightly shorter.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
988 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
989 ;; While browsing through differences in the merge mode, one may discover
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
990 ;; that the default variant was chosen inappropriately, which means that
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
991 ;; the user will have to do a lot of copying manually. To facilitate this,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
992 ;; there is a command, bound to `&', which will cause Ediff to start
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
993 ;; merging anew beginning with the current difference and using the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
994 ;; alternative default variant (the user is asked to type in the new
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
995 ;; default for merging, which can be either `default-A', `default-B', or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
996 ;; `combined'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
997 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
998 ;; Such repeated merging affects only difference regions that have
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
999 ;; default-A/B status, and only if they were not changed with respect to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1000 ;; their originals.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1001 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1002 ;; Another command that is used for merging only is `+'. Its effect is to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1003 ;; combine the current difference regions of buffers A and B and put the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1004 ;; combination into the merge buffer. See `ediff-combine-diffs' and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1005 ;; `ediff-combination-pattern' for details.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1006 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1007 ;; There is also one command the is not bound to any key:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1008 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1009 ;; ediff-revert-buffers-then-recompute-diffs
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1010 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1011 ;; It is useful when, after making changes, you decided to make a fresh
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1012 ;; start, or if at some point you changed the files being compared but want
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1013 ;; to discard any changes to comparison buffers that were done since then.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1014 ;; This command will ask for confirmation before reverting files. With a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1015 ;; prefix argument, it will revert files without asking.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1016
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1017 ;;; Heavy-duty customization:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1018 ;; -------------------------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1019
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1020 ;; Some users need to customize Ediff in rather sophisticated ways, which
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1021 ;; requires different defaults for different kinds of files (e.g., SGML, etc.).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1022 ;; Ediff supports this kind of customization is several ways.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1023 ;; First, most customization variables are buffer-local. Those that aren't
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1024 ;; are usually accessible from within Ediff Control Panel, so one can make
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1025 ;; thel local to the panel by calling make-local-variable from within
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1026 ;; ediff-startup-hooks.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1027 ;; Second, there is now a new optional (6-th) argument to ediff-setup,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1028 ;; which has the form ( (var-name-1 . val-1) (var-name-2 . val-2) ...).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1029 ;; The function ediff-setup will set the variables on the list to the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1030 ;; respective values in the ediff control buffer. This is an easy way to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1031 ;; throw in custom variables (which usually should be buffer-local) that
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1032 ;; can then be tested in various hooks.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1033 ;; Make sure the variable ediff-job-name and ediff-word-mode are set
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1034 ;; properly in this case, as some things in Ediff depend on this.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1035 ;; Finally, if custom-tailored help messages are desired, Ediff has
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1036 ;; ediff-brief-help-message-custom and ediff-long-help-message-custom,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1037 ;; which are local variables that can be either set to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1038 ;; a function that returns a string.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1039
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1040
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1041 ;;; Bugs:
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1042 ;; -----
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1043
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1044 ;; 1. The undo command doesn't restore deleted regions well. That is, if
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1045 ;; 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
1046 ;; `undo', the reinstated text will most likely be inserted outside of
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1047 ;; 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
1048 ;; doesn't seem to exist with XEmacs.)
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1049 ;;
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1050 ;; If at any point you feel that difference regions are no longer correct,
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1051 ;; you can hit '!' to recompute the differences.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1052
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1053 ;; 2. Emacs 19.xx, where xx < 23, has several bugs related to overlays and
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1054 ;; faces. Somethimes, these may cause highlighting of the refinements or
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1055 ;; of the unselected differences to disappear. Hitting `!' will bring them
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
1056 ;; back. In version 19.23 and later, these problems no longer occur.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1057
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1058 ;; 3. On a monochrome display, the repertoire of faces with which to
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1059 ;; highlight fine differences is limited. By default, Ediff is using
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1060 ;; underlining. However, if the region is already underlied by some other
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1061 ;; overlays, there is no simple way to temporarily remove that residual
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1062 ;; underlining. This problem occurs when a buffer is highlighted with
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1063 ;; hilit19.el or font-lock.el packages. If this residual highlighting gets
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1064 ;; in the way, you can do the following. Both font-lock.el and hilit19.el
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1065 ;; provide commands for unhighlighting buffers. You can either place these
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1066 ;; commands in `ediff-prepare-buffer-hooks' (which will unhighlight every
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1067 ;; buffer used by Ediff) or you can execute them interactively, at any time
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1068 ;; and on any buffer.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1069
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1070 ;; 4. In XEmacs (statically linked with Motif libraries), emerge.el
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1071 ;; and hence Ediff won't start, unless you set (setq scrollbar-width 0).
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1072 ;; This is a Motif-related bug, I was told.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1073
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1074 ;; 5. XEmacs 19.11 (and, probably, earlier versions) has trouble
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1075 ;; positioning the point withing Ediff buffers on Ediff's startup.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1076 ;; This doesn't get in the way, though, since when the user start looking
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1077 ;; at the diff regions, they are positioned correctly. It seems that
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1078 ;; XEmacs doesn't have enough time to redisplay windows---it does this
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1079 ;; correctly when it is told to redisplay (sit-for 0).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1080
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1081 ;; 6. It seems that XEmacs icons are insensitive to keyboard events. This
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1082 ;; deprives XEmacs users from being able to iconify Ediff's control panel,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1083 ;; thereby saving space onthe screen. Also, it seems that XEmacs doesn't
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1084 ;; let one create minibuffer-less frames, which leaves Ediff control Panel
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1085 ;; with a useless minibuffer. The "unsplittable" property is also ignored
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1086 ;; in XEmacs, some further minor annoyances are possible.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1087
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1088 ;; 7. XEmacs (19.11 and below) doesn't let one create minibufferless
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1089 ;; frames. This causes the problem that messages are displayed in a small
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1090 ;; control frame window, when help is toggled off. Ediff overcomes this by
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1091 ;; setting synchronize-minibuffers to t, which causes all messages to be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1092 ;; displayed in all minibuffers. If you detest this, set
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1093 ;; synchronize-minibuffers to nil after quitting Ediff.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1094
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1095
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1096 ;;; Change Log:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1097 ;; ----------
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1098
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1099 ;; Thu Feb 3, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1100
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1101 ;; Fixed a bug in ediff-setup-windows that caused control window to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1102 ;; appear in a wrong place when split-window-keep-point is nil
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1103 ;; (Thanks to Kevin Broadey <KevinB@bartley.demon.co.uk>.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1104 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1105 ;; Added mechanism for using faces instead of before/after flags. This
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1106 ;; looks much better on an X display, especially on a color one.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1107 ;; (Thanks to Boris Goldowsky <boris@cs.rochester.edu> for the code
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1108 ;; that led to ediff-highlight-diff.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1109 ;; Also, thanks to Kevin Esler <esler@ch.hp.com> for suggestions
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1110 ;; regarding highlighting differences on X displays.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1111 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1112 ;; Added functions to apply patches.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1113 ;; (Thanks to Kevin Broadey <KevinB@bartley.demon.co.uk> for this
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1114 ;; suggestion.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1115
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1116 ;; Fri Feb 4, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1117
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1118 ;; Added mechanism for toggling vertical/horizontal window split.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1119 ;; (Inspired by a suggestion from Allan Gottlieb
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1120 ;; <gottlieb@allan.ultra.nyu.edu> -- thanks.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1121 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1122 ;; Added mechanism for toggling between highlighting using faces and
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1123 ;; highlighting using ASCII flags.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1124 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1125 ;; Fixed a problem with undo. Now, Ediff has smartened up and doesn't
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1126 ;; keep undo info on ASCII flags inserted in buffer-A and buffer-B.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1127 ;; So, if you edit the files while browsing through them, undo behaves
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1128 ;; as you would expect, i.e., faces/flags don't get in the way.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1129
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1130 ;; Sun Feb 6, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1131
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1132 ;; Added horizontal scrolling. Added ediff-position-region to ensure
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1133 ;; that difference regions in buffer-A and buffer-B are aligned with
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1134 ;; each other. Disabled ediff-toggle-split when buffers are displayed
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1135 ;; in different frames.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1136 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1137 ;; Added toggle-window help (Suggested by Boris Goldowsky
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1138 ;; <boris@cs.rochester.edu>.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1139 ;; Added functions to copy differences from one buffer to another and to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1140 ;; recover old differences.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1141 ;; Added prefix arguments to ediff-next-difference and
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1142 ;; ediff-previous-difference.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1143
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1144 ;; Tue Feb 8, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1145
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1146 ;; Replaced text properties with overlays. Fixed ediff-setup-windows.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1147 ;; Added ediff-save-buffer to local-write-file-hooks to prevent user
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1148 ;; from saving corrupted states. (Thanks to <boris@cs.rochester.edu>
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1149 ;; for suggestion.) Instead, Ediff now has a pair of functions for
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1150 ;; safe saving of buffers.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1151 ;; Changed ediff-read-file-name to be more intuitive on ediff-files.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1152 ;; Added ediff-prepare-buffer-hooks. (Thanks to Kevin Esler
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1153 ;; <esler@ch.hp.com> for the idea.)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1154 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1155 ;; Cleanups in ediff-patch-file. Protected ediff-copy-diff against
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1156 ;; a bug that Emacs has in kill-region.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1157 ;;
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1158 ;; Added support for Lemacs. (Thanks to Alastair Burt
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1159 ;; <burt@dfki.uni-kl.de> for coercing Ediff into working under Lemacs.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1160 ;; Added ediff-kill-buffer-carefully and other suggestions by Boris
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1161 ;; Goldowsky <boris@cs.rochester.edu>.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1162 ;; Refined the protection against interference with highlighting caused
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1163 ;; by Hilit19. Added the variable ediff-third-party-highlighting.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1164 ;; Added mechanisn for unhighlighting regions highlighted with Hilit19
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1165 ;; before hightlighting them with Ediff's overlays. (And for
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1166 ;; rehighlighting them with Hilit19, when the current difference moves on.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1167
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1168 ;; Sun Feb 13, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1169
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1170 ;; Added ediff-place-flags-in-buffer and ediff-remote-exit, which are
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1171 ;; modifications of Emerge's similar functions. The difference is that
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1172 ;; in Ediff they make ediff-before-flag and ediff-after-flag into
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1173 ;; read-only regions, so the user can't change them by mistake.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1174 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1175 ;; Adopted a suggestion by Boris Goldowsky <boris@cs.rochester.edu>
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1176 ;; that led to a more elegant treatment of faces.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1177 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1178 ;; Added protection against interference with Font-Lock highlighting
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1179 ;; similar to that of Hilit19's protection.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1180
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1181 ;; Tue Feb 15, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1182
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1183 ;; Deleted spurious (auto-save-mode 1) in ediff-control-buffer, which
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1184 ;; was causing this buffer to be auto-saved for no good reason.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1185 ;; Added read-only protection to ediff-before/after-flags in Lemacs.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1186 ;; (Thanks to Alastair Burt <burt@dfki.uni-kl.de> for help in testing.)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1187 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1188 ;; Further fixes in the XEmacs part. Changed highlighted region in
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1189 ;; ediff-highlight-diff so that an extra character will be highlighted
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1190 ;; only if a difference is empty (thereby allowing the user to see where an
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1191 ;; insertion or a deletion has taken place).
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1192 ;;
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1193 ;; Simplified interaction with other highlighting packages by giving
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1194 ;; Ediff overlays the highest priority. (Taking a cue from
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1195 ;; ediff-highlight-diff-lemacs written by Alastair Burt
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1196 ;; <burt@dfki.uni-kl.de>.) Zapped ediff-third-party-highlighting
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1197 ;; variable and hooks that were previously used to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1198 ;; unhighlight/rehighlight buffers when hilit19/font-lock are on.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1199
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1200 ;; Fri Feb 18, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1201
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1202 ;; Added a bit more sophistication to ediff-read-file-name. Now,
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1203 ;; ediff-files remembers both, the file-A and the file-B directories.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1204 ;; They are offered as defaults when ediff-use-last-dir is set to t.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1205
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1206 ;; Fri Feb 22, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1207
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1208 ;; Added ediff-before-change-guard to remove ASCII highlighting when
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1209 ;; the user attempts to change buffer-A/B. This is needed because
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1210 ;; otherwise the undo info may become screwed up in those buffers.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1211 ;; Hitting `h' (ediff-toggle-hilit) on a dumb terminal will toggle
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1212 ;; between ASCII highlighting and no highlighting.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1213
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1214 ;; Fri Feb 24, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1215
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1216 ;; Fixed problems with multiple Ediff sessions running simultaneously.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1217
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1218 ;; Tue Mar 1, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1219
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1220 ;; Added vc-ediff, the Ediff interface to vc.el. (Thanks to Eric
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1221 ;; Freudenthal <freudent@jan.ultra.nyu.edu> for contributing this
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1222 ;; function.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1223
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1224 ;; Sun Mar 6, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1225
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1226 ;; Added rcs-ediff, an Ediff interface to RCS via rcs.el. (Thanks to
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1227 ;; Alastair Burt <burt@dfki.uni-kl.de>.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1228 ;; Some minor improvements.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1229
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1230 ;; Tue March 15, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1231
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1232 ;; Fixed a buglet in defining ediff-current-diff-face-A/B.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1233 ;; (Thanks to Job Ganzevoort <Job.Ganzevoort@cwi.nl>.)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1234
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1235 ;; Tue March 22, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1236
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1237 ;; Fixed a bug with ediffing narrowed buffers, reported by Kevin
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1238 ;; Broadey <KevinB@bartley.demon.co.uk>.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1239 ;; Made Ediff to work with files that have incomplete last line.
7391
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
1240 ;; Made Ediff execute diff and patch using Bourne Shell, which
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1241 ;; should eliminate problems with $prompt that some people had.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1242
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1243 ;; Thu March 24, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1244
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1245 ;; Achieved quadratic speedup in the size of the file by replacing the
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1246 ;; slow goto-line by forward-line.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1247 ;; Converted demarkation of difference regions
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1248 ;; from markers to overlays. This will later allow us to highlight all
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1249 ;; diffs, not just the current one.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1250
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1251 ;; Wed March 30, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1252
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1253 ;; Under X, Ediff now highlights all differences in dim colors and the
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1254 ;; current difference in bright colors. Improved XEmacs support.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1255 ;; Changed toggle hilit to cycle through 3 states: highlighting all
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1256 ;; diffs, highlighting only the current diff, and highlighting using
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1257 ;; ASCII flags.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1258 ;; Added support for difference regions that are not full lines.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1259
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1260 ;; Fri April 1, 1994
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1261
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1262 ;; Fixed bugs related to writing buffers A and B.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1263 ;; Added commands `ga', `gb' to jump directly to the closest diff in
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1264 ;; buffer A and B, respectively.
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1265
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1266 ;; Fri April 11, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1267
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1268 ;; Added `ediff-update-diffs', a function that lets the user recompute
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1269 ;; difference regions after extensive editing done to buffers A and B
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1270 ;; (bound to `!').
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1271
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1272 ;; Wed April 13, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1273
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1274 ;; Added the new feature: refining the current difference region.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1275 ;; This would highlight the precise differences between the regions in
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1276 ;; buffer A and B. (A way to implement this was suggested by Boris
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1277 ;; Goldowsky <boris@cs.rochester.edu>.)
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1278 ;;
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1279 ;; Fixed Ediff to be immune to several different versions of rcs.el
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1280 ;; that are currently in distribution.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1281
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1282 ;; Thu April 14, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1283
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1284 ;; Ediff now respects X resources for the faces it uses. It no longer
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1285 ;; barks when the colormap has no colors it is using; or when face
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1286 ;; fonts can't be italicized, etc.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1287
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1288 ;; Fri April 15, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1289
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1290 ;; Changed `ediff-setup-windows' to minimize the need to delete and
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1291 ;; create windows. Now jumps faster from diff to diff.
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1292 ;; Added Ediff to the File menu on the menu bar (FSF's version).
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1293
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1294 ;; Mon April 18, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1295
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1296 ;; Fixed to work with OS/2's PM-Emacs.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1297
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1298 ;; Thu April 21, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1299
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1300 ;; Lemacs' menus added (thanks to Alastair Burt for the help).
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1301
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1302 ;; Wed April 28, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1303
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1304 ;; Fixed ediff-keep-window-config (thanks to Norbert Kiesel
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1305 ;; <norbert@i3.informatik.rwth-aachen.de>), ediff-shell and
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1306 ;; ediff-protect-metachars (thanks to Richard Stanton
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1307 ;; <stanton@haas.berkeley.edu>). Made access to difference
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1308 ;; overlays structure-independent, making it less bug-prone.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1309 ;; Patched ediff-read-file-name to work more intuitively with directory
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1310 ;; names (thanks to Kevin Broadey <KevinB@bartley.demon.co.uk>).
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1311
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1312 ;; Mon May 2, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1313
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1314 ;; Added `ediff-frame-has-menubar' to guard against the possibility that
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1315 ;; the current frame has no menu bar.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1316
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1317 ;; Fri May 6, 1994
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1318
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1319 ;; Fixed buglet in vc-ediff (thanks to Ray Nickson <nickson@cs.uq.oz.au>).
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1320
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
1321 ;; Wed May 18, 1994
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
1322
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
1323 ;; Modified ediff-read-file-name to not put long file names in the
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
1324 ;; default prompt area, as suggested by KevinB@bartley.demon.co.uk.
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
1325 ;; Applied patch supplied by burt@dfki.uni-kl.de, fixing a problem with
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
1326 ;; ediff-diff-to-diff in Lemacs.
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
1327
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
1328 ;; Tue May 31, 1994
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
1329
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
1330 ;; Added ediff-forward-word-function (as suggested by Job Ganzevoort
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
1331 ;; <Job.Ganzevoort@cwi.nl>). Modified ediff-default-quit-hook so it
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
1332 ;; will clean things up in a more satisfactory way.
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
1333
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
1334 ;; Thu Jun 2, 1994
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
1335
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
1336 ;; Added `ediff-toggle-regexp-match', which allows the user to step
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
1337 ;; through only those difference regions that match some regexp; or,
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
1338 ;; vice versa, to skip over regions that match a regexp. (This feature
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
1339 ;; was suggested by Andy Scott <ascott@pcocd2.intel.com>.)
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
1340 ;; Added ediff-eval-in-buffer, which is a modified emerge-eval-in-buffer.
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
1341 ;; The function ediff-status-info, bound to `i', now replaces and extends
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
1342 ;; ediff-file-names and ediff-line-numbers, which were bound to `f'
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
1343 ;; and `i', respectively.
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
1344
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
1345
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
1346 ;; Wed Jun 10, 1994
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
1347
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
1348 ;; Improved `ediff-read-file-name' and `ediff-buffers' so they are now
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
1349 ;; providing more intuitive defaults. Modified `ediff-read-file-name'
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
1350 ;; so it won't cause problems under OS/2.
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
1351
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
1352 ;; Fri Jun 24, 1994
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
1353
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
1354 ;; Modified ediff-find-file, ediff-files-internal, and made
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
1355 ;; emerge-verify-file-buffer into ediff-verify-file-buffer so that
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
1356 ;; Ediff will work correctly with remote and compressed
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
1357 ;; files. (Suggested by Sandy Rutherford <sandy@ibm550.sissa.it>.)
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
1358
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
1359 ;; Fri Jun 28, 1994
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
1360
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
1361 ;; Fixed ediff-patch-files to work with remote and compressed files.
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
1362
8348
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1363 ;; Wed July 20, 1994
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1364
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1365 ;; Changed menu bar items per RMS's suggestion. Changed odd/even faces
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1366 ;; in Lemacs to italic. Changed ediff-*-face-* variables so that they
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1367 ;; will contain names of faces instead of the face internal
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1368 ;; representation. (Copy-face works better with face names than with
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1369 ;; face internal representation. With face internal representation, if
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1370 ;; a face vector mentions a font explicitly, copy-face may attempt to
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1371 ;; copy this font, which would cause an error if the font has a wrong
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1372 ;; size for one of the existing frames.) Improved the way
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1373 ;; mode-line-buffer-identification is set in ediff-setup so that Ediff
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1374 ;; will accommodate the way buffers are identified in mode-line.el and
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1375 ;; uniquify.el.
bf950cbd542c Made menu bar's autoloaded stuff conditional on
Richard M. Stallman <rms@gnu.org>
parents: 8303
diff changeset
1376
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1377 ;; Fri August 5, 1994
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1378
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1379 ;; Ediff can now automatically skip over regions that differ only in
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1380 ;; the white space and line breaks. This is controled with the variable
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1381 ;; `ediff-ignore-similar-regions' and can be toggled on/off by typing
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1382 ;; `##'.
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1383
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1384 ;; Mon August 8, 1994
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1385
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1386 ;; If ediff-save-buffer is invoked with `wd', it'll save the diff
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1387 ;; output in a file.
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1388
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1389 ;; Wed August 24, 1994
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1390
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1391 ;; Fixed ediff-toggle-read-only and ediff-patch-file so that they will
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1392 ;; check out version-controled files before modifying them. This will
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1393 ;; permit checking the modified versions back in. In earlier
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1394 ;; versions, such modifications could be lost, unless the user takes
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1395 ;; special care of preserving them.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1396
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1397 ;; Tue August 30, 1994
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1398
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1399 ;; Added ediff-submit-report.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1400 ;; Introduced ediff-revision as a uniform way of calling vc.el and
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1401 ;; rcs.el. This is controled by ediff-version-control-package
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1402 ;; variable. Functions vc-ediff, rcs-ediff are replaced by their
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1403 ;; internal versions.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1404 ;; Added ediff-find-file-name-handler function to smooth out the
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1405 ;; transition from Emacs 19.22/XEmacs 19.9 to 19.23/19/10
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1406
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1407 ;; Thu September 1, 1994
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1408
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1409 ;; Made ediff-overlay-put and ediff-move-overlay into bona fide
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1410 ;; functions (rather than fset symbols). These now check if overlay's
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1411 ;; buffer is alive. If not, overlay is deleted. This overcomes some of
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1412 ;; the problems with Lemacs.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1413
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1414 ;; Thu September 8, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1415
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1416 ;; Added ediff-revision-key, ediff-load-version-control and streamlined
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1417 ;; vc/rcs-ediff[-internal]. Eliminated dependency on emerge.el.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1418
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1419 ;; Fri September 23, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1420
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1421 ;; Added ediff-windows and ediff-regions.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1422 ;; Changed ediff-setup-windows and related procedures to create
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1423 ;; a separate dedicated control frame for each invocation of Ediff.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1424
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1425 ;; Tue September 27, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1426
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1427 ;; Added redraw-display everywhere before creating or deleting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1428 ;; frames. It appears that this cures Emacs' bug where it trashes some
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1429 ;; fonts which leads to crashes. Also, some code cleanups and bug fixes.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1430
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1431 ;; Fri September 30, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1432
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1433 ;; Fixed ediff-update-diffs so it'll work correctly with
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1434 ;; ediff-windows and ediff-regions. Added narrowing and widening to the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1435 ;; suite of commands available for ediff-windows and ediff-regions.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1436
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1437 ;; Fri October 7, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1438
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1439 ;; Changed ediff-setup-windows to funcall the actual window setting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1440 ;; function, which is either ediff-setup-windows-multiframe or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1441 ;; ediff-setup-windows-plain. Changed all temp file names to use `_'
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1442 ;; instead of `.'. Presumably, this makes VMS happier.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1443 ;; Ported to VMS (thanks to Richard Levitte <levitte@e.kth.se>).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1444 ;; Added ediff-prefer-long-help-message and changed defaults.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1445 ;; Fighting with XEmacs bugs. Made it possible to switch between plain
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1446 ;; and multiframe display easier, but XEmacs is still getting confused
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1447 ;; at times. Added ediff-check-version and ediff-set-help-message.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1448 ;; Made more sensible temp file names, which is important when
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1449 ;; generating context diffs. Added ediff-make-frame-position and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1450 ;; ediff-control-frame-position-function.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1451
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1452 ;; Wed October 12, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1453
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1454 ;; ediff-window-visible-p now makes a call to ediff-frame-visible-p
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1455 ;; only when window-system is non-nil. Rearranged the block of fset's
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1456 ;; so that the wrong things won't be defined when window-system is nil.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1457 ;; Added ediff-revert-buffers-then-recompute-diffs function.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1458 ;; Removed flag-argument from a background call to shell-command.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1459 ;; Added ediff-shell-command to enable custom diff execute in the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1460 ;; background and insert output in ediff-custom-diff-buffer.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1461 ;; Added ediff-shell-command-filter, because XEmacs doesn't have it.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1462 ;; Made ediff-revision set up ediff-job-name to `ediff-revision'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1463 ;; This enables users do ediff-revision-specific actions on exiting
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1464 ;; Ediff using ediff-quit-hooks.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1465 ;; Reshaffled some fset's so that functions for checking color and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1466 ;; faces won't be touched on a non-windowing display.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1467
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1468 ;; Thu October 20, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1469
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1470 ;; Modified ediff-make-fine-diffs so that no fine diffs are computed if
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1471 ;; one of the diff regions is empty. Saves time and also works around
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1472 ;; the buggy diff program in AIX.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1473 ;; ediff no longer loads the version control package
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1474 ;; automatically---only when ediff-revision is called.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1475 ;; Enabled focusing/hiding diff regions that match both or just one of the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1476 ;; regexps.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1477 ;; Changed ediff-regions to ediff-small-regions. Added ediff-large-regions.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1478 ;; Modified ediff-next/previous-difference to work right when both
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1479 ;; skipping regexp matches and skipping similar regions is enabled.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1480 ;; Fixed bugs in positioning the control frame.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1481
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1482 ;; Fri October 28, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1483
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1484 ;; Fixed bugs in ediff-next/previous-difference, ediff-set-visible-region
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1485 ;; Changed/added ediff-word-[1-4].
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1486
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1487 ;; Tue November 1, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1488
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1489 ;; Made ediff-revision delete the temporary version files it creates.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1490
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1491 ;; Tue November 29, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1492
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1493 ;; Added ediff-swap-buffers. Split ediff-difference-vector into
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1494 ;; ediff-difference-vector-A and ediff-difference-vector-B, which
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1495 ;; allowed to factor out a lot of stuff.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1496 ;; Made the code buffer-C ready.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1497
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1498 ;; Thu December 1, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1499
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1500 ;; Lotsa bug fixes. Further rationalized the code.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1501 ;; Added ediff-display-help-hooks, ediff-mode-hooks.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1502 ;; Replaced almost identical ediff-scroll-up/down with
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1503 ;; ediff-scroll-vertically.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1504 ;; Replaced almost identical ediff-scroll-left/right with
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1505 ;; ediff-scroll-horizontally.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1506 ;; Made the code buffer-C ready.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1507
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1508 ;; Thu December 8, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1509
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1510 ;; Added ediff-toggle-wide-display. In plain display, help message is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1511 ;; now centered correctly.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1512
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1513 ;; Fri December 9, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1514
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1515 ;; Added ediff-toggle-multiframe (it doesn't work with XEmacs for some
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1516 ;; reason). Fixed ediff-pop-diff and ediff-copy-diff, so that they will
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1517 ;; invoke auto-refining, if necessary.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1518
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1519 ;; Mon December 12, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1520
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1521 ;; Modified ediff-toggle-wide-display so it would funcall
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1522 ;; ediff-make-wide-display-function.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1523
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1524 ;; Tue December 13, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1525
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1526 ;; Ediff now chooses its surrogate minibuffer from frame A.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1527
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1528 ;; Mon December 20, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1529
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1530 ;; Added ediff-keymap-setup-hooks.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1531
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1532 ;; Fri December 23, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1533
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1534 ;; Changed the representation in ediff-killed-diffs-alist so that
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1535 ;; ediff-save-diff-region and ediff-pop-diff won't be confused when the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1536 ;; user swaps buffers.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1537
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1538 ;; Mon December 26, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1539
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1540 ;; Placated OS/2 by making Ediff to synchronize the call to startup
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1541 ;; hooks with the acynchronous process that computes custom diffs.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1542 ;; This has no effect on Unix installations (and VMS?), but
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1543 ;; may increase Ediff's startup time under OS/2 by 1 or 2 seconds.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1544
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1545 ;; Thu December 29, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1546
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1547 ;; ediff-recenter now deactivates the mark, so that transient mark mode
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1548 ;; highlighting won't interfere with Ediff's highlighting.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1549 ;; Also, ediff-recenter tries to not deiconify control frame, if it is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1550 ;; not needed.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1551
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1552 ;; Fri December 30, 1994
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1553
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1554 ;; Small bugs. Worked around the OS/2 bug where
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1555 ;; modify-frame-parameters has no effect on iconified frames. Ediff
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1556 ;; now remembers the iconification status of the control frame and uses
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1557 ;; it as a preferred way of displaying it when help is toggled
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1558 ;; off. (This can be observed only in Emacs (not XEmacs) and only if
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1559 ;; the window manager lets icons accept keyboard input.)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1560
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1561 ;; Tue January 3, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1562
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1563 ;; Some futher work on incorporating buffer C in ediff-extract-diffs,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1564 ;; ediff-focus/hide-on-regexp-matches, and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1565 ;; ediff-setup-windows-plain/multiframe. The preceding two functions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1566 ;; now dispatch the appropriate setup function depending on whether the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1567 ;; current job is comparison or merge.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1568
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1569 ;; Wed January 4, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1570
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1571 ;; Made it work under Emacs built without the X support.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1572
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1573 ;; Fri January 6, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1574
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1575 ;; Slightly changed the prompting behavior of ediff-files. Bug fix in
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1576 ;; mode-line-buffer-identification.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1577
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1578 ;; Wed January 18, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1579
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1580 ;; Added 3way comparison and support for diff3. Ported to NeXTStep
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1581 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1582 ;; Fri January 20, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1583
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1584 ;; Added ediff-merge-files, ediff-merge-buffers,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1585 ;; ediff-merge-files-with-ancestor, ediff-merge-buffers-with-ancestor,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1586 ;; ediff-merge-revisions, ediff-merge-revisions-with-ancestor.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1587
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1588 ;; Tue January 24, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1589
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1590 ;; Bug fixes. Split into several files.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1591
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1592 ;; Thu January 26, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1593
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1594 ;; `*' is now bound to ediff-make-or-kill-fine-diffs. This lets the
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1595 ;; user to kill fine diffs for the current region (by providing a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1596 ;; negative prefix arg), if there are so many of them as to hamper
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1597 ;; the viewing.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1598
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1599 ;; Mon January 30, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1600
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1601 ;; Changed ediff-selective-display to ediff-set-visible-region,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1602 ;; ediff-toggle-selective-display to ediff-toggle-narrow-region.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1603 ;; Ediff now turns selective display off before starting. Restores
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1604 ;; selective display on exit.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1605 ;; In 2-way comparison, `a' now copies to buf `b' and `b' to buf `a'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1606 ;; Previously, the bindings were `ab' and `ba'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1607
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1608 ;; Wed February 1, 1995
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1609
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1610 ;; Added ediff-undo-selective-display (thanks to Stig <stig@inse.com>).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1611 ;; Rearranged autoloads. Renamed ediff-entry.el into ediff.el and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1612 ;; ediff.el into ediff-util.el.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1613
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1614 ;; Fri February 3
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1615
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1616 ;; Added ediff-toggle-show-clashes-only, which is bound to `$'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1617
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1618 ;; Fri February 19
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1619
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1620 ;; Some minor patches from Stig. Also, made ediff-xemacs-p and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1621 ;; ediff-*-job into variables for better performance.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1622 ;; In ediff-setup, diff regions are now computed after buffers A/B/C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1623 ;; are set up. Previously, it didn't work right with selective display.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1624 ;; Also, added ediff-profile to time Ediff commands and
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1625 ;; ediff-debug-info for civilized display of the difference vectors
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1626 ;; (and possibly more in the future).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1627
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1628 ;; Tue March 14
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1629
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1630 ;; Fixed ediff-diff-at-point.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1631
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1632
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1633 ;;; TO DO:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1634 ;; ------
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1635 ;;
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1636 ;; 1. Add support for multiple sessions. (At present, one can run
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1637 ;; multiple Ediff sessions, but they won't be related.) The idea is to
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1638 ;; have vars local to each control buffer, which will tell which buffer is
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1639 ;; the next and which is the previous one. The user could then go forward
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1640 ;; and backward by typing C-SPC and C-DEL (or C-n and C-p).
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1641 ;; This will probably entail some minor modifications to ediff-setup.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1642 ;; The primary use of this feature would be comparing directories of
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1643 ;; similarly named files and multi-file patch. For the latter, Ediff will
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1644 ;; have to parse patches to extract the names of files.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1645
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1646
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1647 ;;; Acknowledgements:
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1648
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1649 ;; Special thanks to Alastair Burt <burt@dfki.uni-kl.de>, Kevin Broadey
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1650 ;; <KevinB@bartley.demon.co.uk>, Harald Boegeholz
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1651 ;; <hwb@machnix.mathematik.uni-stuttgart.de>, Jin S. Choi" <jin@atype.com>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1652 ;; Eric Eide <eeide@asylum.cs.utah.edu>, Kevin Esler <esler@ch.hp.com>, Robert
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1653 ;; Estes <estes@ece.ucdavis.edu>, Eric Freudenthal
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1654 ;; <freudent@jan.ultra.nyu.edu>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1655 ;; Job Ganzevoort <Job.Ganzevoort@cwi.nl>, Boris Goldowsky
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1656 ;; <boris@cs.rochester.edu>, Allan Gottlieb <gottlieb@allan.ultra.nyu.edu>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1657 ;; Xiaoli Huang <hxl@epic.com>, Larry Gouge <larry@itginc.com>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1658 ;; irvine@lks.csi.com, jaffe@chipmunk.cita.utoronto.ca, David Karr
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1659 ;; <dkarr@nmo.gtegsc.com>, Norbert Kiesel
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1660 ;; <norbert@i3.informatik.rwth-aachen.de>, Fritz Knabe <Fritz.Knabe@ecrc.de>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1661 ;; Heinz Knutzen <hk@informatik.uni-kiel.d400.de>, Ken Laprade
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1662 ;; <laprade@dw3f.ess.harris.com>, Richard Levitte
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1663 ;; <levitte@e.kth.se>, Martin Maechler <maechler@stat.math.ethz.ch>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1664 ;; Richard Mlynarik <mly@adoc.xerox.com>, Chris Murphy
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1665 ;; <murphycm@sun.aston.ac.uk>, Eyvind Ness <Eyvind.Ness@hrp.no>, Ray Nickson
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1666 ;; <nickson@cs.uq.oz.au>, Paul Raines <raines@slac.stanford.edu>, Tibor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1667 ;; Polgar <tlp00@spg.amdahl.com>, C.S. Roberson <roberson@aur.alcatel.com>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1668 ;; Kevin Rodgers <kevin.rodgers@ihs.com>, Sandy Rutherford
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1669 ;; <sandy@ibm550.sissa.it>, Heribert Schuetz <schuetz@ecrc.de>, Andy Scott
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1670 ;; <ascott@pcocd2.intel.com>, Axel Seibert
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1671 ;; <axel@tumbolia.ppp.informatik.uni-muenchen.de>, Richard Stallman
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1672 ;; <rms@gnu.ai.mit.edu>, Richard Stanton <stanton@haas.berkeley.edu>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1673 ;; Ake Stenhoff <etxaksf@aom.ericsson.se>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1674 ;; Stig <stig@hackvan.com>, Peter Stout <Peter_Stout@cs.cmu.edu>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1675 ;; Raymond Toy <toy@rtp.ericsson.se>,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1676 ;; and Ilya Zakharevich <ilya@math.ohio-state.edu>
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1677 ;; for contributing ideas, patches, and bug reports.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1678 ;;
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1679 ;; Thanks also to many others who felt obliged to drop a thank you note.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1680
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1681
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1682 ;;; Code:
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1683
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1684 (require 'ediff-init)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1685
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1686 (defvar ediff-version-control-package 'vc
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1687 "Version control package used.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1688 Currently, Ediff supports vc.el and rcs.el. Set this to `rcs' if you have
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1689 rcs.el and want to use it instead of the standard vc.el.
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1690
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1691 Note: both packages provide access to RCS, but only vc.el comes with Emacs
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1692 distribution.")
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1693
11760
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
1694 (defvar ediff-revision-key nil
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1695 "Key to which `ediff-revision' is to be bound.")
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1696
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1697 (defvar ediff-use-last-dir nil
7419
0d0a01a0310c Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7391
diff changeset
1698 "*If t, Ediff uses previous directory as default when reading file name.")
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1699
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1700 (defvar ediff-last-dir-A nil
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1701 "Last directory used by an Ediff command for file-A.")
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1702 (defvar ediff-last-dir-B nil
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1703 "Last directory used by an Ediff command for file-B.")
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1704 (defvar ediff-last-dir-C nil
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1705 "Last directory used by an Ediff command for file-C.")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1706 (defvar ediff-last-dir-ancestor nil
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1707 "Last directory used by an Ediff command for the ancestor file.")
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
1708 (defvar ediff-last-dir-patch nil
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
1709 "Last directory used by an Ediff command for file to patch.")
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1710
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1711 ;;; Patching
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1712
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1713 ;;;###autoload
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
1714 (defun ediff-patch-file (source-filename &optional startup-hooks)
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1715 "Run Ediff by patching FILE-TP-PATCH."
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
1716 (interactive
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
1717 (list (ediff-read-file-name "File to patch"
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
1718 (if ediff-use-last-dir
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
1719 ediff-last-dir-patch
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
1720 default-directory)
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
1721 nil)))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1722
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1723 (setq source-filename (expand-file-name source-filename))
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
1724 (ediff-get-patch-buffer (file-name-directory source-filename))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1725
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
1726 (let* ((backup-extension
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
1727 ;; if the user specified a -b option, extract the backup
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1728 ;; extension from there; else use `_orig'
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
1729 (substring ediff-patch-options
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
1730 (if (string-match "-b[ \t]+" ediff-patch-options)
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
1731 (match-end 0) 0)
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
1732 (if (string-match "-b[ \t]+[^ \t]+" ediff-patch-options)
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
1733 (match-end 0) 0)))
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
1734 (shell-file-name ediff-shell)
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
1735 ;; ediff-find-file may use a temp file to do the patch
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
1736 ;; so, we save source-filename and true-source-filename as a var
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
1737 ;; that initially is source-filename but may be changed to a temp
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
1738 ;; file for the purpose of patching.
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
1739 (true-source-filename source-filename)
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
1740 (target-filename source-filename)
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
1741 target-buf buf-to-patch file-name-magic-p)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1742
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1743 ;; if the user didn't specify a backup extension, use _orig
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1744 (if (string= backup-extension "")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1745 (setq backup-extension "_orig"))
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
1746
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
1747 ;; Make a temp file, if source-filename has a magic file handler (or if
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
1748 ;; it is handled via auto-mode-alist and similar magic).
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
1749 ;; Check if there is a buffer visiting source-filename and if they are in
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
1750 ;; synch; arrange for the deletion of temp file.
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
1751 (ediff-find-file 'true-source-filename 'buf-to-patch
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
1752 'ediff-last-dir-patch 'startup-hooks)
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
1753
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
1754 ;; Check if source file name has triggered black magic, such as file name
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
1755 ;; handlers or auto mode alist, and make a note of it.
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1756 ;; true-source-filename should be either the original name or a
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1757 ;; temporary file where we put the after-product of the file handler.
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1758 (setq file-name-magic-p (not (equal (file-truename true-source-filename)
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
1759 (file-truename source-filename))))
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
1760
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1761 ;; Checkout orig file, if necessary so that the patched file could be
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1762 ;; checked back in.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1763 (ediff-toggle-read-only buf-to-patch)
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1764
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1765 (ediff-eval-in-buffer ediff-patch-diagnostics
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1766 (message "Applying patch ... ")(sit-for 0)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1767 ;; always pass patch the -f option, so it won't ask any questions
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1768 (shell-command-on-region
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1769 (point-min) (point-max)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1770 (format "%s -f %s -b %s %s"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1771 ediff-patch-program ediff-patch-options
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1772 backup-extension
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1773 (expand-file-name true-source-filename))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1774 t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1775 (message "Applying patch ... done")(sit-for 0)
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
1776 (switch-to-buffer ediff-patch-diagnostics)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1777 (sit-for 0) ; synchronize
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
1778
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1779 (or (file-exists-p (concat true-source-filename backup-extension))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1780 (error "Patch failed or didn't modify the original file"))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1781
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
1782 ;; If black magic is involved, apply patch to a temp copy of the
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1783 ;; file. Otherwise, apply patch to the orig copy. If patch is applied
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1784 ;; to temp copy, we name the result old-name_patched for local files
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1785 ;; and temp-copy_patched for remote files. The orig file name isn't
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1786 ;; changed, and the temp copy of the original is later deleted.
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
1787 ;; Without magic, the original file is renamed (usually into
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1788 ;; old-name_orig) and the result of patching will have the same name as
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1789 ;; the original.
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
1790 (if (not file-name-magic-p)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1791 (ediff-eval-in-buffer buf-to-patch
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1792 (set-visited-file-name (concat source-filename backup-extension))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1793 (set-buffer-modified-p nil))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1794
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1795 ;; Black magic in effect.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1796 ;; If orig file was remote, put the patched file in the temp directory.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1797 ;; If orig file is local, put the patched file in the directory of
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1798 ;; the orig file.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1799 (setq target-filename
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1800 (concat
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1801 (if (ediff-file-remote-p (file-truename source-filename))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1802 true-source-filename
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1803 source-filename)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1804 "_patched"))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1805
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
1806 (rename-file true-source-filename target-filename t)
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
1807
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
1808 ;; arrange that the temp copy of orig will be deleted
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1809 (rename-file (concat true-source-filename backup-extension)
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
1810 true-source-filename t))
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
1811
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
1812 ;; make orig buffer read-only
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1813 (setq startup-hooks
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1814 (cons 'ediff-toggle-read-only-patch-orig startup-hooks))
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1815
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
1816 ;; set up a buf for the patched file
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
1817 (ediff-eval-in-buffer
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1818 (setq target-buf (find-file-noselect target-filename))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1819 ;; files to be patched are always checked out first
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1820 (setq ediff-file-checked-out-flag 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
1821
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1822 (ediff-buffers buf-to-patch target-buf startup-hooks 'epatch)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1823
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
1824 (bury-buffer ediff-patch-diagnostics)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1825 (message "Patch diagnostics available in buffer %s"
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
1826 (buffer-name ediff-patch-diagnostics))))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1827
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1828 (defun ediff-toggle-read-only-patch-orig ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1829 "Used as a startup hook to set `_orig' patch file read-only."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1830 (ediff-toggle-read-only ediff-buffer-A))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1831
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1832 ;;;###autoload
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1833 (defalias 'epatch 'ediff-patch-file)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1834 ;;;###autoload
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1835 (defalias 'epatch-buffer 'ediff-patch-buffer)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1836
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1837 ;;; Compare files/buffers
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1838
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1839 ;;;###autoload
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1840 (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
1841 "Run Ediff on a pair of files, FILE-A and FILE-B."
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1842 (interactive
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1843 (let ((dir-A (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1844 ediff-last-dir-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1845 default-directory))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1846 dir-B f)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1847 (list (setq f (ediff-read-file-name "File A to compare" dir-A nil))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1848 (ediff-read-file-name "File B to compare"
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1849 (setq dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1850 (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1851 ediff-last-dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1852 (file-name-directory f)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1853 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1854 (setq file-name-history
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1855 (cons (abbreviate-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1856 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1857 (file-name-nondirectory f)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1858 dir-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1859 file-name-history))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1860 f))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1861 )))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1862 (ediff-files-internal file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1863 (if (file-directory-p file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1864 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1865 (file-name-nondirectory file-A) file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1866 file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1867 nil ; file-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1868 startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1869 'ediff-files))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1870
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1871 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1872 (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
1873 "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
1874 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1875 (let ((dir-A (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1876 ediff-last-dir-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1877 default-directory))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1878 dir-B dir-C f ff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1879 (list (setq f (ediff-read-file-name "File A to compare" dir-A nil))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1880 (setq ff (ediff-read-file-name "File B to compare"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1881 (setq dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1882 (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1883 ediff-last-dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1884 (file-name-directory f)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1885 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1886 (setq file-name-history
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1887 (cons
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1888 (abbreviate-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1889 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1890 (file-name-nondirectory f)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1891 dir-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1892 file-name-history))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1893 f)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1894 (ediff-read-file-name "File C to compare"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1895 (setq dir-C (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1896 ediff-last-dir-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1897 (file-name-directory ff)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1898 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1899 (setq file-name-history
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1900 (cons (abbreviate-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1901 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1902 (file-name-nondirectory ff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1903 dir-C))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1904 file-name-history))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1905 ff))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1906 )))
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1907 (ediff-files-internal file-A
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1908 (if (file-directory-p file-B)
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1909 (expand-file-name
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1910 (file-name-nondirectory file-A) file-B)
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
1911 file-B)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1912 (if (file-directory-p file-C)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1913 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1914 (file-name-nondirectory file-A) file-C)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1915 file-C)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1916 startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1917 'ediff-files3))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1918
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1919 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1920 (defalias 'ediff3 'ediff-files3)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1921
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1922
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1923 (defun ediff-find-file (file-var buffer-name &optional last-dir hooks-var)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1924 "Visit FILE and arrange its buffer to Ediff's liking.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1925 FILE is actually a variable symbol that must contain a true file name.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1926 BUFFER-NAME is a variable symbol, which will get the buffer object into which
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1927 FILE is read. LAST-DIR is the directory variable symbol where FILE's
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1928 directory name should be returned. HOOKS is a variable symbol that will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1929 assigned the hook to be executed after `ediff-startup' is finished.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1930 `ediff-find-file' arranges that the temp files it might create will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1931 deleted."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1932 (let* ((file (symbol-value file-var))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1933 (file-magic (ediff-find-file-name-handler file))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1934 (temp-file-name-prefix (file-name-nondirectory file)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1935 (if (not (file-readable-p file))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1936 (error "File `%s' does not exist or is not readable" file))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1937
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1938 ;; some of the command, below, require full file name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1939 (setq file (expand-file-name file))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1940
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1941 ;; Record the directory of the file
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1942 (if last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1943 (set last-dir (expand-file-name (file-name-directory file))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1944
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1945 ;; Setup the buffer
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1946 (set buffer-name (find-file-noselect file))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1947
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1948 (ediff-eval-in-buffer (symbol-value buffer-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1949 (widen) ; Make sure the entire file is seen
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1950 (cond (file-magic ;; file has handler, such as jka-compr-handler or
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1951 ;; ange-ftp-hook-function--arrange for temp file
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1952 (ediff-verify-file-buffer 'magic)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1953 (setq file (ediff-make-temp-file temp-file-name-prefix))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1954 (set hooks-var (cons (` (lambda () (delete-file (, file))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1955 (symbol-value hooks-var))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1956 ;; 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
1957 ((not (equal (file-truename file)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1958 (file-truename (buffer-file-name))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1959 (setq file (ediff-make-temp-file temp-file-name-prefix))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1960 (set hooks-var (cons (` (lambda () (delete-file (, file))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1961 (symbol-value hooks-var))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1962 (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
1963 (ediff-verify-file-buffer))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1964 (set file-var file)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1965
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1966 (defun ediff-files-internal (file-A file-B file-C startup-hooks job-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1967 (let (buf-A buf-B buf-C)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1968 (message "Reading file %s ... " file-A)(sit-for 0)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1969 (ediff-find-file 'file-A 'buf-A 'ediff-last-dir-A 'startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1970 (message "Reading file %s ... " file-B)(sit-for 0)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1971 (ediff-find-file 'file-B 'buf-B 'ediff-last-dir-B 'startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1972 (if (and (stringp file-C) (not ediff-merge-job))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1973 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1974 (message "Reading file %s ... " file-C)(sit-for 0)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1975 (ediff-find-file
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1976 'file-C 'buf-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1977 (if (eq job-name 'ediff-merge-files-with-ancestor)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1978 'ediff-last-dir-ancestor 'ediff-last-dir-C)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1979 'startup-hooks)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1980 (ediff-setup buf-A file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1981 buf-B file-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1982 buf-C file-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1983 startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1984 (list (cons 'ediff-job-name job-name)))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1985
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1986
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1987 ;;;###autoload
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1988 (defalias 'ediff 'ediff-files)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1989
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1990
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1991 ;;;###autoload
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1992 (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1993 "Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B."
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
1994 (interactive
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1995 (let (bf)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1996 (list (setq bf (read-buffer "Buffer A to compare: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1997 (ediff-other-buffer "") t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1998 (read-buffer "Buffer B to compare: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
1999 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2000 ;; realign buffers so that two visible bufs will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2001 ;; at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2002 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2003 (ediff-other-buffer bf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2004 t))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2005
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2006 (or job-name (setq job-name 'ediff-buffers))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2007 (ediff-buffers-internal buffer-A buffer-B nil startup-hooks job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2008
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2009 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2010 (defun ediff-buffers3 (buffer-A buffer-B buffer-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2011 &optional startup-hooks job-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2012 "Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2013 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2014 (let (bf bff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2015 (list (setq bf (read-buffer "Buffer A to compare: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2016 (ediff-other-buffer "") t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2017 (setq bff (read-buffer "Buffer B to compare: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2018 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2019 ;; realign buffers so that two visible
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2020 ;; bufs will be at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2021 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2022 (ediff-other-buffer bf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2023 t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2024 (read-buffer "Buffer C to compare: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2025 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2026 ;; realign buffers so that three visible
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2027 ;; bufs will be at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2028 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2029 (ediff-other-buffer (list bf bff)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2030 t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2031 )))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2032
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2033 (or job-name (setq job-name 'ediff-buffers3))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2034 (ediff-buffers-internal buffer-A buffer-B buffer-C startup-hooks job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2035
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2036
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2037
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2038 (defun ediff-buffers-internal (buf-A buf-B buf-C startup-hooks job-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2039 (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
2040 (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
2041 (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
2042 (buf-C-file-name (if buf-C-is-alive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2043 (buffer-file-name (get-buffer buf-B))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2044 file-A file-B file-C)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2045 (if (not (ediff-buffer-live-p buf-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2046 (error "Buffer %S doesn't exist" buf-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2047 (if (not (ediff-buffer-live-p buf-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2048 (error "Buffer %S doesn't exist" buf-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2049 (let ((ediff-job-name job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2050 (if (and ediff-3way-comparison-job
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2051 (not buf-C-is-alive))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2052 (error "Buffer %S doesn't exist" buf-C)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2053 (if (stringp buf-A-file-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2054 (setq buf-A-file-name (file-name-nondirectory buf-A-file-name)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2055 (if (stringp buf-B-file-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2056 (setq buf-B-file-name (file-name-nondirectory buf-B-file-name)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2057 (if (stringp buf-C-file-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2058 (setq buf-C-file-name (file-name-nondirectory buf-C-file-name)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2059
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2060 ;; these three need to be evaluated in their buffers, since
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2061 ;; ediff-make-temp-file checks the current buffer when assigning file
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2062 ;; names
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2063 (ediff-eval-in-buffer buf-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2064 (setq file-A (ediff-make-temp-file buf-A-file-name)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2065 (ediff-eval-in-buffer buf-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2066 (setq file-B (ediff-make-temp-file buf-B-file-name)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2067 (if buf-C-is-alive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2068 (ediff-eval-in-buffer buf-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2069 (setq file-C (ediff-make-temp-file buf-C-file-name))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2070
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2071 (ediff-setup (get-buffer buf-A) file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2072 (get-buffer buf-B) file-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2073 (if buf-C-is-alive (get-buffer buf-C))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2074 file-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2075 (cons (` (lambda ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2076 (delete-file (, file-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2077 (delete-file (, file-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2078 (if (stringp (, file-C)) (delete-file (, file-C)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2079 ))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2080 startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2081 (list (cons 'ediff-job-name job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2082 )))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2083
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2084
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2085
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2086 ;;; Compare regions and windows
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2087
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2088 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2089 (defun ediff-windows (dumb-mode &optional wind-A wind-B startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2090 "Compare WIND-A and WIND-B, which are selected by clicking.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2091 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
2092 follows:
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2093 If WIND-A is nil, use selected window.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2094 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
2095
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2096 (interactive "P")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2097
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2098 (if (or dumb-mode (not window-system))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2099 (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
2100 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
2101 (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
2102 wind-B (ediff-get-window-by-clicking wind-B wind-A 2)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2103
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2104 (let ((buffer-A (window-buffer wind-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2105 (buffer-B (window-buffer wind-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2106 beg-A end-A beg-B end-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2107
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2108 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2109 (save-window-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2110 (sit-for 0) ; synch before using window-start/end -- a precaution
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2111 (select-window wind-A)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2112 (setq beg-A (window-start)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2113 end-A (window-end))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2114 (select-window wind-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2115 (setq beg-B (window-start)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2116 end-B (window-end))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2117 (ediff-regions-internal
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2118 buffer-A beg-A end-A buffer-B beg-B end-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2119 startup-hooks 'ediff-windows 'word-mode)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2120
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2121 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2122 (defun ediff-small-regions (buffer-A buffer-B &optional startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2123 "Run Ediff on a pair of regions in two different buffers.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2124 Regions \(i.e., point and mark\) are assumed to be set in advance.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2125 This function is effective only for relatively small regions, up to 200
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2126 lines. For large regions, use `ediff-large-regions'."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2127 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2128 (let (bf)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2129 (list (setq bf (read-buffer "Region's A buffer: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2130 (ediff-other-buffer "") t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2131 (read-buffer "Region's B buffer: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2132 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2133 ;; realign buffers so that two visible bufs will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2134 ;; at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2135 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2136 (ediff-other-buffer bf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2137 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
2138 (if (not (ediff-buffer-live-p buffer-A))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2139 (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
2140 (if (not (ediff-buffer-live-p buffer-B))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2141 (error "Buffer %S doesn't exist" buffer-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2142
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2143
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2144 (let (reg-A-beg reg-A-end reg-B-beg reg-B-end)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2145 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2146 (set-buffer buffer-A)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2147 (setq reg-A-beg (region-beginning)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2148 reg-A-end (region-end))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2149 (set-buffer buffer-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2150 (setq reg-B-beg (region-beginning)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2151 reg-B-end (region-end)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2152
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2153 (ediff-regions-internal
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2154 (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
2155 (get-buffer buffer-B) reg-B-beg reg-B-end
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2156 startup-hooks 'ediff-small-regions 'word-mode)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2157
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2158 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2159 (defun ediff-large-regions (buffer-A buffer-B &optional startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2160 "Run Ediff on a pair of regions in two different buffers.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2161 Regions \(i.e., point and mark\) are assumed to be set in advance.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2162 Each region is enlarged to contain full lines.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2163 This function is effective for large regions, over 100-200
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2164 lines. For small regions, use `ediff-small-regions'."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2165 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2166 (let (bf)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2167 (list (setq bf (read-buffer "Region A's buffer: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2168 (ediff-other-buffer "") t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2169 (read-buffer "Region B's buffer: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2170 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2171 ;; realign buffers so that two visible bufs will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2172 ;; at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2173 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2174 (ediff-other-buffer bf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2175 t))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2176 (if (not (ediff-buffer-live-p buffer-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2177 (error "Buffer %S doesn't exist" buffer-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2178 (if (not (ediff-buffer-live-p buffer-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2179 (error "Buffer %S doesn't exist" buffer-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2180
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2181 (let (reg-A-beg reg-A-end reg-B-beg reg-B-end)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2182 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2183 (set-buffer buffer-A)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2184 (setq reg-A-beg (region-beginning)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2185 reg-A-end (region-end))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2186 ;; enlarge the region to hold full lines
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2187 (goto-char reg-A-beg)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2188 (beginning-of-line)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2189 (setq reg-A-beg (point))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2190 (goto-char reg-A-end)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2191 (end-of-line)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2192 (or (eobp) (forward-char)) ; include the newline char
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2193 (setq reg-A-end (point))
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
2194
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2195 (set-buffer buffer-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2196 (setq reg-B-beg (region-beginning)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2197 reg-B-end (region-end))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2198 ;; enlarge the region to hold full lines
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2199 (goto-char reg-A-beg)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2200 (goto-char reg-B-beg)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2201 (beginning-of-line)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2202 (setq reg-B-beg (point))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2203 (goto-char reg-B-end)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2204 (end-of-line)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2205 (or (eobp) (forward-char)) ; include the newline char
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2206 (setq reg-B-end (point))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2207 ) ; save excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2208
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2209 (ediff-regions-internal
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2210 (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
2211 (get-buffer buffer-B) reg-B-beg reg-B-end
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2212 startup-hooks 'ediff-large-regions nil))) ; no word mode
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2213
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2214 ;; compare region beg-A to end-A of buffer-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2215 ;; to regions beg-B -- end-B in buffer-B.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2216 (defun ediff-regions-internal (buffer-A beg-A end-A buffer-B beg-B end-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2217 startup-hooks job-name word-mode)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2218 (let ((tmp-buffer (get-buffer-create ediff-tmp-buffer))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2219 overl-A overl-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2220 file-A file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2221
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2222 ;; in case beg/end-A/B aren't markers--make them into markers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2223 (ediff-eval-in-buffer buffer-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2224 (setq beg-A (move-marker (make-marker) beg-A)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2225 end-A (move-marker (make-marker) end-A)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2226 (ediff-eval-in-buffer buffer-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2227 (setq beg-B (move-marker (make-marker) beg-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2228 end-B (move-marker (make-marker) end-B)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2229
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2230 (if (and (eq buffer-A buffer-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2231 (or (and (< beg-A end-B) (<= beg-B beg-A)) ; b-B b-A e-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2232 (and (< beg-B end-A) (<= end-A end-B)))) ; b-B e-A e-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2233 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2234 (with-output-to-temp-buffer ediff-msg-buffer
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2235 (princ "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2236 You have requested to compare overlapping regions of the same buffer.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2237
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2238 In this case, Ediff's highlighting may be confusing---in the same window,
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2239 you may see highlighted regions that belong to different regions.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2240
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2241 Continue anyway? (y/n) "))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2242
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2243 (if (y-or-n-p "Continue anyway? ")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2244 ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2245 (error "%S aborted" job-name))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2246
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2247 ;; make file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2248 (if word-mode
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2249 (ediff-wordify beg-A end-A buffer-A tmp-buffer)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2250 (ediff-copy-to-buffer beg-A end-A buffer-A tmp-buffer))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2251 (ediff-eval-in-buffer tmp-buffer
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2252 (setq file-A (ediff-make-temp-file "regA")))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2253
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2254 ;; make file-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2255 (if word-mode
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2256 (ediff-wordify beg-B end-B buffer-B tmp-buffer)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2257 (ediff-copy-to-buffer beg-B end-B buffer-B tmp-buffer))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2258 (ediff-eval-in-buffer tmp-buffer
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2259 (setq file-B (ediff-make-temp-file "regB")))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2260
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2261 (setq overl-A (ediff-make-bullet-proof-overlay beg-A end-A buffer-A))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2262 (setq overl-B (ediff-make-bullet-proof-overlay beg-B end-B buffer-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2263 (ediff-setup buffer-A file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2264 buffer-B file-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2265 nil nil ; buffer & file C
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2266 (cons (` (lambda ()
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2267 (delete-file (, file-A))
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2268 (delete-file (, file-B))))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2269 startup-hooks)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2270 (list (cons 'ediff-word-mode word-mode)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2271 (cons 'ediff-narrow-bounds (list overl-A overl-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2272 (cons 'ediff-job-name job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2273 )
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2274 ))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2275
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2276
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2277 ;;; Merge files and buffers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2278
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2279 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2280 (defalias 'ediff-merge 'ediff-merge-files)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2281
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2282 (defsubst ediff-merge-on-startup ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2283 (ediff-do-merge 0)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2284 (ediff-eval-in-buffer ediff-buffer-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2285 (set-buffer-modified-p nil)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2286
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2287 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2288 (defun ediff-merge-files (file-A file-B &optional startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2289 "Merge two files without ancestor."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2290 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2291 (let ((dir-A (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2292 ediff-last-dir-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2293 default-directory))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2294 dir-B f)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2295 (list (setq f (ediff-read-file-name "File A to merge" dir-A nil))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2296 (ediff-read-file-name "File B to merge"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2297 (setq dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2298 (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2299 ediff-last-dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2300 (file-name-directory f)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2301 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2302 (setq file-name-history
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2303 (cons (abbreviate-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2304 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2305 (file-name-nondirectory f)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2306 dir-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2307 file-name-history))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2308 f))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2309 )))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2310 (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
2311 (ediff-files-internal file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2312 (if (file-directory-p file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2313 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2314 (file-name-nondirectory file-A) file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2315 file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2316 nil ; file-C
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2317 startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2318 'ediff-merge-files))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2319
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2320 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2321 (defun ediff-merge-files-with-ancestor (file-A file-B file-ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2322 &optional startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2323 "Merge two files with ancestor."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2324 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2325 (let ((dir-A (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2326 ediff-last-dir-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2327 default-directory))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2328 dir-B dir-ancestor f ff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2329 (list (setq f (ediff-read-file-name "File A to merge" dir-A nil))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2330 (setq ff (ediff-read-file-name "File B to merge"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2331 (setq dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2332 (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2333 ediff-last-dir-B
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2334 (file-name-directory f)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2335 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2336 (setq file-name-history
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2337 (cons
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2338 (abbreviate-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2339 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2340 (file-name-nondirectory f)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2341 dir-B))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2342 file-name-history))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2343 f)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2344 (ediff-read-file-name "Ancestor file"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2345 (setq dir-ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2346 (if ediff-use-last-dir
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2347 ediff-last-dir-ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2348 (file-name-directory ff)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2349 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2350 (setq file-name-history
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2351 (cons (abbreviate-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2352 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2353 (file-name-nondirectory ff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2354 dir-ancestor))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2355 file-name-history))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2356 ff))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2357 )))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2358 (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
2359 (ediff-files-internal file-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2360 (if (file-directory-p file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2361 (expand-file-name
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2362 (file-name-nondirectory file-A) file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2363 file-B)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2364 file-ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2365 startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2366 'ediff-merge-files-with-ancestor))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2367
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2368 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2369 (defalias 'ediff-merge-with-ancestor 'ediff-merge-files-with-ancestor)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2370
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2371 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2372 (defun ediff-merge-buffers (buffer-A buffer-B &optional startup-hooks job-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2373 "Merge buffers without ancestor."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2374 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2375 (let (bf)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2376 (list (setq bf (read-buffer "Buffer A to merge: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2377 (ediff-other-buffer "") t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2378 (read-buffer "Buffer B to merge: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2379 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2380 ;; realign buffers so that two visible bufs will be
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2381 ;; at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2382 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2383 (ediff-other-buffer bf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2384 t))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2385
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2386 (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
2387 (or job-name (setq job-name 'ediff-merge-buffers))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2388 (ediff-buffers-internal
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2389 buffer-A buffer-B nil startup-hooks job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2390
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2391 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2392 (defun ediff-merge-buffers-with-ancestor (buffer-A
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2393 buffer-B buffer-ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2394 &optional startup-hooks job-name)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2395 "Merge buffers with ancestor."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2396 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2397 (let (bf bff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2398 (list (setq bf (read-buffer "Buffer A to merge: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2399 (ediff-other-buffer "") t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2400 (setq bff (read-buffer "Buffer B to merge: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2401 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2402 ;; realign buffers so that two visible
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2403 ;; bufs will be at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2404 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2405 (ediff-other-buffer bf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2406 t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2407 (read-buffer "Ancestor buffer: "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2408 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2409 ;; realign buffers so that three visible
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2410 ;; bufs will be at the top
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2411 (save-window-excursion (other-window 1))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2412 (ediff-other-buffer (list bf bff)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2413 t)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2414 )))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2415
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2416 (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
2417 (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
2418 (ediff-buffers-internal
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2419 buffer-A buffer-B buffer-ancestor startup-hooks job-name))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2420
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2421
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2422 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2423 (defun ediff-merge-revisions (rev1 rev2 &optional startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2424 "Run Ediff by merging two revisions of a file.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2425 The file is the one visited by the current buffer."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2426 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2427 "sVersion 1 to merge (default is the latest version): \nsVersion 2 to merge (default is the latest version): ")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2428 (ediff-load-version-control)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2429 (let (buf1 buf2)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2430 (if (eq ediff-version-control-package 'vc)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2431 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2432 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2433 (vc-version-other-window rev1)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2434 (setq buf1 (current-buffer)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2435 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2436 (vc-version-other-window rev2)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2437 (setq buf2 (current-buffer)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2438 (setq startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2439 (list (` (lambda ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2440 (delete-file (, (buffer-file-name buf1)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2441 (delete-file (, (buffer-file-name buf2))))))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2442 (setq buf1 (rcs-ediff-view-revision rev1)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2443 buf2 (rcs-ediff-view-revision rev2)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2444 (ediff-merge-buffers buf1 buf2 startup-hooks 'ediff-merge-revisions)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2445
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2446
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2447 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2448 (defun ediff-merge-revisions-with-ancestor (rev1
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2449 rev2 ancestor-rev
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2450 &optional startup-hooks)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2451 "Run Ediff by merging with ancestor of two revisions of a file.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2452 The file is the one visited by the current buffer."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2453 (interactive
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2454 "sVersion 1 to merge (default: the latest version): \nsVersion 2 to merge (default: the latest version): \nsAncestor version (default: the latest version): ")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2455 (ediff-load-version-control)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2456 (let (buf1 buf2 ancestor-buf)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2457 (if (eq ediff-version-control-package 'vc)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2458 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2459 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2460 (vc-version-other-window rev1)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2461 (setq buf1 (current-buffer)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2462 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2463 (vc-version-other-window rev2)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2464 (setq buf2 (current-buffer)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2465 (save-excursion
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2466 (vc-version-other-window ancestor-rev)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2467 (setq ancestor-buf (current-buffer)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2468 (setq startup-hooks
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2469 (list (` (lambda ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2470 (delete-file (, (buffer-file-name buf1)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2471 (delete-file (, (buffer-file-name buf2)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2472 (delete-file (, (buffer-file-name ancestor-buf)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2473 )))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2474 (setq buf1 (rcs-ediff-view-revision rev1)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2475 buf2 (rcs-ediff-view-revision rev2)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2476 ancestor-buf (rcs-ediff-view-revision ancestor-rev)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2477 (ediff-merge-buffers-with-ancestor
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2478 buf1 buf2 ancestor-buf
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2479 startup-hooks 'ediff-merge-revisions-with-ancestor)))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2480
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2481
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2482 ;;; Apply patch
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2483
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2484
7709
d88d94461e5d (ediff-patch-buffer): Fix autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents: 7639
diff changeset
2485 ;;;###autoload
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2486 (defun ediff-patch-buffer (buffer-name &optional startup-hooks)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2487 "Run Ediff by patching BUFFER-NAME."
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2488 (interactive "bBuffer to patch: ")
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2489
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2490 (let* ((file-buffer (get-buffer buffer-name))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2491 (file-name (if file-buffer (buffer-file-name file-buffer))))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2492 (if (not file-name)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2493 (error "Buffer %s doesn't exist or doesn't visit any file. Why patch?"
11057
9081dcfc25ae (ediff-patch-buffer): Use buffer name in error message.
Karl Heuer <kwzh@gnu.org>
parents: 11056
diff changeset
2494 buffer-name))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2495
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2496 (ediff-patch-file file-name startup-hooks)))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2497
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2498
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2499 (defun ediff-get-patch-buffer (dir)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2500 "Obtain patch buffer. If patch is already in a buffer---use it.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2501 Else, read patch file into a new buffer."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2502 (if (y-or-n-p "Is the patch file already in a buffer? ")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2503 (setq ediff-patch-buf
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2504 (get-buffer (read-buffer "Patch buffer name: " nil t))) ;must match
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2505 (setq ediff-patch-buf
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2506 (find-file-noselect (read-file-name "Patch file name: " dir))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2507
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2508 ;; secure the patch buffer against accidental changes
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2509 (ediff-eval-in-buffer ediff-patch-buf
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2510 (setq buffer-read-only t))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2511
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2512 (setq ediff-patch-diagnostics
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2513 (get-buffer-create "*ediff patch diagnostics*"))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2514 (ediff-eval-in-buffer
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2515 ediff-patch-diagnostics
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2516 (insert-buffer ediff-patch-buf))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2517 )
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2518
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2519
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2520
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2521
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2522
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2523 ;;; Versions Control functions
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2524
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2525 ;;;###autoload
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2526 (defun ediff-revision (revision)
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2527 "Call `vc.el' or `rcs.el' depending on `ediff-version-control-package'.
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2528 This function is introduced to provide a uniform interface to version
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2529 control packages from Ediff."
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2530 (interactive "sVersion to Ediff with (default: the latest version): ")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2531 (ediff-load-version-control)
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2532 (funcall
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2533 (intern (format "%S-ediff-internal" ediff-version-control-package))
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2534 revision))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2535
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2536 ;; Backward compatibility
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2537 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2538 (defun vc-ediff ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2539 (interactive)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2540 (beep 1)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2541 (with-output-to-temp-buffer ediff-msg-buffer
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2542 (princ "
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2543 You have invoked an obsolete function `vc-ediff' or `rcs-ediff'.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2544 Please use `M-x ediff-revision' instead.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2545
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2546 Also, please check the variables `ediff-version-control-package'
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2547 and `ediff-revision-key' for customization.")))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2548
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2549 (defalias 'rcs-ediff 'vc-ediff)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2550
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2551 ;; 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
2552 ;; 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
2553 (defun ediff-load-version-control (&optional silent)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2554 (or (featurep ediff-version-control-package)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2555 (if (locate-library (symbol-name ediff-version-control-package))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2556 (progn
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2557 (message "") ; kill the message from `locate-library'
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2558 (require ediff-version-control-package)
11760
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
2559 (if ediff-revision-key
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
2560 (define-key
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
2561 (cond ((eq ediff-version-control-package 'vc) vc-prefix-map)
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
2562 ((eq ediff-version-control-package 'rcs) global-map)
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
2563 (t global-map))
898ec89f5379 (ediff-revision-key): Default value nil.
Richard M. Stallman <rms@gnu.org>
parents: 11234
diff changeset
2564 ediff-revision-key 'ediff-revision)))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2565 (or silent
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2566 (error "Version control package %S.el not found. Use vc.el instead"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2567 ediff-version-control-package)))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2568
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2569
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2570 ;; Note: this function will work only with Emacs 19.22 or later.
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2571 (defun vc-ediff-internal (rev)
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2572 "Run Ediff on version REV of the current buffer in another window.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2573 If the current buffer is named `F', the version is named `F.~REV~'.
7391
c40d16ee57bf entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7267
diff changeset
2574 If `F.~REV~' already exists, it is used instead of being re-created."
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2575 (let ((newvers (current-buffer)))
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
2576 (vc-version-other-window rev)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2577 ;; current-buffer is now supposed to contain the old version
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2578 ;; in another window
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2579 ;; We delete the temp file that was created by vc.el for the old
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2580 ;; version
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2581 (ediff-buffers (current-buffer) newvers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2582 (list (` (lambda () (delete-file (, (buffer-file-name))))))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2583 'ediff-revision)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2584 ))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2585
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2586 (defun rcs-ediff-view-revision (&optional rev)
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2587 "View previous RCS revision of current file.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2588 With prefix argument, prompts for a revision name."
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2589 (interactive (list (if current-prefix-arg
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2590 (read-string "Revision: "))))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2591 (let* ((filename (buffer-file-name (current-buffer)))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2592 (switches (append '("-p")
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2593 (if rev (list (concat "-r" rev)) nil)))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2594 (buff (concat (file-name-nondirectory filename) ".~" rev "~")))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2595 (message "Working ...")
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2596 (setq filename (expand-file-name filename))
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
2597 (with-output-to-temp-buffer buff
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2598 (let ((output-buffer (ediff-rcs-get-output-buffer filename buff)))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2599 (delete-windows-on output-buffer)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2600 (save-excursion
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2601 (set-buffer output-buffer)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2602 (apply 'call-process "co" nil t nil
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2603 ;; -q: quiet (no diagnostics)
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2604 (append switches rcs-default-co-switches
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2605 (list "-q" filename)))))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2606 (message "")
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2607 buff)))
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2608
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2609 (defun ediff-rcs-get-output-buffer (file name)
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2610 ;; Get a buffer for RCS output for FILE, make it writable and clean it up.
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2611 ;; Optional NAME is name to use instead of `*RCS-output*'.
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
2612 ;; This is a modified version from rcs.el v1.1. I use it here to make
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2613 ;; Ediff immune to changes in rcs.el
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2614 (let* ((default-major-mode 'fundamental-mode) ; no frills!
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2615 (buf (get-buffer-create name)))
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2616 (save-excursion
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2617 (set-buffer buf)
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2618 (setq buffer-read-only nil
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2619 default-directory (file-name-directory (expand-file-name file)))
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2620 (erase-buffer))
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2621 buf))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2622
8874
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2623 (defun rcs-ediff-internal (rev)
716969785d08 (ediff-submit-report, ediff-revision)
Richard M. Stallman <rms@gnu.org>
parents: 8524
diff changeset
2624 "Run Ediff on the current buffer, comparing it with previous RCS revision."
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2625 (let ((newvers (current-buffer))
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2626 (oldvers (rcs-ediff-view-revision rev)))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2627
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2628 ;; rcs.el doesn't create temp version files, so we don't have to delete
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2629 ;; anything in startup hooks to ediff-buffers
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2630 (ediff-buffers oldvers newvers nil 'ediff-revision)
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2631 ))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2632
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2633 ;;; Menu bar
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2634
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2635 ;;; This is split in several parts to avoid
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2636 ;;; making a line in loaddefs.el that is too long for patch.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2637 ;;; Note that autoload.el currently looks for cookies
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2638 ;;; only at top level in the file.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2639 ;;; So I moved these to top level. But the conditionals on
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2640 ;;; purify-flag make these no-ops when you load ediff.
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2641 ;;; They only do something in loaddefs.el.
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2642
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2643 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2644 (if purify-flag
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2645 ;; explicit string-match, as ediff-xemacs-p is not defined at build time
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2646 (if (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2647 ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2648 (defvar menu-bar-epatch-menu (make-sparse-keymap "Epatch"))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2649 (fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2650 (defvar menu-bar-ediff-merge-menu (make-sparse-keymap "Ediff merge"))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2651 (fset 'menu-bar-ediff-merge-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2652 (symbol-value 'menu-bar-ediff-merge-menu))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2653 (defvar menu-bar-ediff-menu (make-sparse-keymap "Ediff"))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2654 (fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2655 ))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2656
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2657
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2658 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2659 (if purify-flag
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2660 ;; explicit string-match, as ediff-xemacs-p is not defined at build time
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2661 (if (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2662 ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2663 (define-key menu-bar-ediff-menu [ediff-revision]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2664 '("File with Revision ..." . ediff-revision))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2665 (define-key menu-bar-ediff-menu [ediff-large-regions]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2666 '("Large Regions ..." . ediff-large-regions))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2667 (define-key menu-bar-ediff-menu [ediff-small-regions]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2668 '("Small Regions ..." . ediff-small-regions))
11058
f8238a1ab991 Don't put ediff-windows in the menu.
Karl Heuer <kwzh@gnu.org>
parents: 11057
diff changeset
2669 ;;; Too confusing to have this and compare-windows in the same menu.
f8238a1ab991 Don't put ediff-windows in the menu.
Karl Heuer <kwzh@gnu.org>
parents: 11057
diff changeset
2670 ;; (define-key menu-bar-ediff-menu [ediff-windows]
f8238a1ab991 Don't put ediff-windows in the menu.
Karl Heuer <kwzh@gnu.org>
parents: 11057
diff changeset
2671 ;; '("Windows ..." . ediff-windows))
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2672 ))
11058
f8238a1ab991 Don't put ediff-windows in the menu.
Karl Heuer <kwzh@gnu.org>
parents: 11057
diff changeset
2673
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2674 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2675 (if purify-flag
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2676 ;; explicit string-match, as ediff-xemacs-p is not defined at build time
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2677 (if (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2678 ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2679 (define-key menu-bar-ediff-menu [ediff-buffers3]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2680 '("Three Buffers ..." . ediff-buffers3))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2681 (define-key menu-bar-ediff-menu [ediff-files3]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2682 '("Three Files ..." . ediff-files3))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2683 (define-key menu-bar-ediff-menu [ediff-buffers]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2684 '("Two Buffers ..." . ediff-buffers))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2685 (define-key menu-bar-ediff-menu [ediff-files]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2686 '("Two Files ..." . ediff-files))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2687 ))
8503
084456e12635 (ediff-find-file, ediff-patch-file): Handle symlinks.
Richard M. Stallman <rms@gnu.org>
parents: 8441
diff changeset
2688
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2689 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2690 (if purify-flag
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2691 ;; explicit string-match, as ediff-xemacs-p is not defined at build time
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2692 (if (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2693 ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2694 (define-key
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2695 menu-bar-ediff-merge-menu [ediff-merge-revisions-with-ancestor]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2696 '("Revisions with Ancestor ..." . ediff-merge-revisions-with-ancestor))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2697 (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2698 '("Revisions ..." . ediff-merge-revisions))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2699 (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers-with-ancestor]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2700 '("Buffers with Ancestor ..." . ediff-merge-buffers-with-ancestor))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2701 (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2702 '("Buffers ..." . ediff-merge-buffers))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2703 (define-key menu-bar-ediff-merge-menu [ediff-merge-files-with-ancestor]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2704 '("Files with Ancestor ..." . ediff-merge-files-with-ancestor))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2705 (define-key menu-bar-ediff-merge-menu [ediff-merge-files]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2706 '("Files ..." . ediff-merge-files))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2707 ))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2708
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2709 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2710 (if purify-flag
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2711 ;; explicit string-match, as ediff-xemacs-p is not defined at build time
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2712 (if (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2713 ()
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2714 (define-key menu-bar-epatch-menu [ediff-patch-buffer]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2715 '("To a Buffer ..." . ediff-patch-buffer))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2716 (define-key menu-bar-epatch-menu [ediff-patch-file]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2717 '("To a File ..." . ediff-patch-file))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2718 ))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2719
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2720
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2721 ;;;###autoload
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2722 (if purify-flag
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2723 ;; explicit string-match, as ediff-xemacs-p is not defined at build time
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2724 (if (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)
7424
9169ca1bcb95 New version from Kifer.
Richard M. Stallman <rms@gnu.org>
parents: 7419
diff changeset
2725 (progn
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2726 (defvar ediff-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2727 '(""
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2728 ["Two Files ..." ediff-files t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2729 ["Two Buffers ..." ediff-buffers t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2730 ["Three Files ..." ediff-files3 t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2731 ["Three Buffers ..." ediff-buffers3 t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2732 ["Windows ..." ediff-windows t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2733 ["Small Regions ..." ediff-small-regions t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2734 ["Large Regions ..." ediff-large-regions t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2735 ["File with Revision ..." ediff-revision t]))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2736 (defvar ediff-merge-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2737 '(""
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2738 ["Files ..." ediff-merge-files t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2739 ["Files with Ancestor ..." ediff-merge-files-with-ancestor t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2740 ["Buffers ..." ediff-merge-buffers t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2741 ["Buffers with Ancestor ..."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2742 ediff-merge-buffers-with-ancestor t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2743 ["Revisions ..." ediff-merge-revisions t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2744 ["Revisions with Ancestor ..."
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2745 ediff-merge-revisions-with-ancestor t]))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2746 (defvar epatch-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2747 '(""
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2748 ["To a file ..." ediff-patch-file t]
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2749 ["To a buffer ..." ediff-patch-buffer t]))
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2750 (add-menu '("File") "Compare"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2751 ediff-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2752 "New Frame")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2753 (add-menu '("File") "Merge"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2754 ediff-merge-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2755 "New Frame")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2756 (add-menu '("File") "Apply Patch"
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2757 epatch-menu
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2758 "New Frame")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2759 ;; Display a solid horizontal line
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2760 (add-menu-item '("File") "---" nil nil "New Screen")
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2761 )))
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2762
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2763
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2764 (provide 'ediff)
11041
17b319a26eea Installed new version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8874
diff changeset
2765 (require 'ediff-util)
7267
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2766
4aa70d4d981c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2767 ;;; ediff.el ends here