Mercurial > emacs
annotate lisp/ediff-init.el @ 35651:d991c8f6b85b
(Escape sequences in shell output): New section.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 27 Jan 2001 13:59:50 +0000 |
parents | be20c22dc16d |
children | 5d6b76d28b83 |
rev | line source |
---|---|
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1 ;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff |
14169 | 2 |
30373
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
3 ;; Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. |
11042 | 4 |
5 ;; Author: Michael Kifer <kifer@cs.sunysb.edu> | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 2, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
14169 | 20 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 ;; Boston, MA 02111-1307, USA. | |
11042 | 23 |
14169 | 24 ;;; Code: |
11042 | 25 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
26 ;; Start compiler pacifier |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
27 (defvar ediff-metajob-name) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
28 (defvar ediff-meta-buffer) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
29 (defvar pm-color-alist) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
30 (defvar ediff-grab-mouse) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
31 (defvar ediff-mouse-pixel-position) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
32 (defvar ediff-mouse-pixel-threshold) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
33 (defvar ediff-whitespace) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
34 (defvar ediff-multiframe) |
21940 | 35 (defvar ediff-use-toolbar-p) |
18054 | 36 |
37 (and noninteractive | |
38 (eval-when-compile | |
39 (load "ange-ftp" 'noerror))) | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
40 ;; end pacifier |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
41 |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
42 ;; Is it XEmacs? |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
43 (defconst ediff-xemacs-p (string-match "XEmacs" emacs-version)) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
44 ;; Is it Emacs? |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
45 (defconst ediff-emacs-p (not ediff-xemacs-p)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
46 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
47 (defvar ediff-force-faces nil |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
48 "If t, Ediff will think that it is running on a display that supports faces. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
49 This is provided as a temporary relief for users of face-capable displays |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
50 that Ediff doesn't know about.") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
51 |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
52 ;; Are we running as a window application or on a TTY? |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
53 (defsubst ediff-device-type () |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
54 (if ediff-emacs-p |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
55 window-system |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
56 (device-type (selected-device)))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
57 |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
58 ;; in XEmacs: device-type is tty on tty and stream in batch. |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
59 (defun ediff-window-display-p () |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
60 (and (ediff-device-type) (not (memq (ediff-device-type) '(tty pc stream))))) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
61 |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
62 ;; test if supports faces |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
63 (defun ediff-has-face-support-p () |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
64 (cond ((ediff-window-display-p)) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
65 (ediff-force-faces) |
30089
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
66 ((ediff-color-display-p)) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
67 (ediff-emacs-p (memq (ediff-device-type) '(pc))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
68 (ediff-xemacs-p (memq (ediff-device-type) '(tty pc))))) |
16766
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
69 |
21940 | 70 (defun ediff-has-toolbar-support-p () |
71 (and ediff-xemacs-p | |
72 (featurep 'toolbar) | |
73 (console-on-window-system-p))) | |
74 | |
75 (defun ediff-use-toolbar-p () | |
76 (and (ediff-has-toolbar-support-p) ;Can it do it ? | |
77 (boundp 'ediff-use-toolbar-p) | |
78 ediff-use-toolbar-p)) ;Does the user want it ? | |
79 | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
80 ;; Defines SYMBOL as an advertised local variable. |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
81 ;; Performs a defvar, then executes `make-variable-buffer-local' on |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
82 ;; the variable. Also sets the `permanent-local' property, |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
83 ;; so that `kill-all-local-variables' (called by major-mode setting |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
84 ;; commands) won't destroy Ediff control variables. |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
85 ;; |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
86 ;; Plagiarised from `emerge-defvar-local' for XEmacs. |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
87 (defmacro ediff-defvar-local (var value doc) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
88 `(progn |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
89 (defvar ,var ,value ,doc) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
90 (make-variable-buffer-local ',var) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
91 (put ',var 'permanent-local t))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
92 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
93 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
94 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
95 ;; Variables that control each Ediff session---local to the control buffer. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
96 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
97 ;; Mode variables |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
98 ;; The buffer in which the A variant is stored. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
99 (ediff-defvar-local ediff-buffer-A nil "") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
100 ;; The buffer in which the B variant is stored. |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
101 (ediff-defvar-local ediff-buffer-B nil "") |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
102 ;; The buffer in which the C variant is stored or where the merge buffer lives. |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
103 (ediff-defvar-local ediff-buffer-C nil "") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
104 ;; Ancestor buffer |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
105 (ediff-defvar-local ediff-ancestor-buffer nil "") |
18054 | 106 ;; The Ediff control buffer |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
107 (ediff-defvar-local ediff-control-buffer nil "") |
11042 | 108 |
19047 | 109 |
110 ;; Association between buff-type and ediff-buffer-* | |
111 (defconst ediff-buffer-alist | |
112 '((?A . ediff-buffer-A) | |
113 (?B . ediff-buffer-B) | |
114 (?C . ediff-buffer-C))) | |
115 | |
11042 | 116 ;;; Macros |
117 (defmacro ediff-odd-p (arg) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
118 `(eq (logand ,arg 1) 1)) |
11042 | 119 |
120 (defmacro ediff-buffer-live-p (buf) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
121 `(and ,buf (get-buffer ,buf) (buffer-name (get-buffer ,buf)))) |
11042 | 122 |
123 (defmacro ediff-get-buffer (arg) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
124 `(cond ((eq ,arg 'A) ediff-buffer-A) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
125 ((eq ,arg 'B) ediff-buffer-B) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
126 ((eq ,arg 'C) ediff-buffer-C) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
127 ((eq ,arg 'Ancestor) ediff-ancestor-buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
128 )) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
129 |
11042 | 130 (defmacro ediff-get-value-according-to-buffer-type (buf-type list) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
131 `(cond ((eq ,buf-type 'A) (nth 0 ,list)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
132 ((eq ,buf-type 'B) (nth 1 ,list)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
133 ((eq ,buf-type 'C) (nth 2 ,list)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
134 )) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
135 |
11042 | 136 (defmacro ediff-char-to-buftype (arg) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
137 `(cond ((memq ,arg '(?a ?A)) 'A) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
138 ((memq ,arg '(?b ?B)) 'B) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
139 ((memq ,arg '(?c ?C)) 'C) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
140 )) |
19047 | 141 |
19241 | 142 |
19047 | 143 ;; A-list is supposed to be of the form (A . symb) (B . symb)...) |
144 ;; where the first part of any association is a buffer type and the second is | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
145 ;; an appropriate symbol. Given buffer-type, this function returns the |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
146 ;; symbol. This is used to avoid using `intern' |
19047 | 147 (defsubst ediff-get-symbol-from-alist (buf-type alist) |
148 (cdr (assoc buf-type alist))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
149 |
19047 | 150 (defconst ediff-difference-vector-alist |
151 '((A . ediff-difference-vector-A) | |
152 (B . ediff-difference-vector-B) | |
153 (C . ediff-difference-vector-C) | |
154 (Ancestor . ediff-difference-vector-Ancestor))) | |
155 | |
11042 | 156 (defmacro ediff-get-difference (n buf-type) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
157 `(aref |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
158 (symbol-value |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
159 (ediff-get-symbol-from-alist |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
160 ,buf-type ediff-difference-vector-alist)) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
161 ,n)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
162 |
18054 | 163 ;; Tell if it has been previously determined that the region has |
11042 | 164 ;; no diffs other than the white space and newlines |
165 ;; The argument, N, is the diff region number used by Ediff to index the | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
166 ;; diff vector. It is 1 less than the number seen by the user. |
18054 | 167 ;; Returns: |
168 ;; t if the diffs are whitespace in all buffers | |
169 ;; 'A (in 3-buf comparison only) if there are only whitespace | |
170 ;; diffs in bufs B and C | |
171 ;; 'B (in 3-buf comparison only) if there are only whitespace | |
172 ;; diffs in bufs A and C | |
173 ;; 'C (in 3-buf comparison only) if there are only whitespace | |
174 ;; diffs in bufs A and B | |
11042 | 175 ;; |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
176 ;; A Difference Vector has the form: |
11042 | 177 ;; [diff diff diff ...] |
178 ;; where each diff has the form: | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
179 ;; [overlay fine-diff-vector no-fine-diffs-flag state-of-difference] |
11042 | 180 ;; fine-diff-vector is a vector [fine-diff fine-diff fine-diff ...] |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
181 ;; no-fine-diffs-flag says if there are fine differences. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
182 ;; state-of-difference is A, B, C, or nil, indicating which buffer is |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
183 ;; different from the other two (used only in 3-way jobs). |
11042 | 184 (defmacro ediff-no-fine-diffs-p (n) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
185 `(aref (ediff-get-difference ,n 'A) 2)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
186 |
11042 | 187 (defmacro ediff-get-diff-overlay-from-diff-record (diff-rec) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
188 `(aref ,diff-rec 0)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
189 |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
190 (defmacro ediff-get-diff-overlay (n buf-type) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
191 `(ediff-get-diff-overlay-from-diff-record |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
192 (ediff-get-difference ,n ,buf-type))) |
11042 | 193 |
194 (defmacro ediff-get-fine-diff-vector-from-diff-record (diff-rec) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
195 `(aref ,diff-rec 1)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
196 |
11042 | 197 (defmacro ediff-set-fine-diff-vector (n buf-type fine-vec) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
198 `(aset (ediff-get-difference ,n ,buf-type) 1 ,fine-vec)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
199 |
11042 | 200 (defmacro ediff-get-state-of-diff (n buf-type) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
201 `(if (ediff-buffer-live-p ediff-buffer-C) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
202 (aref (ediff-get-difference ,n ,buf-type) 3))) |
11042 | 203 (defmacro ediff-set-state-of-diff (n buf-type val) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
204 `(aset (ediff-get-difference ,n ,buf-type) 3 ,val)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
205 |
11042 | 206 (defmacro ediff-get-state-of-merge (n) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
207 `(if ediff-state-of-merge |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
208 (aref (aref ediff-state-of-merge ,n) 0))) |
11042 | 209 (defmacro ediff-set-state-of-merge (n val) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
210 `(if ediff-state-of-merge |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
211 (aset (aref ediff-state-of-merge ,n) 0 ,val))) |
11042 | 212 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
213 (defmacro ediff-get-state-of-ancestor (n) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
214 `(if ediff-state-of-merge |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
215 (aref (aref ediff-state-of-merge ,n) 1))) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
216 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
217 ;; if flag is t, puts a mark on diff region saying that |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
218 ;; the differences are in white space only. If flag is nil, |
11042 | 219 ;; the region is marked as essential (i.e., differences are |
220 ;; not just in the white space and newlines.) | |
221 (defmacro ediff-mark-diff-as-space-only (n flag) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
222 `(aset (ediff-get-difference ,n 'A) 2 ,flag)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
223 |
11042 | 224 (defmacro ediff-get-fine-diff-vector (n buf-type) |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
225 `(ediff-get-fine-diff-vector-from-diff-record |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
226 (ediff-get-difference ,n ,buf-type))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
227 |
19047 | 228 ;; Macro to switch to BUFFER, evaluate BODY, returns to original buffer. |
229 ;; Doesn't save the point and mark. | |
230 ;; This is `with-current-buffer' with the added test for live buffers." | |
231 (defmacro ediff-with-current-buffer (buffer &rest body) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
232 `(if (ediff-buffer-live-p ,buffer) |
19047 | 233 (save-current-buffer |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
234 (set-buffer ,buffer) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
235 ,@body) |
19047 | 236 (or (eq this-command 'ediff-quit) |
237 (error ediff-KILLED-VITAL-BUFFER)) | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
238 )) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
239 |
11042 | 240 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
241 (defsubst ediff-multiframe-setup-p () |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
242 (and (ediff-window-display-p) ediff-multiframe)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
243 |
11042 | 244 (defmacro ediff-narrow-control-frame-p () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
245 `(and (ediff-multiframe-setup-p) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
246 (equal ediff-help-message ediff-brief-message-string))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
247 |
11042 | 248 (defmacro ediff-3way-comparison-job () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
249 `(memq |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
250 ediff-job-name |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
251 '(ediff-files3 ediff-buffers3))) |
11042 | 252 (ediff-defvar-local ediff-3way-comparison-job nil "") |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
253 |
11042 | 254 (defmacro ediff-merge-job () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
255 `(memq |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
256 ediff-job-name |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
257 '(ediff-merge-files |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
258 ediff-merge-buffers |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
259 ediff-merge-files-with-ancestor |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
260 ediff-merge-buffers-with-ancestor |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
261 ediff-merge-revisions |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
262 ediff-merge-revisions-with-ancestor))) |
11042 | 263 (ediff-defvar-local ediff-merge-job nil "") |
264 | |
265 (defmacro ediff-merge-with-ancestor-job () | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
266 `(memq |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
267 ediff-job-name |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
268 '(ediff-merge-files-with-ancestor |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
269 ediff-merge-buffers-with-ancestor |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
270 ediff-merge-revisions-with-ancestor))) |
11042 | 271 (ediff-defvar-local ediff-merge-with-ancestor-job nil "") |
272 | |
273 (defmacro ediff-3way-job () | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
274 `(or ediff-3way-comparison-job ediff-merge-job)) |
11042 | 275 (ediff-defvar-local ediff-3way-job nil "") |
276 | |
277 ;; A diff3 job is like a 3way job, but ediff-merge doesn't require the use | |
278 ;; of diff3. | |
279 (defmacro ediff-diff3-job () | |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
280 `(or ediff-3way-comparison-job |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
281 ediff-merge-with-ancestor-job)) |
11042 | 282 (ediff-defvar-local ediff-diff3-job nil "") |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
283 |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
284 (defmacro ediff-windows-job () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
285 `(memq ediff-job-name '(ediff-windows-wordwise ediff-windows-linewise))) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
286 (ediff-defvar-local ediff-windows-job nil "") |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
287 |
11042 | 288 (defmacro ediff-word-mode-job () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
289 `(memq ediff-job-name '(ediff-windows-wordwise ediff-regions-wordwise))) |
11042 | 290 (ediff-defvar-local ediff-word-mode-job nil "") |
291 | |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
292 (defmacro ediff-narrow-job () |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
293 `(memq ediff-job-name '(ediff-windows-wordwise |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
294 ediff-regions-wordwise |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
295 ediff-windows-linewise |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
296 ediff-regions-linewise))) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
297 (ediff-defvar-local ediff-narrow-job nil "") |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
298 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
299 ;; Note: ediff-merge-directory-revisions-with-ancestor is not treated as an |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
300 ;; ancestor metajob, since it behaves differently. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
301 (defsubst ediff-ancestor-metajob (&optional metajob) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
302 (memq (or metajob ediff-metajob-name) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
303 '(ediff-merge-directories-with-ancestor |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
304 ediff-merge-filegroups-with-ancestor))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
305 (defsubst ediff-revision-metajob (&optional metajob) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
306 (memq (or metajob ediff-metajob-name) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
307 '(ediff-directory-revisions |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
308 ediff-merge-directory-revisions |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
309 ediff-merge-directory-revisions-with-ancestor))) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
310 (defsubst ediff-patch-metajob (&optional metajob) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
311 (memq (or metajob ediff-metajob-name) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
312 '(ediff-multifile-patch))) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
313 ;; metajob involving only one group of files, such as multipatch or directory |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
314 ;; revision |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
315 (defsubst ediff-one-filegroup-metajob (&optional metajob) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
316 (or (ediff-revision-metajob metajob) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
317 (ediff-patch-metajob metajob) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
318 ;; add more here |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
319 )) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
320 (defsubst ediff-collect-diffs-metajob (&optional metajob) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
321 (memq (or metajob ediff-metajob-name) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
322 '(ediff-directories |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
323 ediff-directory-revisions |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
324 ediff-merge-directories |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
325 ediff-merge-directories-with-ancestor |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
326 ediff-merge-directory-revisions |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
327 ediff-merge-directory-revisions-with-ancestor |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
328 ;; add more here |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
329 ))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
330 (defsubst ediff-merge-metajob (&optional metajob) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
331 (memq (or metajob ediff-metajob-name) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
332 '(ediff-merge-directories |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
333 ediff-merge-directories-with-ancestor |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
334 ediff-merge-directory-revisions |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
335 ediff-merge-directory-revisions-with-ancestor |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
336 ediff-merge-filegroups-with-ancestor |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
337 ;; add more here |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
338 ))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
339 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
340 (defsubst ediff-metajob3 (&optional metajob) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
341 (memq (or metajob ediff-metajob-name) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
342 '(ediff-merge-directories-with-ancestor |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
343 ediff-merge-filegroups-with-ancestor |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
344 ediff-directories3 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
345 ediff-filegroups3))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
346 (defsubst ediff-comparison-metajob3 (&optional metajob) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
347 (memq (or metajob ediff-metajob-name) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
348 '(ediff-directories3 ediff-filegroups3))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
349 |
16766
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
350 ;; with no argument, checks if we are in ediff-control-buffer |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
351 ;; with argument, checks if we are in ediff-meta-buffer |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
352 (defun ediff-in-control-buffer-p (&optional meta-buf-p) |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
353 (and (boundp 'ediff-control-buffer) |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
354 (eq (if meta-buf-p ediff-meta-buffer ediff-control-buffer) |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
355 (current-buffer)))) |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
356 |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
357 (defsubst ediff-barf-if-not-control-buffer (&optional meta-buf-p) |
beb94a5271e2
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16248
diff
changeset
|
358 (or (ediff-in-control-buffer-p meta-buf-p) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
359 (error "%S: This command runs in Ediff Control Buffer only!" |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
360 this-command))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
361 |
20206 | 362 (defgroup ediff-highlighting nil |
363 "Hilighting of difference regions in Ediff" | |
364 :prefix "ediff-" | |
365 :group 'ediff) | |
366 | |
367 (defgroup ediff-merge nil | |
368 "Merging utilities" | |
369 :prefix "ediff-" | |
370 :group 'ediff) | |
371 | |
372 (defgroup ediff-hook nil | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
373 "Hooks run by Ediff" |
20206 | 374 :prefix "ediff-" |
375 :group 'ediff) | |
376 | |
11042 | 377 ;; Hook variables |
378 | |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
379 (defcustom ediff-before-setup-hook nil |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
380 "*Hooks to run before Ediff begins to set up windows and buffers. |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
381 This hook can be used to save the previous window config, which can be restored |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
382 on ediff-quit or ediff-suspend." |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
383 :type 'hook |
35377 | 384 :version "21.1" |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
385 :group 'ediff-hook) |
18839 | 386 (defcustom ediff-before-setup-windows-hook nil |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
387 "*Hooks to run before Ediff sets its window configuration. |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
388 This hook is run every time when Ediff arranges its windows. |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
389 This happens each time Ediff detects that the windows were messed up by the |
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
390 user." |
18839 | 391 :type 'hook |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
392 :group 'ediff-hook) |
18839 | 393 (defcustom ediff-after-setup-windows-hook nil |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
394 "*Hooks to run after Ediff sets its window configuration. |
18839 | 395 This can be used to set up control window or icon in a desired place." |
396 :type 'hook | |
20206 | 397 :group 'ediff-hook) |
18839 | 398 (defcustom ediff-before-setup-control-frame-hook nil |
11042 | 399 "*Hooks run before setting up the frame to display Ediff Control Panel. |
400 Can be used to change control frame parameters to position it where it | |
18839 | 401 is desirable." |
402 :type 'hook | |
20206 | 403 :group 'ediff-hook) |
18839 | 404 (defcustom ediff-after-setup-control-frame-hook nil |
11042 | 405 "*Hooks run after setting up the frame to display Ediff Control Panel. |
18839 | 406 Can be used to move the frame where it is desired." |
407 :type 'hook | |
20206 | 408 :group 'ediff-hook) |
18839 | 409 (defcustom ediff-startup-hook nil |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
410 "*Hooks to run in the control buffer after Ediff has been set up and is ready for the job." |
18839 | 411 :type 'hook |
20206 | 412 :group 'ediff-hook) |
18839 | 413 (defcustom ediff-select-hook nil |
414 "*Hooks to run after a difference has been selected." | |
415 :type 'hook | |
20206 | 416 :group 'ediff-hook) |
18839 | 417 (defcustom ediff-unselect-hook nil |
418 "*Hooks to run after a difference has been unselected." | |
419 :type 'hook | |
20206 | 420 :group 'ediff-hook) |
18839 | 421 (defcustom ediff-prepare-buffer-hook nil |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
422 "*Hooks run after buffers A, B, and C are set up. |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
423 For each buffer, the hooks are run with that buffer made current." |
18839 | 424 :type 'hook |
20206 | 425 :group 'ediff-hook) |
18839 | 426 (defcustom ediff-load-hook nil |
427 "*Hook run after Ediff is loaded. Can be used to change defaults." | |
428 :type 'hook | |
20206 | 429 :group 'ediff-hook) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
430 |
18839 | 431 (defcustom ediff-mode-hook nil |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
432 "*Hook run just after ediff-mode is set up in the control buffer. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
433 This is done before any windows or frames are created. One can use it to |
18839 | 434 set local variables that determine how the display looks like." |
435 :type 'hook | |
20206 | 436 :group 'ediff-hook) |
18839 | 437 (defcustom ediff-keymap-setup-hook nil |
438 "*Hook run just after the default bindings in Ediff keymap are set up." | |
439 :type 'hook | |
20206 | 440 :group 'ediff-hook) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
441 |
18839 | 442 (defcustom ediff-display-help-hook nil |
443 "*Hooks run after preparing the help message." | |
444 :type 'hook | |
20206 | 445 :group 'ediff-hook) |
11042 | 446 |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
447 (defcustom ediff-suspend-hook nil |
18839 | 448 "*Hooks to run in the Ediff control buffer when Ediff is suspended." |
449 :type 'hook | |
20206 | 450 :group 'ediff-hook) |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
451 (defcustom ediff-quit-hook nil |
18839 | 452 "*Hooks to run in the Ediff control buffer after finishing Ediff." |
453 :type 'hook | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
454 :group 'ediff-hook) |
18839 | 455 (defcustom ediff-cleanup-hook nil |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
456 "*Hooks to run on exiting Ediff but before killing the control and variant buffers." |
18839 | 457 :type 'hook |
20206 | 458 :group 'ediff-hook) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
459 |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
460 ;; Error messages |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
461 (defconst ediff-KILLED-VITAL-BUFFER |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
462 "You have killed a vital Ediff buffer---you must leave Ediff now!") |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
463 (defconst ediff-NO-DIFFERENCES |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
464 "Sorry, comparison of identical variants is not what I am made for...") |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
465 (defconst ediff-BAD-DIFF-NUMBER |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
466 ;; %S stands for this-command, %d - diff number, %d - max diff |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
467 "%S: Bad diff region number, %d. Valid numbers are 1 to %d") |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
468 (defconst ediff-BAD-INFO (format " |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
469 *** The Info file for Ediff, a part of the standard distribution |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
470 *** of %sEmacs, does not seem to be properly installed. |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
471 *** |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
472 *** Please contact your system administrator. " |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
473 (if ediff-xemacs-p "X" ""))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
474 |
11042 | 475 ;; Selective browsing |
476 | |
477 (ediff-defvar-local ediff-skip-diff-region-function 'ediff-show-all-diffs | |
478 "Function that determines the next/previous diff region to show. | |
479 Should return t for regions to be ignored and nil otherwise. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
480 This function gets a region number as an argument. The region number |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
481 is the one used internally by Ediff. It is 1 less than the number seen |
11042 | 482 by the user.") |
483 | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
484 (ediff-defvar-local ediff-hide-regexp-matches-function |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
485 'ediff-hide-regexp-matches |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
486 "Function to use in determining which regions to hide. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
487 See the documentation string of `ediff-hide-regexp-matches' for details.") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
488 (ediff-defvar-local ediff-focus-on-regexp-matches-function |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
489 'ediff-focus-on-regexp-matches |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
490 "Function to use in determining which regions to focus on. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
491 See the documentation string of `ediff-focus-on-regexp-matches' for details.") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
492 |
11042 | 493 ;; Regexp that determines buf A regions to focus on when skipping to diff |
494 (ediff-defvar-local ediff-regexp-focus-A "" "") | |
495 ;; Regexp that determines buf B regions to focus on when skipping to diff | |
496 (ediff-defvar-local ediff-regexp-focus-B "" "") | |
497 ;; Regexp that determines buf C regions to focus on when skipping to diff | |
498 (ediff-defvar-local ediff-regexp-focus-C "" "") | |
499 ;; connective that determines whether to focus regions that match both or | |
500 ;; one of the regexps | |
501 (ediff-defvar-local ediff-focus-regexp-connective 'and "") | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
502 |
11042 | 503 ;; Regexp that determines buf A regions to ignore when skipping to diff |
504 (ediff-defvar-local ediff-regexp-hide-A "" "") | |
505 ;; Regexp that determines buf B regions to ignore when skipping to diff | |
506 (ediff-defvar-local ediff-regexp-hide-B "" "") | |
507 ;; Regexp that determines buf C regions to ignore when skipping to diff | |
508 (ediff-defvar-local ediff-regexp-hide-C "" "") | |
509 ;; connective that determines whether to hide regions that match both or | |
510 ;; one of the regexps | |
511 (ediff-defvar-local ediff-hide-regexp-connective 'and "") | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
512 |
18839 | 513 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
514 ;;; Copying difference regions between buffers. |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
515 |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
516 ;; A list of killed diffs. |
18839 | 517 ;; A diff is saved here if it is replaced by a diff |
518 ;; from another buffer. This alist has the form: | |
519 ;; \((num (buff-object . diff) (buff-object . diff) (buff-object . diff)) ...), | |
520 ;; where some buffer-objects may be missing. | |
521 (ediff-defvar-local ediff-killed-diffs-alist nil "") | |
11042 | 522 |
523 | |
524 ;; Highlighting | |
18839 | 525 (defcustom ediff-before-flag-bol (if ediff-xemacs-p (make-glyph "->>") "->>") |
526 "*Flag placed before a highlighted block of differences, if block starts at beginning of a line." | |
527 :type 'string | |
528 :tag "Region before-flag at beginning of line" | |
529 :group 'ediff) | |
11042 | 530 |
18839 | 531 (defcustom ediff-after-flag-eol (if ediff-xemacs-p (make-glyph "<<-") "<<-") |
532 "*Flag placed after a highlighted block of differences, if block ends at end of a line." | |
533 :type 'string | |
534 :tag "Region after-flag at end of line" | |
535 :group 'ediff) | |
536 | |
537 (defcustom ediff-before-flag-mol (if ediff-xemacs-p (make-glyph "->>") "->>") | |
538 "*Flag placed before a highlighted block of differences, if block starts in mid-line." | |
539 :type 'string | |
540 :tag "Region before-flag in the middle of line" | |
541 :group 'ediff) | |
542 (defcustom ediff-after-flag-mol (if ediff-xemacs-p (make-glyph "<<-") "<<-") | |
543 "*Flag placed after a highlighted block of differences, if block ends in mid-line." | |
544 :type 'string | |
545 :tag "Region after-flag in the middle of line" | |
546 :group 'ediff) | |
11042 | 547 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
548 |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
549 (ediff-defvar-local ediff-use-faces t "") |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
550 (defcustom ediff-use-faces t |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
551 "If t, differences are highlighted using faces, if device supports faces. |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
552 If nil, differences are highlighted using ASCII flags, ediff-before-flag |
11042 | 553 and ediff-after-flag. On a non-window system, differences are always |
21940 | 554 highlighted using ASCII flags." |
555 :type 'boolean | |
556 :group 'ediff-highlighting) | |
11042 | 557 |
558 ;; this indicates that diff regions are word-size, so fine diffs are | |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
559 ;; permanently nixed; used in ediff-windows-wordwise and ediff-regions-wordwise |
11042 | 560 (ediff-defvar-local ediff-word-mode nil "") |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
561 ;; Name of the job (ediff-files, ediff-windows, etc.) |
11042 | 562 (ediff-defvar-local ediff-job-name nil "") |
563 | |
564 ;; Narrowing and ediff-region/windows support | |
565 ;; This is a list (overlay-A overlay-B overlay-C) | |
566 ;; If set, Ediff compares only those parts of buffers A/B/C that lie within | |
567 ;; the bounds of these overlays. | |
568 (ediff-defvar-local ediff-narrow-bounds nil "") | |
569 | |
570 ;; List (overlay-A overlay-B overlay-C), where each overlay spans the | |
571 ;; entire corresponding buffer. | |
572 (ediff-defvar-local ediff-wide-bounds nil "") | |
573 | |
574 ;; Current visibility boundaries in buffers A, B, and C. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
575 ;; This is also a list of overlays. When the user toggles narrow/widen, |
11042 | 576 ;; this list changes from ediff-wide-bounds to ediff-narrow-bounds. |
577 ;; and back. | |
578 (ediff-defvar-local ediff-visible-bounds nil "") | |
579 | |
580 (ediff-defvar-local ediff-start-narrowed t | |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
581 "Non-nil means start narrowed, if doing ediff-windows-* or ediff-regions-*") |
11042 | 582 (ediff-defvar-local ediff-quit-widened t |
583 "*Non-nil means: when finished, Ediff widens buffers A/B. | |
584 Actually, Ediff restores the scope of visibility that existed at startup.") | |
18839 | 585 |
586 (defcustom ediff-keep-variants t | |
587 "*Nil means that non-modified variant buffers should be removed at the end of the session after some interrogation. | |
13977
11784c04028a
(ediff-keep-variants): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
13494
diff
changeset
|
588 Supplying a prefix argument to the quit command `q' temporarily reverses the |
18839 | 589 meaning of this variable." |
590 :type 'boolean | |
591 :group 'ediff) | |
11042 | 592 |
21961
ace3a9c44f3a
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
21940
diff
changeset
|
593 (ediff-defvar-local ediff-highlight-all-diffs t "") |
21940 | 594 (defcustom ediff-highlight-all-diffs t |
11042 | 595 "If nil, only the selected differences are highlighted. |
21940 | 596 Otherwise, all difference regions are highlighted, but the selected region is |
597 shown in brighter colors." | |
598 :type 'boolean | |
599 :group 'ediff-highlighting) | |
11042 | 600 |
601 ;; A var local to each control panel buffer. Indicates highlighting style | |
602 ;; in effect for this buffer: `face', `ascii', nil -- temporarily | |
603 ;; unhighlighted, `off' -- turned off \(on a dumb terminal only\). | |
604 (ediff-defvar-local ediff-highlighting-style nil "") | |
605 | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
606 |
11042 | 607 ;; The suffix of the control buffer name. |
608 (ediff-defvar-local ediff-control-buffer-suffix nil "") | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
609 ;; Same as ediff-control-buffer-suffix, but without <,>. |
11042 | 610 ;; It's a number rather than string. |
611 (ediff-defvar-local ediff-control-buffer-number nil "") | |
612 | |
613 | |
614 ;; The original values of ediff-protected-variables for buffer A | |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
615 (ediff-defvar-local ediff-buffer-values-orig-A nil "") |
11042 | 616 ;; The original values of ediff-protected-variables for buffer B |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
617 (ediff-defvar-local ediff-buffer-values-orig-B nil "") |
11042 | 618 ;; The original values of ediff-protected-variables for buffer C |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
619 (ediff-defvar-local ediff-buffer-values-orig-C nil "") |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
620 ;; The original values of ediff-protected-variables for buffer Ancestor |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
621 (ediff-defvar-local ediff-buffer-values-orig-Ancestor nil "") |
18839 | 622 |
19047 | 623 ;; association between buff-type and ediff-buffer-values-orig-* |
624 (defconst ediff-buffer-values-orig-alist | |
625 '((A . ediff-buffer-values-orig-A) | |
626 (B . ediff-buffer-values-orig-B) | |
627 (C . ediff-buffer-values-orig-C) | |
628 (Ancestor . ediff-buffer-values-orig-Ancestor))) | |
629 | |
11042 | 630 ;; Buffer-local variables to be saved then restored during Ediff sessions |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
631 (defconst ediff-protected-variables '( |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
632 ;;buffer-read-only |
11042 | 633 mode-line-format)) |
634 | |
635 ;; Vector of differences between the variants. Each difference is | |
636 ;; represented by a vector of two overlays plus a vector of fine diffs, | |
637 ;; plus a no-fine-diffs flag. The first overlay spans the | |
638 ;; difference region in the A buffer and the second overlays the diff in | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
639 ;; the B buffer. If a difference section is empty, the corresponding |
11042 | 640 ;; overlay's endpoints coincide. |
641 ;; | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
642 ;; The precise form of a Difference Vector for one buffer is: |
11042 | 643 ;; [diff diff diff ...] |
644 ;; where each diff has the form: | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
645 ;; [diff-overlay fine-diff-vector no-fine-diffs-flag state-of-diff] |
11042 | 646 ;; fine-diff-vector is a vector [fine-diff-overlay fine-diff-overlay ...] |
647 ;; no-fine-diffs-flag says if there are fine differences. | |
648 ;; state-of-difference is A, B, C, or nil, indicating which buffer is | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
649 ;; different from the other two (used only in 3-way jobs. |
11042 | 650 (ediff-defvar-local ediff-difference-vector-A nil "") |
651 (ediff-defvar-local ediff-difference-vector-B nil "") | |
652 (ediff-defvar-local ediff-difference-vector-C nil "") | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
653 (ediff-defvar-local ediff-difference-vector-Ancestor nil "") |
19047 | 654 ;; A-list of diff vector types associated with buffer types |
655 (defconst ediff-difference-vector-alist | |
656 '((A . ediff-difference-vector-A) | |
657 (B . ediff-difference-vector-B) | |
658 (C . ediff-difference-vector-C) | |
659 (Ancestor . ediff-difference-vector-Ancestor))) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
660 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
661 ;; [ status status status ...] |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
662 ;; Each status: [state-of-merge state-of-ancestor] |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
663 ;; state-of-merge is default-A, default-B, prefer-A, or prefer-B. It |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
664 ;; indicates the way a diff region was created in buffer C. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
665 ;; state-of-ancestor says if the corresponding region in ancestor buffer is |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
666 ;; empty. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
667 (ediff-defvar-local ediff-state-of-merge nil "") |
11042 | 668 |
669 ;; The difference that is currently selected. | |
670 (ediff-defvar-local ediff-current-difference -1 "") | |
671 ;; Number of differences found. | |
672 (ediff-defvar-local ediff-number-of-differences nil "") | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
673 |
11042 | 674 ;; Buffer containing the output of diff, which is used by Ediff to step |
675 ;; through files. | |
676 (ediff-defvar-local ediff-diff-buffer nil "") | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
677 ;; Like ediff-diff-buffer, but contains context diff. It is not used by |
11042 | 678 ;; Ediff, but it is saved in a file, if user requests so. |
679 (ediff-defvar-local ediff-custom-diff-buffer nil "") | |
680 ;; Buffer used for diff-style fine differences between regions. | |
681 (ediff-defvar-local ediff-fine-diff-buffer nil "") | |
682 ;; Temporary buffer used for computing fine differences. | |
683 (defconst ediff-tmp-buffer " *ediff-tmp*" "") | |
684 ;; Buffer used for messages | |
685 (defconst ediff-msg-buffer " *ediff-message*" "") | |
686 ;; Buffer containing the output of diff when diff returns errors. | |
687 (ediff-defvar-local ediff-error-buffer nil "") | |
688 ;; Buffer to display debug info | |
689 (ediff-defvar-local ediff-debug-buffer "*ediff-debug*" "") | |
690 | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
691 ;; List of ediff control panels associated with each buffer A/B/C/Ancestor. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
692 ;; Not used any more, but may be needed in the future. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
693 (ediff-defvar-local ediff-this-buffer-ediff-sessions nil "") |
11042 | 694 |
695 ;; to be deleted in due time | |
696 ;; List of difference overlays disturbed by working with the current diff. | |
697 (defvar ediff-disturbed-overlays nil "") | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
698 |
11042 | 699 ;; Priority of non-selected overlays. |
700 (defvar ediff-shadow-overlay-priority 100 "") | |
701 | |
18839 | 702 (defcustom ediff-version-control-package 'vc |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
703 "Version control package used. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
704 Currently, Ediff supports vc.el, rcs.el, pcl-cvs.el, and generic-sc.el. The |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
705 standard Emacs interface to RCS, CVS, SCCS, etc., is vc.el. However, some |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
706 people find the other two packages more convenient. Set this variable to the |
18839 | 707 appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire." |
708 :type 'symbol | |
709 :group 'ediff) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
710 |
11042 | 711 |
712 (if ediff-xemacs-p | |
713 (progn | |
714 (fset 'ediff-read-event (symbol-function 'next-command-event)) | |
715 (fset 'ediff-overlayp (symbol-function 'extentp)) | |
716 (fset 'ediff-make-overlay (symbol-function 'make-extent)) | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
717 (fset 'ediff-delete-overlay (symbol-function 'delete-extent))) |
11042 | 718 (fset 'ediff-read-event (symbol-function 'read-event)) |
719 (fset 'ediff-overlayp (symbol-function 'overlayp)) | |
720 (fset 'ediff-make-overlay (symbol-function 'make-overlay)) | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
721 (fset 'ediff-delete-overlay (symbol-function 'delete-overlay))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
722 |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
723 ;; Check the current version against the major and minor version numbers |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
724 ;; using op: cur-vers op major.minor If emacs-major-version or |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
725 ;; emacs-minor-version are not defined, we assume that the current version |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
726 ;; is hopelessly outdated. We assume that emacs-major-version and |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
727 ;; emacs-minor-version are defined. Otherwise, for Emacs/XEmacs 19, if the |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
728 ;; current minor version is < 10 (xemacs) or < 23 (emacs) the return value |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
729 ;; will be nil (when op is =, >, or >=) and t (when op is <, <=), which may be |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
730 ;; incorrect. However, this gives correct result in our cases, since we are |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
731 ;; testing for sufficiently high Emacs versions. |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
732 (defun ediff-check-version (op major minor &optional type-of-emacs) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
733 (if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version)) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
734 (and (cond ((eq type-of-emacs 'xemacs) ediff-xemacs-p) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
735 ((eq type-of-emacs 'emacs) ediff-emacs-p) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
736 (t t)) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
737 (cond ((eq op '=) (and (= emacs-minor-version minor) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
738 (= emacs-major-version major))) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
739 ((memq op '(> >= < <=)) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
740 (and (or (funcall op emacs-major-version major) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
741 (= emacs-major-version major)) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
742 (if (= emacs-major-version major) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
743 (funcall op emacs-minor-version minor) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
744 t))) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
745 (t |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
746 (error "%S: Invalid op in ediff-check-version" op)))) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
747 (cond ((memq op '(= > >=)) nil) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
748 ((memq op '(< <=)) t)))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
749 |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
750 |
30089
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
751 (defun ediff-color-display-p () |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
752 (condition-case nil |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
753 (if ediff-emacs-p |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
754 (if (fboundp 'display-color-p) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
755 (display-color-p) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
756 (x-display-color-p)) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
757 (eq (device-class (selected-device)) 'color)) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
758 (error |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
759 nil))) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
760 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
761 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
762 (if (ediff-has-face-support-p) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
763 (if ediff-xemacs-p |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
764 (progn |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
765 (fset 'ediff-valid-color-p (symbol-function 'valid-color-name-p)) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
766 (fset 'ediff-get-face (symbol-function 'get-face))) |
30089
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
767 (fset 'ediff-valid-color-p (symbol-function |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
768 (if (fboundp 'color-defined-p) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
769 'color-defined-p |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
770 'x-color-defined-p))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
771 (fset 'ediff-get-face (symbol-function 'internal-get-face)))) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
772 |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
773 (if (ediff-window-display-p) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
774 (if ediff-xemacs-p |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
775 (progn |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
776 (fset 'ediff-display-pixel-width |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
777 (symbol-function 'device-pixel-width)) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
778 (fset 'ediff-display-pixel-height |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
779 (symbol-function 'device-pixel-height))) |
30089
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
780 (fset 'ediff-display-pixel-width (symbol-function |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
781 (if (fboundp 'display-pixel-width) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
782 'display-pixel-width |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
783 'x-display-pixel-width))) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
784 (fset 'ediff-display-pixel-height (symbol-function |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
785 (if (fboundp 'display-pixel-height) |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
786 'display-pixel-height |
f7f64f1ccc38
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
29412
diff
changeset
|
787 'x-display-pixel-height))))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
788 |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
789 ;; A-list of current-diff-overlay symbols associated with buf types |
19047 | 790 (defconst ediff-current-diff-overlay-alist |
791 '((A . ediff-current-diff-overlay-A) | |
792 (B . ediff-current-diff-overlay-B) | |
793 (C . ediff-current-diff-overlay-C) | |
794 (Ancestor . ediff-current-diff-overlay-Ancestor))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
795 |
33019
6306740f6938
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
30394
diff
changeset
|
796 ;; A-list of current-diff-face-* symbols associated with buf types |
19047 | 797 (defconst ediff-current-diff-face-alist |
798 '((A . ediff-current-diff-face-A) | |
799 (B . ediff-current-diff-face-B) | |
800 (C . ediff-current-diff-face-C) | |
801 (Ancestor . ediff-current-diff-face-Ancestor))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
802 |
11042 | 803 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
804 (defun ediff-make-current-diff-overlay (type) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
805 (if (ediff-has-face-support-p) |
19047 | 806 (let ((overlay (ediff-get-symbol-from-alist |
807 type ediff-current-diff-overlay-alist)) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
808 (buffer (ediff-get-buffer type)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
809 (face (face-name |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
810 (symbol-value |
19047 | 811 (ediff-get-symbol-from-alist |
812 type ediff-current-diff-face-alist))))) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
813 (set overlay |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
814 (ediff-make-bullet-proof-overlay (point-max) (point-max) buffer)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
815 (ediff-set-overlay-face (symbol-value overlay) face) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
816 (ediff-overlay-put (symbol-value overlay) 'ediff ediff-control-buffer)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
817 )) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
818 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
819 (defun ediff-set-overlay-face (extent face) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
820 (ediff-overlay-put extent 'face face) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
821 (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
822 |
30373
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
823 (defun ediff-region-help-echo (extent-or-window &optional overlay point) |
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
824 (unless overlay |
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
825 (setq overlay extent-or-window)) |
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
826 (let ((is-current (ediff-overlay-get overlay 'ediff)) |
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
827 (face (ediff-overlay-get overlay 'face)) |
30394
557b7595fdcc
(ediff-region-help-echo): Bind face-help.
Dave Love <fx@gnu.org>
parents:
30373
diff
changeset
|
828 (diff-num (ediff-overlay-get overlay 'ediff-diff-num)) |
557b7595fdcc
(ediff-region-help-echo): Bind face-help.
Dave Love <fx@gnu.org>
parents:
30373
diff
changeset
|
829 face-help) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
830 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
831 ;; This happens only for refinement overlays |
30373
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
832 (if (stringp face) |
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
833 (setq face (intern face))) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
834 (setq face-help (and face (get face 'ediff-help-echo))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
835 |
30330
b1d77f56dfb3
(ediff-region-help-echo): Partially fix for Emacs implementation.
Dave Love <fx@gnu.org>
parents:
30089
diff
changeset
|
836 (cond ((and is-current diff-num) ; current diff region |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
837 (format "Difference region %S -- current" (1+ diff-num))) |
30373
6da8732233ea
(ediff-region-help-echo): Modify to use overlay
Dave Love <fx@gnu.org>
parents:
30332
diff
changeset
|
838 (face-help) ; refinement of current diff region |
30330
b1d77f56dfb3
(ediff-region-help-echo): Partially fix for Emacs implementation.
Dave Love <fx@gnu.org>
parents:
30089
diff
changeset
|
839 (diff-num ; non-current |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
840 (format "Difference region %S -- non-current" (1+ diff-num))) |
30330
b1d77f56dfb3
(ediff-region-help-echo): Partially fix for Emacs implementation.
Dave Love <fx@gnu.org>
parents:
30089
diff
changeset
|
841 (t "")) ; none |
30332 | 842 )) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
843 |
14534
3c38a5112cb6
Make sure `facemenu-unlisted-faces' is bound.
Richard M. Stallman <rms@gnu.org>
parents:
14419
diff
changeset
|
844 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
845 (defun ediff-set-face-pixmap (face pixmap) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
846 "Set face pixmap on a monochrome display." |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
847 (if (and (ediff-window-display-p) (not (ediff-color-display-p))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
848 (condition-case nil |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
849 (set-face-background-pixmap face pixmap) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
850 (error |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
851 (message "Pixmap not found for %S: %s" (face-name face) pixmap) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
852 (sit-for 1))))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
853 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
854 (defun ediff-hide-face (face) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
855 (if (and (ediff-has-face-support-p) ediff-emacs-p) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
856 (add-to-list 'facemenu-unlisted-faces face))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
857 |
19241 | 858 |
859 | |
860 (defface ediff-current-diff-face-A | |
861 '((((class color)) (:foreground "firebrick" :background "pale green")) | |
862 (t (:inverse-video t))) | |
863 "Face for highlighting the selected difference in buffer A." | |
864 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
865 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 866 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 867 (defvar ediff-current-diff-face-A 'ediff-current-diff-face-A |
868 "Face for highlighting the selected difference in buffer A. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
869 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 870 widget to customize the actual face object `ediff-current-diff-face-A' |
871 this variable represents.") | |
19241 | 872 (ediff-hide-face 'ediff-current-diff-face-A) |
873 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | |
874 ;; This means that some user customization may be trashed. | |
875 (if (and ediff-xemacs-p | |
876 (ediff-has-face-support-p) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
877 (not (ediff-color-display-p))) |
19241 | 878 (copy-face 'modeline 'ediff-current-diff-face-A)) |
879 | |
880 | |
11042 | 881 |
19241 | 882 (defface ediff-current-diff-face-B |
883 '((((class color)) (:foreground "DarkOrchid" :background "Yellow")) | |
884 (t (:inverse-video t))) | |
885 "Face for highlighting the selected difference in buffer B." | |
886 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
887 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 888 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 889 (defvar ediff-current-diff-face-B 'ediff-current-diff-face-B |
890 "Face for highlighting the selected difference in buffer B. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
891 this variable. Instead, use the customization |
20003 | 892 widget to customize the actual face `ediff-current-diff-face-B' |
893 this variable represents.") | |
19241 | 894 (ediff-hide-face 'ediff-current-diff-face-B) |
895 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | |
896 ;; This means that some user customization may be trashed. | |
897 (if (and ediff-xemacs-p | |
898 (ediff-has-face-support-p) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
899 (not (ediff-color-display-p))) |
19241 | 900 (copy-face 'modeline 'ediff-current-diff-face-B)) |
901 | |
11042 | 902 |
19241 | 903 (defface ediff-current-diff-face-C |
904 '((((class color)) (:foreground "Navy" :background "Pink")) | |
905 (t (:inverse-video t))) | |
906 "Face for highlighting the selected difference in buffer C." | |
907 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
908 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 909 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 910 (defvar ediff-current-diff-face-C 'ediff-current-diff-face-C |
911 "Face for highlighting the selected difference in buffer C. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
912 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 913 widget to customize the actual face object `ediff-current-diff-face-C' |
914 this variable represents.") | |
19241 | 915 (ediff-hide-face 'ediff-current-diff-face-C) |
916 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | |
917 ;; This means that some user customization may be trashed. | |
918 (if (and ediff-xemacs-p | |
919 (ediff-has-face-support-p) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
920 (not (ediff-color-display-p))) |
19241 | 921 (copy-face 'modeline 'ediff-current-diff-face-C)) |
922 | |
923 | |
924 (defface ediff-current-diff-face-Ancestor | |
925 '((((class color)) (:foreground "Black" :background "VioletRed")) | |
926 (t (:inverse-video t))) | |
927 "Face for highlighting the selected difference in buffer Ancestor." | |
928 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
929 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 930 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 931 (defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-face-Ancestor |
932 "Face for highlighting the selected difference in buffer Ancestor. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
933 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 934 widget to customize the actual face object `ediff-current-diff-face-Ancestor' |
935 this variable represents.") | |
19241 | 936 (ediff-hide-face 'ediff-current-diff-face-Ancestor) |
937 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this. | |
938 ;; This means that some user customization may be trashed. | |
939 (if (and ediff-xemacs-p | |
940 (ediff-has-face-support-p) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
941 (not (ediff-color-display-p))) |
19241 | 942 (copy-face 'modeline 'ediff-current-diff-face-Ancestor)) |
943 | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
944 |
19241 | 945 (defface ediff-fine-diff-face-A |
946 '((((class color)) (:foreground "Navy" :background "sky blue")) | |
947 (t (:underline t :stipple "gray3"))) | |
948 "Face for highlighting the refinement of the selected diff in buffer A." | |
949 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
950 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 951 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 952 (defvar ediff-fine-diff-face-A 'ediff-fine-diff-face-A |
953 "Face for highlighting the fine differences in buffer A. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
954 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 955 widget to customize the actual face object `ediff-fine-diff-face-A' |
956 this variable represents.") | |
19241 | 957 (ediff-hide-face 'ediff-fine-diff-face-A) |
20343 | 958 |
19241 | 959 (defface ediff-fine-diff-face-B |
960 '((((class color)) (:foreground "Black" :background "cyan")) | |
961 (t (:underline t :stipple "gray3"))) | |
962 "Face for highlighting the refinement of the selected diff in buffer B." | |
963 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
964 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 965 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 966 (defvar ediff-fine-diff-face-B 'ediff-fine-diff-face-B |
967 "Face for highlighting the fine differences in buffer B. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
968 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 969 widget to customize the actual face object `ediff-fine-diff-face-B' |
970 this variable represents.") | |
19241 | 971 (ediff-hide-face 'ediff-fine-diff-face-B) |
20343 | 972 |
19241 | 973 (defface ediff-fine-diff-face-C |
974 '((((class color)) (:foreground "Black" :background "Turquoise")) | |
975 (t (:underline t :stipple "gray3"))) | |
976 "Face for highlighting the refinement of the selected diff in buffer C." | |
977 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
978 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 979 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 980 (defvar ediff-fine-diff-face-C 'ediff-fine-diff-face-C |
981 "Face for highlighting the fine differences in buffer C. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
982 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 983 widget to customize the actual face object `ediff-fine-diff-face-C' |
984 this variable represents.") | |
19241 | 985 (ediff-hide-face 'ediff-fine-diff-face-C) |
20343 | 986 |
19241 | 987 (defface ediff-fine-diff-face-Ancestor |
988 '((((class color)) (:foreground "Black" :background "Green")) | |
989 (t (:underline t :stipple "gray3"))) | |
990 "Face for highlighting the refinement of the selected diff in the ancestor buffer. | |
991 At present, this face is not used and no fine differences are computed for the | |
992 ancestor buffer." | |
993 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
994 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 995 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 996 (defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-face-Ancestor |
997 "Face for highlighting the fine differences in buffer Ancestor. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
998 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 999 widget to customize the actual face object `ediff-fine-diff-face-Ancestor' |
1000 this variable represents.") | |
19241 | 1001 (ediff-hide-face 'ediff-fine-diff-face-Ancestor) |
20343 | 1002 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1003 ;; Some installs don't have stipple or Stipple. So, try them in turn. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1004 (defvar stipple-pixmap |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1005 (cond ((not (ediff-has-face-support-p)) nil) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1006 ((and (boundp 'x-bitmap-file-path) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1007 (locate-library "stipple" t x-bitmap-file-path)) "stipple") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1008 ((and (boundp 'mswindowsx-bitmap-file-path) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1009 (locate-library "stipple" t mswindowsx-bitmap-file-path)) "stipple") |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1010 (t "Stipple"))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1011 |
19241 | 1012 (defface ediff-even-diff-face-A |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1013 `((((class color)) (:foreground "Black" :background "light grey")) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1014 (t (:italic t :stipple ,stipple-pixmap))) |
19241 | 1015 "Face for highlighting even-numbered non-current differences in buffer A." |
1016 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1017 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1018 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1019 (defvar ediff-even-diff-face-A 'ediff-even-diff-face-A |
1020 "Face for highlighting even-numbered non-current differences in buffer A. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1021 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1022 widget to customize the actual face object `ediff-even-diff-face-A' |
1023 this variable represents.") | |
19241 | 1024 (ediff-hide-face 'ediff-even-diff-face-A) |
20343 | 1025 |
19241 | 1026 (defface ediff-even-diff-face-B |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1027 `((((class color)) (:foreground "White" :background "Grey")) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1028 (t (:italic t :stipple ,stipple-pixmap))) |
19241 | 1029 "Face for highlighting even-numbered non-current differences in buffer B." |
1030 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1031 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1032 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1033 (defvar ediff-even-diff-face-B 'ediff-even-diff-face-B |
1034 "Face for highlighting even-numbered non-current differences in buffer B. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1035 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1036 widget to customize the actual face object `ediff-even-diff-face-B' |
1037 this variable represents.") | |
19241 | 1038 (ediff-hide-face 'ediff-even-diff-face-B) |
20343 | 1039 |
19241 | 1040 (defface ediff-even-diff-face-C |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1041 `((((class color)) (:foreground "Black" :background "light grey")) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1042 (t (:italic t :stipple ,stipple-pixmap))) |
19241 | 1043 "Face for highlighting even-numbered non-current differences in buffer C." |
1044 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1045 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1046 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1047 (defvar ediff-even-diff-face-C 'ediff-even-diff-face-C |
1048 "Face for highlighting even-numbered non-current differences in buffer C. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1049 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1050 widget to customize the actual face object `ediff-even-diff-face-C' |
1051 this variable represents.") | |
19241 | 1052 (ediff-hide-face 'ediff-even-diff-face-C) |
20343 | 1053 |
19241 | 1054 (defface ediff-even-diff-face-Ancestor |
26585
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1055 `((((class color)) (:foreground "White" :background "Grey")) |
3ec5a485d0ab
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
1056 (t (:italic t :stipple ,stipple-pixmap))) |
19241 | 1057 "Face for highlighting even-numbered non-current differences in the ancestor buffer." |
1058 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1059 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1060 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1061 (defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-face-Ancestor |
1062 "Face for highlighting even-numbered non-current differences in buffer Ancestor. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1063 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1064 widget to customize the actual face object `ediff-even-diff-face-Ancestor' |
1065 this variable represents.") | |
19241 | 1066 (ediff-hide-face 'ediff-even-diff-face-Ancestor) |
20343 | 1067 |
19047 | 1068 ;; Association between buffer types and even-diff-face symbols |
1069 (defconst ediff-even-diff-face-alist | |
1070 '((A . ediff-even-diff-face-A) | |
1071 (B . ediff-even-diff-face-B) | |
1072 (C . ediff-even-diff-face-C) | |
1073 (Ancestor . ediff-even-diff-face-Ancestor))) | |
1074 | |
19241 | 1075 (defface ediff-odd-diff-face-A |
1076 '((((class color)) (:foreground "White" :background "Grey")) | |
1077 (t (:italic t :stipple "gray1"))) | |
1078 "Face for highlighting odd-numbered non-current differences in buffer A." | |
1079 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1080 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1081 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1082 (defvar ediff-odd-diff-face-A 'ediff-odd-diff-face-A |
1083 "Face for highlighting odd-numbered non-current differences in buffer A. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1084 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1085 widget to customize the actual face object `ediff-odd-diff-face-A' |
1086 this variable represents.") | |
19241 | 1087 (ediff-hide-face 'ediff-odd-diff-face-A) |
20343 | 1088 |
19241 | 1089 |
1090 (defface ediff-odd-diff-face-B | |
1091 '((((class color)) (:foreground "Black" :background "light grey")) | |
1092 (t (:italic t :stipple "gray1"))) | |
1093 "Face for highlighting odd-numbered non-current differences in buffer B." | |
1094 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1095 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1096 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1097 (defvar ediff-odd-diff-face-B 'ediff-odd-diff-face-B |
1098 "Face for highlighting odd-numbered non-current differences in buffer B. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1099 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1100 widget to customize the actual face object `ediff-odd-diff-face-B' |
1101 this variable represents.") | |
19241 | 1102 (ediff-hide-face 'ediff-odd-diff-face-B) |
20343 | 1103 |
19241 | 1104 (defface ediff-odd-diff-face-C |
1105 '((((class color)) (:foreground "White" :background "Grey")) | |
1106 (t (:italic t :stipple "gray1"))) | |
1107 "Face for highlighting odd-numbered non-current differences in buffer C." | |
1108 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1109 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1110 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1111 (defvar ediff-odd-diff-face-C 'ediff-odd-diff-face-C |
1112 "Face for highlighting odd-numbered non-current differences in buffer C. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1113 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1114 widget to customize the actual face object `ediff-odd-diff-face-C' |
1115 this variable represents.") | |
19241 | 1116 (ediff-hide-face 'ediff-odd-diff-face-C) |
20343 | 1117 |
19241 | 1118 (defface ediff-odd-diff-face-Ancestor |
1119 '((((class color)) (:foreground "Black" :background "light grey")) | |
1120 (t (:italic t :stipple "gray1"))) | |
1121 "Face for highlighting odd-numbered non-current differences in the ancestor buffer." | |
1122 :group 'ediff-highlighting) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1123 ;; An internal variable. Ediff takes the face from here. When unhighlighting, |
19241 | 1124 ;; this variable is set to nil, then again to the appropriate face. |
20003 | 1125 (defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-face-Ancestor |
1126 "Face for highlighting odd-numbered non-current differences in buffer Ancestor. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1127 DO NOT CHANGE this variable. Instead, use the customization |
20003 | 1128 widget to customize the actual face object `ediff-odd-diff-face-Ancestor' |
1129 this variable represents.") | |
19241 | 1130 (ediff-hide-face 'ediff-odd-diff-face-Ancestor) |
20343 | 1131 |
19047 | 1132 ;; Association between buffer types and odd-diff-face symbols |
1133 (defconst ediff-odd-diff-face-alist | |
1134 '((A . ediff-odd-diff-face-A) | |
1135 (B . ediff-odd-diff-face-B) | |
1136 (C . ediff-odd-diff-face-C) | |
1137 (Ancestor . ediff-odd-diff-face-Ancestor))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1138 |
19047 | 1139 ;; A-list of fine-diff face symbols associated with buffer types |
1140 (defconst ediff-fine-diff-face-alist | |
1141 '((A . ediff-fine-diff-face-A) | |
1142 (B . ediff-fine-diff-face-B) | |
1143 (C . ediff-fine-diff-face-C) | |
1144 (Ancestor . ediff-fine-diff-face-Ancestor))) | |
1145 | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1146 ;; Help echo |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1147 (put 'ediff-fine-diff-face-A 'ediff-help-echo |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1148 "A `refinement' of the current difference region") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1149 (put 'ediff-fine-diff-face-B 'ediff-help-echo |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1150 "A `refinement' of the current difference region") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1151 (put 'ediff-fine-diff-face-C 'ediff-help-echo |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1152 "A `refinement' of the current difference region") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1153 (put 'ediff-fine-diff-face-Ancestor 'ediff-help-echo |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1154 "A `refinement' of the current difference region") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1155 |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1156 (add-hook 'ediff-quit-hook 'ediff-cleanup-mess) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1157 (add-hook 'ediff-suspend-hook 'ediff-default-suspend-function) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1158 |
11042 | 1159 |
1160 ;;; Overlays | |
1161 | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1162 (ediff-defvar-local ediff-current-diff-overlay-A nil |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1163 "Overlay for the current difference region in buffer A.") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1164 (ediff-defvar-local ediff-current-diff-overlay-B nil |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1165 "Overlay for the current difference region in buffer B.") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1166 (ediff-defvar-local ediff-current-diff-overlay-C nil |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1167 "Overlay for the current difference region in buffer C.") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1168 (ediff-defvar-local ediff-current-diff-overlay-Ancestor nil |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1169 "Overlay for the current difference region in the ancestor buffer.") |
19047 | 1170 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1171 ;; Compute priority of ediff overlay. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1172 (defun ediff-highest-priority (start end buffer) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1173 (let ((pos (max 1 (1- start))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1174 ovr-list) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1175 (if ediff-xemacs-p |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1176 (1+ ediff-shadow-overlay-priority) |
19047 | 1177 (ediff-with-current-buffer buffer |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1178 (while (< pos (min (point-max) (1+ end))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1179 (setq ovr-list (append (overlays-at pos) ovr-list)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1180 (setq pos (next-overlay-change pos))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1181 (1+ (apply '+ |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1182 (mapcar (lambda (ovr) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1183 (if ovr |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1184 (or (ediff-overlay-get ovr 'priority) 0) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1185 0)) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1186 ovr-list) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1187 )) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1188 )))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1189 |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1190 |
11042 | 1191 (defvar ediff-toggle-read-only-function nil |
1192 "*Specifies the function to be used to toggle read-only. | |
1193 If nil, Ediff tries to deduce the function from the binding of C-x C-q. | |
1194 Normally, this is the `toggle-read-only' function, but, if version | |
1195 control is used, it could be `vc-toggle-read-only' or `rcs-toggle-read-only'.") | |
1196 | |
18839 | 1197 (defcustom ediff-make-buffers-readonly-at-startup nil |
1198 "*Make all variant buffers read-only when Ediff starts up. | |
1199 This property can be toggled interactively." | |
1200 :type 'boolean | |
1201 :group 'ediff) | |
1202 | |
11042 | 1203 |
1204 ;;; Misc | |
1205 | |
1206 ;; if nil, this silences some messages | |
1207 (defconst ediff-verbose-p t) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1208 |
20206 | 1209 (defcustom ediff-autostore-merges 'group-jobs-only |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1210 "*Save the results of merge jobs automatically. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1211 Nil means don't save automatically. t means always save. Anything but nil or t |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1212 means save automatically only if the merge job is part of a group of jobs, such |
21940 | 1213 as `ediff-merge-directory' or `ediff-merge-directory-revisions'." |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1214 :type '(choice (const nil) (const t) (const group-jobs-only)) |
20206 | 1215 :group 'ediff-merge) |
1216 (make-variable-buffer-local 'ediff-autostore-merges) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1217 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1218 ;; file where the result of the merge is to be saved. used internally |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1219 (ediff-defvar-local ediff-merge-store-file nil "") |
29165
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1220 |
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1221 (defcustom ediff-merge-filename-prefix "merge_" |
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1222 "*Prefix to be attached to saved merge buffers." |
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1223 :type 'string |
35377 | 1224 :version "21.1" |
29165
641e43bad886
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26585
diff
changeset
|
1225 :group 'ediff-merge) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1226 |
18839 | 1227 (defcustom ediff-no-emacs-help-in-control-buffer nil |
11042 | 1228 "*Non-nil means C-h should not invoke Emacs help in control buffer. |
18839 | 1229 Instead, C-h would jump to previous difference." |
1230 :type 'boolean | |
1231 :group 'ediff) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1232 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1233 ;; This is the same as temporary-file-directory from Emacs 20.3. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1234 ;; Copied over here because XEmacs doesn't have this variable. |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1235 (defcustom ediff-temp-file-prefix |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1236 (file-name-as-directory |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1237 (cond ((boundp 'temporary-file-directory) temporary-file-directory) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1238 ((fboundp 'temp-directory) (temp-directory)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1239 (t "/tmp/"))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1240 ;;; (file-name-as-directory |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1241 ;;; (cond ((memq system-type '(ms-dos windows-nt)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1242 ;;; (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1243 ;;; ((memq system-type '(vax-vms axp-vms)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1244 ;;; (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "SYS$SCRATCH:")) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1245 ;;; (t |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1246 ;;; (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))) |
11042 | 1247 "*Prefix to put on Ediff temporary file names. |
22098
b2c1e573410e
(ediff-temp-file-prefix): Use temporary-file-directory.
Richard M. Stallman <rms@gnu.org>
parents:
22088
diff
changeset
|
1248 Do not start with `~/' or `~USERNAME/'." |
20206 | 1249 :type 'string |
1250 :group 'ediff) | |
11042 | 1251 |
20206 | 1252 (defcustom ediff-temp-file-mode 384 ; u=rw only |
1253 "*Mode for Ediff temporary files." | |
1254 :type 'integer | |
1255 :group 'ediff) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1256 |
11042 | 1257 ;; Metacharacters that have to be protected from the shell when executing |
1258 ;; a diff/diff3 command. | |
20206 | 1259 (defcustom ediff-metachars "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]" |
1260 "Regexp that matches characters that must be quoted with `\\' in shell command line. | |
1261 This default should work without changes." | |
1262 :type 'string | |
1263 :group 'ediff) | |
11042 | 1264 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1265 ;; needed to simulate frame-char-width in XEmacs. |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1266 (defvar ediff-H-glyph (if ediff-xemacs-p (make-glyph "H"))) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1267 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1268 |
18839 | 1269 ;; Temporary file used for refining difference regions in buffer A. |
1270 (ediff-defvar-local ediff-temp-file-A nil "") | |
1271 ;; Temporary file used for refining difference regions in buffer B. | |
1272 (ediff-defvar-local ediff-temp-file-B nil "") | |
1273 ;; Temporary file used for refining difference regions in buffer C. | |
1274 (ediff-defvar-local ediff-temp-file-C nil "") | |
1275 | |
11042 | 1276 |
1277 ;;; In-line functions | |
1278 | |
18054 | 1279 (or (fboundp 'ediff-file-remote-p) ; user supplied his own function: use it |
1280 (defun ediff-file-remote-p (file-name) | |
34860
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1281 (find-file-name-handler file-name 'file-local-copy))) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1282 ;;; (or (and (featurep 'efs-auto) (efs-ftp-path file-name)) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1283 ;;; (and (featurep 'tramp) (tramp-tramp-file-p file-name)) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1284 ;;; (and (fboundp 'file-remote-p) (file-remote-p file-name)) |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1285 ;;; ;; Can happen only in Emacs, since XEmacs has file-remote-p |
fdb5d08ced13
2000-12-25 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33842
diff
changeset
|
1286 ;;; (and (require 'ange-ftp) (ange-ftp-ftp-name file-name))))) |
11042 | 1287 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1288 |
11042 | 1289 (defsubst ediff-frame-unsplittable-p (frame) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1290 (cdr (assq 'unsplittable (frame-parameters frame)))) |
11042 | 1291 |
1292 (defsubst ediff-get-next-window (wind prev-wind) | |
1293 (or (window-live-p wind) | |
1294 (setq wind (if prev-wind | |
1295 (next-window wind) | |
1296 (selected-window))))) | |
1297 | |
1298 | |
1299 (defsubst ediff-kill-buffer-carefully (buf) | |
1300 "Kill buffer BUF if it exists." | |
1301 (if (ediff-buffer-live-p buf) | |
1302 (kill-buffer (get-buffer buf)))) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1303 |
18054 | 1304 (defsubst ediff-background-face (buf-type dif-num) |
1305 ;; The value of dif-num is always 1- the one that user sees. | |
1306 ;; This is why even face is used when dif-num is odd. | |
19047 | 1307 (ediff-get-symbol-from-alist |
1308 buf-type (if (ediff-odd-p dif-num) | |
1309 ediff-even-diff-face-alist | |
1310 ediff-odd-diff-face-alist) | |
1311 )) | |
18054 | 1312 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1313 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1314 ;; activate faces on diff regions in buffer |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1315 (defun ediff-paint-background-regions-in-one-buffer (buf-type unhighlight) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1316 (let ((diff-vector |
19047 | 1317 (eval (ediff-get-symbol-from-alist |
1318 buf-type ediff-difference-vector-alist))) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1319 overl diff-num) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1320 (mapcar (lambda (rec) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1321 (setq overl (ediff-get-diff-overlay-from-diff-record rec) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1322 diff-num (ediff-overlay-get overl 'ediff-diff-num)) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1323 (if (ediff-overlay-buffer overl) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1324 ;; only if overlay is alive |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1325 (ediff-set-overlay-face |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1326 overl |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1327 (if (not unhighlight) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1328 (ediff-background-face buf-type diff-num)))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1329 ) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1330 diff-vector))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1331 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1332 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1333 ;; activate faces on diff regions in all buffers |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1334 (defun ediff-paint-background-regions (&optional unhighlight) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1335 (ediff-paint-background-regions-in-one-buffer |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1336 'A unhighlight) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1337 (ediff-paint-background-regions-in-one-buffer |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1338 'B unhighlight) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1339 (ediff-paint-background-regions-in-one-buffer |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1340 'C unhighlight) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1341 (ediff-paint-background-regions-in-one-buffer |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1342 'Ancestor unhighlight)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1343 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1344 (defun ediff-highlight-diff-in-one-buffer (n buf-type) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1345 (if (ediff-buffer-live-p (ediff-get-buffer buf-type)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1346 (let* ((buff (ediff-get-buffer buf-type)) |
19047 | 1347 (last (ediff-with-current-buffer buff (point-max))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1348 (begin (ediff-get-diff-posn buf-type 'beg n)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1349 (end (ediff-get-diff-posn buf-type 'end n)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1350 (xtra (if (equal begin end) 1 0)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1351 (end-hilit (min last (+ end xtra))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1352 (current-diff-overlay |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1353 (symbol-value |
19047 | 1354 (ediff-get-symbol-from-alist |
1355 buf-type ediff-current-diff-overlay-alist)))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1356 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1357 (if ediff-xemacs-p |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1358 (ediff-move-overlay current-diff-overlay begin end-hilit) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1359 (ediff-move-overlay current-diff-overlay begin end-hilit buff)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1360 (ediff-overlay-put current-diff-overlay 'priority |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1361 (ediff-highest-priority begin end-hilit buff)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1362 (ediff-overlay-put current-diff-overlay 'ediff-diff-num n) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1363 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1364 ;; unhighlight the background overlay for diff n so it won't |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1365 ;; interfere with the current diff overlay |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1366 (ediff-set-overlay-face (ediff-get-diff-overlay n buf-type) nil) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1367 ))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1368 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1369 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1370 (defun ediff-unhighlight-diff-in-one-buffer (buf-type) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1371 (if (ediff-buffer-live-p (ediff-get-buffer buf-type)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1372 (let ((current-diff-overlay |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1373 (symbol-value |
19047 | 1374 (ediff-get-symbol-from-alist |
1375 buf-type ediff-current-diff-overlay-alist))) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1376 (overlay |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1377 (ediff-get-diff-overlay ediff-current-difference buf-type)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1378 ) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1379 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1380 (ediff-move-overlay current-diff-overlay 1 1) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1381 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1382 ;; rehighlight the overlay in the background of the |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1383 ;; current difference region |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1384 (ediff-set-overlay-face |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1385 overlay |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1386 (if (and (ediff-has-face-support-p) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1387 ediff-use-faces ediff-highlight-all-diffs) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1388 (ediff-background-face buf-type ediff-current-difference))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1389 ))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1390 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1391 (defun ediff-unhighlight-diffs-totally-in-one-buffer (buf-type) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1392 (ediff-unselect-and-select-difference -1) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1393 (if (and (ediff-has-face-support-p) ediff-use-faces) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1394 (let* ((inhibit-quit t) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1395 (current-diff-overlay-var |
19047 | 1396 (ediff-get-symbol-from-alist |
1397 buf-type ediff-current-diff-overlay-alist)) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1398 (current-diff-overlay (symbol-value current-diff-overlay-var))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1399 (ediff-paint-background-regions 'unhighlight) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1400 (if (ediff-overlayp current-diff-overlay) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1401 (ediff-delete-overlay current-diff-overlay)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1402 (set current-diff-overlay-var nil) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1403 ))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1404 |
11042 | 1405 |
1406 (defsubst ediff-highlight-diff (n) | |
1407 "Put face on diff N. Invoked for X displays only." | |
1408 (ediff-highlight-diff-in-one-buffer n 'A) | |
1409 (ediff-highlight-diff-in-one-buffer n 'B) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1410 (ediff-highlight-diff-in-one-buffer n 'C) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1411 (ediff-highlight-diff-in-one-buffer n 'Ancestor) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1412 ) |
11042 | 1413 |
1414 | |
1415 (defsubst ediff-unhighlight-diff () | |
1416 "Remove overlays from buffers A, B, and C." | |
1417 (ediff-unhighlight-diff-in-one-buffer 'A) | |
1418 (ediff-unhighlight-diff-in-one-buffer 'B) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1419 (ediff-unhighlight-diff-in-one-buffer 'C) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1420 (ediff-unhighlight-diff-in-one-buffer 'Ancestor) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1421 ) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1422 |
11042 | 1423 ;; delete highlighting overlays, restore faces to their original form |
1424 (defsubst ediff-unhighlight-diffs-totally () | |
1425 (ediff-unhighlight-diffs-totally-in-one-buffer 'A) | |
1426 (ediff-unhighlight-diffs-totally-in-one-buffer 'B) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1427 (ediff-unhighlight-diffs-totally-in-one-buffer 'C) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1428 (ediff-unhighlight-diffs-totally-in-one-buffer 'Ancestor) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1429 ) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1430 |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1431 |
11042 | 1432 ;; arg is a record for a given diff in a difference vector |
1433 ;; this record is itself a vector | |
1434 (defsubst ediff-clear-fine-diff-vector (diff-record) | |
1435 (if diff-record | |
1436 (mapcar 'ediff-delete-overlay | |
1437 (ediff-get-fine-diff-vector-from-diff-record diff-record)))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1438 |
11042 | 1439 (defsubst ediff-clear-fine-differences-in-one-buffer (n buf-type) |
1440 (ediff-clear-fine-diff-vector (ediff-get-difference n buf-type)) | |
1441 (ediff-set-fine-diff-vector n buf-type nil)) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1442 |
11042 | 1443 (defsubst ediff-clear-fine-differences (n) |
1444 (ediff-clear-fine-differences-in-one-buffer n 'A) | |
1445 (ediff-clear-fine-differences-in-one-buffer n 'B) | |
1446 (if ediff-3way-job | |
1447 (ediff-clear-fine-differences-in-one-buffer n 'C))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1448 |
11042 | 1449 |
1450 (defsubst ediff-convert-fine-diffs-to-overlays (diff-list region-num) | |
1451 (ediff-set-fine-overlays-in-one-buffer 'A diff-list region-num) | |
1452 (ediff-set-fine-overlays-in-one-buffer 'B diff-list region-num) | |
1453 (if ediff-3way-job | |
1454 (ediff-set-fine-overlays-in-one-buffer 'C diff-list region-num) | |
1455 )) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1456 |
11042 | 1457 (defsubst ediff-mouse-event-p (event) |
1458 (if ediff-xemacs-p | |
1459 (button-event-p event) | |
1460 (string-match "mouse" (format "%S" (event-basic-type event))) | |
1461 )) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1462 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1463 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1464 (defsubst ediff-key-press-event-p (event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1465 (if ediff-xemacs-p |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1466 (key-press-event-p event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1467 (or (char-or-string-p event) (symbolp event)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1468 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1469 (defun ediff-event-point (event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1470 (cond ((ediff-mouse-event-p event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1471 (if ediff-xemacs-p |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1472 (event-point event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1473 (posn-point (event-start event)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1474 ((ediff-key-press-event-p event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1475 (point)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1476 (t (error)))) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1477 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1478 (defun ediff-event-buffer (event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1479 (cond ((ediff-mouse-event-p event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1480 (if ediff-xemacs-p |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1481 (event-buffer event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1482 (window-buffer (posn-window (event-start event))))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1483 ((ediff-key-press-event-p event) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1484 (current-buffer)) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1485 (t (error)))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1486 |
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1487 |
11042 | 1488 (defsubst ediff-frame-iconified-p (frame) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1489 (if (and (ediff-window-display-p) (frame-live-p frame)) |
11042 | 1490 (if ediff-xemacs-p |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1491 (frame-iconified-p frame) |
11042 | 1492 (eq (frame-visible-p frame) 'icon)))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1493 |
11042 | 1494 (defsubst ediff-window-visible-p (wind) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1495 ;; under TTY, window-live-p also means window is visible |
11042 | 1496 (and (window-live-p wind) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1497 (or (not (ediff-window-display-p)) |
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1498 (frame-visible-p (window-frame wind))))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1499 |
11042 | 1500 |
1501 (defsubst ediff-frame-char-width (frame) | |
1502 (if ediff-xemacs-p | |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1503 (/ (frame-pixel-width frame) (frame-width frame)) |
11042 | 1504 (frame-char-width frame))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1505 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1506 (defun ediff-reset-mouse (&optional frame do-not-grab-mouse) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1507 (or frame (setq frame (selected-frame))) |
12085
589a32fa67a9
Converted xemacs *screen* nomenclature to *frame*.
Karl Heuer <kwzh@gnu.org>
parents:
11234
diff
changeset
|
1508 (if (ediff-window-display-p) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1509 (let ((frame-or-wind frame)) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1510 (if ediff-xemacs-p |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1511 (setq frame-or-wind (frame-selected-window frame))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1512 (or do-not-grab-mouse |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1513 ;; don't set mouse if the user said to never do this |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1514 (not ediff-grab-mouse) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1515 ;; Don't grab on quit, if the user doesn't want to. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1516 ;; If ediff-grab-mouse = t, then mouse won't be grabbed for |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1517 ;; sessions that are not part of a group (this is done in |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1518 ;; ediff-recenter). The condition below affects only terminating |
13977
11784c04028a
(ediff-keep-variants): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
13494
diff
changeset
|
1519 ;; sessions in session groups (in which case mouse is warped into |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1520 ;; a meta buffer). |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1521 (and (eq ediff-grab-mouse 'maybe) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1522 (memq this-command '(ediff-quit ediff-update-diffs))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1523 (set-mouse-position frame-or-wind 1 0)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1524 ))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1525 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1526 (defsubst ediff-spy-after-mouse () |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1527 (setq ediff-mouse-pixel-position (mouse-pixel-position))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1528 |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1529 ;; It is not easy to find out when the user grabs the mouse, since emacs and |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1530 ;; xemacs behave differently when mouse is not in any frame. Also, this is |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1531 ;; sensitive to when the user grabbed mouse. Not used for now. |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1532 (defun ediff-user-grabbed-mouse () |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1533 (if ediff-mouse-pixel-position |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1534 (cond ((not (eq (car ediff-mouse-pixel-position) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1535 (car (mouse-pixel-position))))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1536 ((and (car (cdr ediff-mouse-pixel-position)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1537 (car (cdr (mouse-pixel-position))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1538 (cdr (cdr ediff-mouse-pixel-position)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1539 (cdr (cdr (mouse-pixel-position)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1540 (not (and (< (abs (- (car (cdr ediff-mouse-pixel-position)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1541 (car (cdr (mouse-pixel-position))))) |
13977
11784c04028a
(ediff-keep-variants): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
13494
diff
changeset
|
1542 ediff-mouse-pixel-threshold) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1543 (< (abs (- (cdr (cdr ediff-mouse-pixel-position)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1544 (cdr (cdr (mouse-pixel-position))))) |
13977
11784c04028a
(ediff-keep-variants): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
13494
diff
changeset
|
1545 ediff-mouse-pixel-threshold)))) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1546 (t nil)))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1547 |
11042 | 1548 (defsubst ediff-frame-char-height (frame) |
1549 (if ediff-xemacs-p | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1550 (glyph-height ediff-H-glyph (selected-window frame)) |
11042 | 1551 (frame-char-height frame))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1552 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1553 ;; Some overlay functions |
11042 | 1554 |
18054 | 1555 (defsubst ediff-overlay-start (overl) |
1556 (if (ediff-overlayp overl) | |
1557 (if ediff-emacs-p | |
1558 (overlay-start overl) | |
1559 (extent-start-position overl)))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1560 |
18054 | 1561 (defsubst ediff-overlay-end (overl) |
1562 (if (ediff-overlayp overl) | |
1563 (if ediff-emacs-p | |
1564 (overlay-end overl) | |
1565 (extent-end-position overl)))) | |
1566 | |
11042 | 1567 (defsubst ediff-empty-overlay-p (overl) |
1568 (= (ediff-overlay-start overl) (ediff-overlay-end overl))) | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1569 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1570 ;; like overlay-buffer in Emacs. In XEmacs, returns nil if the extent is |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1571 ;; dead. Otherwise, works like extent-buffer |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1572 (defun ediff-overlay-buffer (overl) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1573 (if ediff-emacs-p |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1574 (overlay-buffer overl) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1575 (and (extent-live-p overl) (extent-object overl)))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1576 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1577 ;; like overlay-get in Emacs. In XEmacs, returns nil if the extent is |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1578 ;; dead. Otherwise, like extent-property |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1579 (defun ediff-overlay-get (overl property) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1580 (if ediff-emacs-p |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1581 (overlay-get overl property) |
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1582 (and (extent-live-p overl) (extent-property overl property)))) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1583 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1584 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1585 ;; These two functions are here because XEmacs refuses to |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1586 ;; handle overlays whose buffers were deleted. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1587 (defun ediff-move-overlay (overlay beg end &optional buffer) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1588 "Calls `move-overlay' in Emacs and `set-extent-endpoints' in Lemacs. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1589 Checks if overlay's buffer exists before actually doing the move." |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1590 (let ((buf (and overlay (ediff-overlay-buffer overlay)))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1591 (if (ediff-buffer-live-p buf) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1592 (if ediff-xemacs-p |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1593 (set-extent-endpoints overlay beg end) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1594 (move-overlay overlay beg end buffer)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1595 ;; buffer's dead |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1596 (if overlay |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1597 (ediff-delete-overlay overlay))))) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1598 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1599 (defun ediff-overlay-put (overlay prop value) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1600 "Calls `overlay-put' or `set-extent-property' depending on Emacs version. |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1601 Checks if overlay's buffer exists." |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1602 (if (ediff-buffer-live-p (ediff-overlay-buffer overlay)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1603 (if ediff-xemacs-p |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1604 (set-extent-property overlay prop value) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1605 (overlay-put overlay prop value)) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1606 (ediff-delete-overlay overlay))) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1607 |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1608 ;; Some diff region tests |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1609 |
11042 | 1610 ;; t if diff region is empty. |
1611 ;; In case of buffer C, t also if it is not a 3way | |
1612 ;; comparison job (merging jobs return t as well). | |
1613 (defun ediff-empty-diff-region-p (n buf-type) | |
1614 (if (eq buf-type 'C) | |
1615 (or (not ediff-3way-comparison-job) | |
1616 (= (ediff-get-diff-posn 'C 'beg n) | |
1617 (ediff-get-diff-posn 'C 'end n))) | |
1618 (= (ediff-get-diff-posn buf-type 'beg n) | |
1619 (ediff-get-diff-posn buf-type 'end n)))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1620 |
11042 | 1621 ;; Test if diff region is white space only. |
1622 ;; If 2-way job and buf-type = C, then returns t. | |
1623 (defun ediff-whitespace-diff-region-p (n buf-type) | |
1624 (or (and (eq buf-type 'C) (not ediff-3way-job)) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1625 (ediff-empty-diff-region-p n buf-type) |
11042 | 1626 (let ((beg (ediff-get-diff-posn buf-type 'beg n)) |
1627 (end (ediff-get-diff-posn buf-type 'end n))) | |
19047 | 1628 (ediff-with-current-buffer (ediff-get-buffer buf-type) |
11042 | 1629 (save-excursion |
1630 (goto-char beg) | |
1631 (skip-chars-forward ediff-whitespace) | |
1632 (>= (point) end)))))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1633 |
11042 | 1634 ;; temporarily uses DIR to abbreviate file name |
1635 ;; if DIR is nil, use default-directory | |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1636 (defun ediff-abbreviate-file-name (file &optional dir) |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1637 (cond ((stringp dir) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1638 (let ((directory-abbrev-alist (list (cons dir "")))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1639 (abbreviate-file-name file))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1640 (ediff-emacs-p (abbreviate-file-name file)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1641 (t ; XEmacs requires addl argument |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1642 (abbreviate-file-name file t)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1643 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1644 ;; Takes a directory and returns the parent directory. |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1645 ;; does nothing to `/'. If the ARG is a regular file, |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1646 ;; strip the file AND the last dir. |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1647 (defun ediff-strip-last-dir (dir) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1648 (if (not (stringp dir)) (setq dir default-directory)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1649 (setq dir (expand-file-name dir)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1650 (or (file-directory-p dir) (setq dir (file-name-directory dir))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1651 (let* ((pos (1- (length dir))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1652 (last-char (aref dir pos))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1653 (if (and (> pos 0) (= last-char ?/)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1654 (setq dir (substring dir 0 pos))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1655 (ediff-abbreviate-file-name (file-name-directory dir)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1656 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1657 (defun ediff-truncate-string-left (str newlen) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1658 ;; leave space for ... on the left |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1659 (let ((len (length str)) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1660 substr) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1661 (if (<= len newlen) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1662 str |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1663 (setq newlen (max 0 (- newlen 3))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1664 (setq substr (substring str (max 0 (- len 1 newlen)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1665 (concat "..." substr)))) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1666 |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1667 (defsubst ediff-nonempty-string-p (string) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1668 (and (stringp string) (not (string= string "")))) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
25486
diff
changeset
|
1669 |
35411
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1670 (unless (fboundp 'subst-char-in-string) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1671 (defun subst-char-in-string (fromchar tochar string &optional inplace) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1672 "Replace FROMCHAR with TOCHAR in STRING each time it occurs. |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1673 Unless optional argument INPLACE is non-nil, return a new string." |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1674 (let ((i (length string)) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1675 (newstr (if inplace string (copy-sequence string)))) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1676 (while (> i 0) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1677 (setq i (1- i)) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1678 (if (eq (aref newstr i) fromchar) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1679 (aset newstr i tochar))) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1680 newstr))) |
be20c22dc16d
2001-01-19 Michael Kifer <kifer@cs.sunysb.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
35377
diff
changeset
|
1681 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1682 (defun ediff-abbrev-jobname (jobname) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1683 (cond ((eq jobname 'ediff-directories) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1684 "Compare two directories") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1685 ((eq jobname 'ediff-files) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1686 "Compare two files") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1687 ((eq jobname 'ediff-buffers) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1688 "Compare two buffers") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1689 ((eq jobname 'ediff-directories3) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1690 "Compare three directories") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1691 ((eq jobname 'ediff-files3) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1692 "Compare three files") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1693 ((eq jobname 'ediff-buffers3) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1694 "Compare three buffers") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1695 ((eq jobname 'ediff-revision) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1696 "Compare file with a version") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1697 ((eq jobname 'ediff-directory-revisions) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1698 "Compare dir files with versions") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1699 ((eq jobname 'ediff-merge-directory-revisions) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1700 "Merge dir files with versions") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1701 ((eq jobname 'ediff-merge-directory-revisions-with-ancestor) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1702 "Merge dir versions via ancestors") |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1703 (t |
33842
f6a67d77484a
* ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33107
diff
changeset
|
1704 (capitalize |
f6a67d77484a
* ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33107
diff
changeset
|
1705 (subst-char-in-string ?- ?\ (substring (symbol-name jobname) 6)))) |
f6a67d77484a
* ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
33107
diff
changeset
|
1706 )) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1707 |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1708 |
11042 | 1709 (defsubst ediff-get-region-contents (n buf-type ctrl-buf &optional start end) |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1710 (ediff-with-current-buffer |
19047 | 1711 (ediff-with-current-buffer ctrl-buf (ediff-get-buffer buf-type)) |
11042 | 1712 (buffer-substring |
1713 (or start (ediff-get-diff-posn buf-type 'beg n ctrl-buf)) | |
1714 (or end (ediff-get-diff-posn buf-type 'end n ctrl-buf))))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1715 |
11042 | 1716 ;; If ediff modified mode line, strip the modification |
1717 (defsubst ediff-strip-mode-line-format () | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1718 (if (member (car mode-line-format) '(" A: " " B: " " C: " " Ancestor: ")) |
11042 | 1719 (setq mode-line-format (nth 2 mode-line-format)))) |
1720 | |
1721 ;; Verify that we have a difference selected. | |
1722 (defsubst ediff-valid-difference-p (&optional n) | |
1723 (or n (setq n ediff-current-difference)) | |
1724 (and (>= n 0) (< n ediff-number-of-differences))) | |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1725 |
11042 | 1726 (defsubst ediff-show-all-diffs (n) |
1727 "Don't skip difference regions." | |
1728 nil) | |
13128
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1729 |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1730 (defsubst Xor (a b) |
b0ec8d932b35
(ediff-abbreviate-file-name): function modified.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
12212
diff
changeset
|
1731 (or (and a (not b)) (and (not a) b))) |
13216
b9dc8cc658d5
Moved defsubsts up.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13128
diff
changeset
|
1732 |
b9dc8cc658d5
Moved defsubsts up.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13128
diff
changeset
|
1733 (defsubst ediff-message-if-verbose (string &rest args) |
b9dc8cc658d5
Moved defsubsts up.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13128
diff
changeset
|
1734 (if ediff-verbose-p |
b9dc8cc658d5
Moved defsubsts up.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
13128
diff
changeset
|
1735 (apply 'message string args))) |
14582
c768f6d7daaa
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14534
diff
changeset
|
1736 |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1737 (defun ediff-file-attributes (filename attr-number) |
18054 | 1738 (if (ediff-file-remote-p filename) |
1739 -1 | |
1740 (nth attr-number (file-attributes filename)))) | |
1741 | |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1742 (defsubst ediff-file-size (filename) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1743 (ediff-file-attributes filename 7)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1744 (defsubst ediff-file-modtime (filename) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1745 (ediff-file-attributes filename 5)) |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1746 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1747 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1748 (defun ediff-convert-standard-filename (fname) |
18054 | 1749 (if (fboundp 'convert-standard-filename) |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1750 (convert-standard-filename fname) |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1751 fname)) |
15480
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1752 |
43a3308fcf61
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
14582
diff
changeset
|
1753 |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1754 ;;; Local Variables: |
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1755 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
19047 | 1756 ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
1757 ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | |
16248
b2fae8abc5b0
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
16169
diff
changeset
|
1758 ;;; End: |
33107
5049026c97b1
(ediff-prepare-buffer-hook): Expand docstring, no functional change.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
33019
diff
changeset
|
1759 |
11042 | 1760 (provide 'ediff-init) |
1761 | |
1762 | |
1763 ;;; ediff-init.el ends here |