annotate lisp/ediff-help.el @ 91928:e788f311729d

(image-get-display-property): New fun. (image-forward-hscroll, image-next-line, image-eol, image-eob, image-mode) (image-minor-mode, image-toggle-display-text, image-toggle-display): Use it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 18 Feb 2008 04:08:04 +0000
parents 107ccd98fa12
children 606f2d163a64 956adeeb0083
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
1 ;;; ediff-help.el --- Code related to the contents of Ediff help buffers
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
2
64762
41bb365f41c4 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64091
diff changeset
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
79721
73661ddc7ac7 Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78236
diff changeset
4 ;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
5
42602
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
6 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
7
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
9
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
78236
9355f9b7bbff Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
12 ;; the Free Software Foundation; either version 3, or (at your option)
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
13 ;; any later version.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
14
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
18 ;; GNU General Public License for more details.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
19
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64091
6fb026ad601f Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62963
diff changeset
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
6fb026ad601f Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62963
diff changeset
23 ;; Boston, MA 02110-1301, USA.
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
24
38422
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 33842
diff changeset
25 ;;; Commentary:
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 33842
diff changeset
26
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
27 ;;; Code:
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
28
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
29
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
30 ;; Compiler pacifier start
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
31 (defvar ediff-multiframe)
18054
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
32
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
33 (eval-when-compile
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
34 (let ((load-path (cons (expand-file-name ".") load-path)))
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
35 (or (featurep 'ediff-init)
86460
755ed8b451d4 Load ediff-*.el files silently.
Glenn Morris <rgm@gnu.org>
parents: 85972
diff changeset
36 (load "ediff-init.el" nil t 'nosuffix))
18054
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
37 ))
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
38 ;; end pacifier
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
39
18054
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
40 (require 'ediff-init)
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
41
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
42 ;; Help messages
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
43
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
44 (defconst ediff-long-help-message-head
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
45 " Move around | Toggle features | Manipulate
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
46 =====================|===========================|============================="
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
47 "The head of the full help message.")
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
48 (defconst ediff-long-help-message-tail
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
49 "=====================|===========================|=============================
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
50 R -show registry | = -compare regions | M -show session group
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
51 D -diff output | E -browse Ediff manual| G -send bug report
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
52 i -status info | ? -help off | z/q -suspend/quit
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
53 -------------------------------------------------------------------------------
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
54 For help on a specific command: Click Button 2 over it; or
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
55 Put the cursor over it and type RET."
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
56 "The tail of the full-help message.")
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
57
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
58 (defconst ediff-long-help-message-compare3
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
59 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
60 p,DEL -previous diff | | -vert/horiz split | xy -copy buf X's region to Y
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
61 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
62 j -jump to diff | @ -auto-refinement | * -refine current region
68997
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
63 gx -goto X's point| ## -ignore whitespace | ! -update diff regions
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
64 C-l -recenter | #c -ignore case |
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
65 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
66 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
67 ~ -rotate buffers| m -wide display |
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
68 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
69 "Help message usually used for 3-way comparison.
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
70 Normally, not a user option. See `ediff-help-message' for details.")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
71
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
72 (defconst ediff-long-help-message-compare2
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
73 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
74 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
75 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
76 j -jump to diff | @ -auto-refinement | * -refine current region
68997
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
77 gx -goto X's point| ## -ignore whitespace | ! -update diff regions
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
78 C-l -recenter | #c -ignore case |
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
79 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
80 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
81 ~ -swap variants | m -wide display |
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
82 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
83 "Help message usually used for 2-way comparison.
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
84 Normally, not a user option. See `ediff-help-message' for details.")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
85
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
86 (defconst ediff-long-help-message-narrow2
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
87 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
88 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
89 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
90 j -jump to diff | @ -auto-refinement | * -refine current region
68997
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
91 gx -goto X's point| ## -ignore whitespace | ! -update diff regions
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
92 C-l -recenter | #c -ignore case | % -narrow/widen buffs
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
93 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
94 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
95 ~ -swap variants | m -wide display |
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
96 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
97 "Help message when comparing windows or regions line-by-line.
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
98 Normally, not a user option. See `ediff-help-message' for details.")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
99
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
100 (defconst ediff-long-help-message-word-mode
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
101 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
102 p,DEL -previous diff | | -vert/horiz split | xy -copy buf X's region to Y
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
103 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
104 j -jump to diff | |
68997
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
105 gx -goto X's point| % -narrow/widen buffs | ! -recompute diffs
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
106 C-l -recenter | #c -ignore case |
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
107 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
108 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
109 ~ -swap variants | m -wide display |
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
110 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
111 "Help message when comparing windows or regions word-by-word.
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
112 Normally, not a user option. See `ediff-help-message' for details.")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
113
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
114 (defconst ediff-long-help-message-merge
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
115 "
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
116 p,DEL -previous diff | | -vert/horiz split | x -copy buf X's region to C
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
117 n,SPC -next diff | h -hilighting | r -restore buf C's old diff
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
118 j -jump to diff | @ -auto-refinement | * -refine current region
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
119 gx -goto X's point| ## -ignore whitespace | ! -update diff regions
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
120 C-l -recenter | #f/#h -focus/hide regions | + -combine diff regions
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
121 v/V -scroll up/dn | X -read-only in buf X | wx -save buf X
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
122 </> -scroll lt/rt | m -wide display | wd -save diff output
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
123 ~ -swap variants | s -shrink window C | / -show ancestor buff
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
124 | $$ -show clashes only | & -merge w/new default
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
125 | $* -skip changed regions |
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
126 "
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
127 "Help message for merge sessions.
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
128 Normally, not a user option. See `ediff-help-message' for details.")
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
129
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
130 ;; The actual long help message.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
131 (ediff-defvar-local ediff-long-help-message ""
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
132 "Normally, not a user option. See `ediff-help-message' for details.")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
133
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
134 (defconst ediff-brief-message-string
62963
fcacef2ed810 2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 52401
diff changeset
135 " Type ? for help"
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
136 "Contents of the brief help message.")
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
137 ;; The actual brief help message
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
138 (ediff-defvar-local ediff-brief-help-message ""
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
139 "Normally, not a user option. See `ediff-help-message' for details.")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
140
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
141 (ediff-defvar-local ediff-brief-help-message-function nil
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
142 "The brief help message that the user can customize.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
143 If the user sets this to a parameter-less function, Ediff will use it to
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
144 produce the brief help message. This function must return a string.")
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
145 (ediff-defvar-local ediff-long-help-message-function nil
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
146 "The long help message that the user can customize.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
147 See `ediff-brief-help-message-function' for more.")
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
148
33842
f6a67d77484a * ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 27899
diff changeset
149 (defcustom ediff-use-long-help-message nil
f6a67d77484a * ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 27899
diff changeset
150 "*If t, Ediff displays a long help message. Short help message otherwise."
f6a67d77484a * ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 27899
diff changeset
151 :type 'boolean
f6a67d77484a * ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 27899
diff changeset
152 :group 'ediff-window)
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
153
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
154 ;; The actual help message.
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
155 (ediff-defvar-local ediff-help-message ""
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
156 "The actual help message.
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
157 Normally, the user shouldn't touch this. However, if you want Ediff to
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
158 start up with different help messages for different jobs, you can change
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
159 the value of this variable and the variables `ediff-help-message-*' in
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
160 `ediff-startup-hook'.")
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
161
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
162
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
163 ;; the keymap that defines clicks over the quick help regions
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
164 (defvar ediff-help-region-map (make-sparse-keymap))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
165
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
166 (define-key
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
167 ediff-help-region-map
85972
51aa47312c4b * ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 85478
diff changeset
168 (if (featurep 'emacs) [mouse-2] [button2])
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
169 'ediff-help-for-quick-help)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
170
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
171 ;; runs in the control buffer
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
172 (defun ediff-set-help-overlays ()
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
173 (goto-char (point-min))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
174 (let (overl beg end cmd)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
175 (while (re-search-forward " *\\([^ \t\n|]+\\||\\) +-[^|\n]+" nil 'noerror)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
176 (setq beg (match-beginning 0)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
177 end (match-end 0)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
178 cmd (buffer-substring (match-beginning 1) (match-end 1)))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
179 (setq overl (ediff-make-overlay beg end))
85972
51aa47312c4b * ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 85478
diff changeset
180 (if (featurep 'emacs)
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
181 (ediff-overlay-put overl 'mouse-face 'highlight)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
182 (ediff-overlay-put overl 'highlight t))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
183 (ediff-overlay-put overl 'ediff-help-info cmd))))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
184
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
185
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
186 (defun ediff-help-for-quick-help ()
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
187 "Explain Ediff commands in more detail."
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
188 (interactive)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
189 (ediff-barf-if-not-control-buffer)
18054
0b9d9cbf3cd4 new version
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 16247
diff changeset
190 (let ((pos (ediff-event-point last-command-event))
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
191 overl cmd)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
192
42602
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
193 (ediff-cond-compile-for-xemacs-or-emacs
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
194 ;; xemacs
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
195 (setq overl (extent-at pos (current-buffer) 'ediff-help-info)
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
196 cmd (ediff-overlay-get overl 'ediff-help-info))
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
197 ;; emacs
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
198 (setq cmd (car (mapcar (lambda (elt)
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
199 (overlay-get elt 'ediff-help-info))
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
200 (overlays-at pos))))
633233bf2bbf 2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 38422
diff changeset
201 )
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
202
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
203 (if (not (stringp cmd))
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
204 (error "Hmm... I don't see an Ediff command around here..."))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
205
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
206 (ediff-documentation "Quick Help Commands")
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
207
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
208 (let (case-fold-search)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
209 (cond ((string= cmd "?") (re-search-forward "^`\\?'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
210 ((string= cmd "G") (re-search-forward "^`G'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
211 ((string= cmd "E") (re-search-forward "^`E'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
212 ((string= cmd "wd") (re-search-forward "^`wd'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
213 ((string= cmd "wx") (re-search-forward "^`wa'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
214 ((string= cmd "a/b") (re-search-forward "^`a'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
215 ((string= cmd "x") (re-search-forward "^`a'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
216 ((string= cmd "xy") (re-search-forward "^`ab'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
217 ((string= cmd "p,DEL") (re-search-forward "^`p'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
218 ((string= cmd "n,SPC") (re-search-forward "^`n'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
219 ((string= cmd "j") (re-search-forward "^`j'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
220 ((string= cmd "gx") (re-search-forward "^`ga'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
221 ((string= cmd "!") (re-search-forward "^`!'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
222 ((string= cmd "*") (re-search-forward "^`\\*'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
223 ((string= cmd "m") (re-search-forward "^`m'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
224 ((string= cmd "|") (re-search-forward "^`|'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
225 ((string= cmd "@") (re-search-forward "^`@'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
226 ((string= cmd "h") (re-search-forward "^`h'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
227 ((string= cmd "r") (re-search-forward "^`r'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
228 ((string= cmd "rx") (re-search-forward "^`ra'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
229 ((string= cmd "##") (re-search-forward "^`##'"))
68997
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
230 ((string= cmd "#c") (re-search-forward "^`#c'"))
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
231 ((string= cmd "#f/#h") (re-search-forward "^`#f'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
232 ((string= cmd "X") (re-search-forward "^`A'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
233 ((string= cmd "v/V") (re-search-forward "^`v'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
234 ((string= cmd "</>") (re-search-forward "^`<'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
235 ((string= cmd "~") (re-search-forward "^`~'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
236 ((string= cmd "i") (re-search-forward "^`i'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
237 ((string= cmd "D") (re-search-forward "^`D'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
238 ((string= cmd "R") (re-search-forward "^`R'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
239 ((string= cmd "M") (re-search-forward "^`M'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
240 ((string= cmd "z/q") (re-search-forward "^`z'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
241 ((string= cmd "%") (re-search-forward "^`%'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
242 ((string= cmd "C-l") (re-search-forward "^`C-l'"))
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
243 ((string= cmd "$$") (re-search-forward "^`\\$\\$'"))
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
244 ((string= cmd "$*") (re-search-forward "^`\\$\\*'"))
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
245 ((string= cmd "/") (re-search-forward "^`/'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
246 ((string= cmd "&") (re-search-forward "^`&'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
247 ((string= cmd "s") (re-search-forward "^`s'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
248 ((string= cmd "+") (re-search-forward "^`\\+'"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
249 ((string= cmd "=") (re-search-forward "^`='"))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
250 (t (error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer")))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
251 ) ; let case-fold-search
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
252 ))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
253
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
254
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
255 ;; assuming we are in control window, calculate length of the first line in
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
256 ;; help message
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
257 (defun ediff-help-message-line-length ()
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
258 (save-excursion
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
259 (goto-char (point-min))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
260 (if ediff-use-long-help-message
85478
786d3a985758 * term/x-win.el (x-gtk-stock-map, icon-map-list)
Dan Nicolaescu <dann@ics.uci.edu>
parents: 78236
diff changeset
261 (forward-line 1))
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
262 (end-of-line)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
263 (current-column)))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
264
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
265
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
266 (defun ediff-indent-help-message ()
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
267 (let* ((shift (/ (max 0 (- (window-width (selected-window))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
268 (ediff-help-message-line-length)))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
269 2))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
270 (str (make-string shift ?\ )))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
271 (save-excursion
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
272 (goto-char (point-min))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
273 (while (< (point) (point-max))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
274 (insert str)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
275 (beginning-of-line)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
276 (forward-line 1)))))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
277
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
278
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
279 ;; compose the help message as a string
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
280 (defun ediff-set-help-message ()
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
281 (setq ediff-long-help-message
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
282 (cond ((and ediff-long-help-message-function
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
283 (or (symbolp ediff-long-help-message-function)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
284 (consp ediff-long-help-message-function)))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
285 (funcall ediff-long-help-message-function))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
286 (ediff-word-mode
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
287 (concat ediff-long-help-message-head
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
288 ediff-long-help-message-word-mode
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
289 ediff-long-help-message-tail))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
290 (ediff-narrow-job
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
291 (concat ediff-long-help-message-head
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
292 ediff-long-help-message-narrow2
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
293 ediff-long-help-message-tail))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
294 (ediff-merge-job
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
295 (concat ediff-long-help-message-head
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
296 ediff-long-help-message-merge
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
297 ediff-long-help-message-tail))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
298 (ediff-diff3-job
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
299 (concat ediff-long-help-message-head
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
300 ediff-long-help-message-compare3
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
301 ediff-long-help-message-tail))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
302 (t
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
303 (concat ediff-long-help-message-head
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
304 ediff-long-help-message-compare2
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
305 ediff-long-help-message-tail))))
49588
37645a051842 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 42602
diff changeset
306 (setq ediff-brief-help-message
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
307 (cond ((and ediff-brief-help-message-function
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
308 (or (symbolp ediff-brief-help-message-function)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
309 (consp ediff-brief-help-message-function)))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
310 (funcall ediff-brief-help-message-function))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
311 ((stringp ediff-brief-help-message-function)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
312 ediff-brief-help-message-function)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
313 ((ediff-multiframe-setup-p) ediff-brief-message-string)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
314 (t ; long brief msg, not multiframe --- put in the middle
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
315 ediff-brief-message-string)
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
316 ))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
317 (setq ediff-help-message (if ediff-use-long-help-message
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
318 ediff-long-help-message
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
319 ediff-brief-help-message))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
320 (run-hooks 'ediff-display-help-hook))
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
321
27899
42f9a58e0fc4 * viper-cmd.el (viper-envelop-ESC-key): added the option to
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 26263
diff changeset
322 ;;;###autoload
26263
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
323 (defun ediff-customize ()
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
324 (interactive)
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
325 (customize-group "ediff"))
4f315ca65976 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 18054
diff changeset
326
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
327
68997
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
328 (provide 'ediff-help)
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
329
6169b51037af 2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 68651
diff changeset
330
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49588
diff changeset
331 ;;; arch-tag: 05659813-7fcf-4274-964f-d2f577431a9d
16247
a0940ace16a3 Initial revision
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
diff changeset
332 ;;; ediff-help.el ends here