Mercurial > emacs
annotate lisp/ediff-help.el @ 110523:a5ad4f188e19
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 18 Sep 2010 22:49:54 -0400 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
16247 | 1 ;;; ediff-help.el --- Code related to the contents of Ediff help buffers |
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, |
106815 | 4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
16247 | 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 | 7 |
8 ;; This file is part of GNU Emacs. | |
9 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
16247 | 11 ;; it under the terms of the GNU General Public License as published by |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
13 ;; (at your option) any later version. |
16247 | 14 |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94604
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
16247 | 22 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33842
diff
changeset
|
23 ;;; Commentary: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33842
diff
changeset
|
24 |
16247 | 25 ;;; Code: |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
26 |
16247 | 27 |
28 ;; Compiler pacifier start | |
29 (defvar ediff-multiframe) | |
30 ;; end pacifier | |
31 | |
18054 | 32 (require 'ediff-init) |
33 | |
16247 | 34 ;; Help messages |
35 | |
36 (defconst ediff-long-help-message-head | |
37 " Move around | Toggle features | Manipulate | |
38 =====================|===========================|=============================" | |
39 "The head of the full help message.") | |
40 (defconst ediff-long-help-message-tail | |
41 "=====================|===========================|============================= | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
42 R -show registry | = -compare regions | M -show session group |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
43 D -diff output | E -browse Ediff manual| G -send bug report |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
44 i -status info | ? -help off | z/q -suspend/quit |
16247 | 45 ------------------------------------------------------------------------------- |
46 For help on a specific command: Click Button 2 over it; or | |
47 Put the cursor over it and type RET." | |
48 "The tail of the full-help message.") | |
49 | |
50 (defconst ediff-long-help-message-compare3 | |
51 " | |
52 p,DEL -previous diff | | -vert/horiz split | xy -copy buf X's region to Y | |
53 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
|
54 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
|
55 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
|
56 C-l -recenter | #c -ignore case | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
57 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
|
58 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output |
16247 | 59 ~ -rotate buffers| m -wide display | |
60 " | |
61 "Help message usually used for 3-way comparison. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
62 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
|
63 |
16247 | 64 (defconst ediff-long-help-message-compare2 |
65 " | |
66 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A | |
67 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
|
68 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
|
69 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
|
70 C-l -recenter | #c -ignore case | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
71 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
|
72 </> -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
|
73 ~ -swap variants | m -wide display | |
16247 | 74 " |
75 "Help message usually used for 2-way comparison. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
76 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
|
77 |
16247 | 78 (defconst ediff-long-help-message-narrow2 |
79 " | |
80 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A | |
81 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
|
82 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
|
83 gx -goto X's point| ## -ignore whitespace | ! -update diff regions |
100171 | 84 C-l -recenter | #c -ignore case | % -narrow/widen buffs |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
85 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
|
86 </> -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
|
87 ~ -swap variants | m -wide display | |
16247 | 88 " |
89 "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
|
90 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
|
91 |
16247 | 92 (defconst ediff-long-help-message-word-mode |
93 " | |
94 p,DEL -previous diff | | -vert/horiz split | xy -copy buf X's region to Y | |
95 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
|
96 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
|
97 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
|
98 C-l -recenter | #c -ignore case | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
99 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
|
100 </> -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
|
101 ~ -swap variants | m -wide display | |
16247 | 102 " |
103 "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
|
104 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
|
105 |
16247 | 106 (defconst ediff-long-help-message-merge |
107 " | |
108 p,DEL -previous diff | | -vert/horiz split | x -copy buf X's region to C | |
109 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
|
110 j -jump to diff | @ -auto-refinement | * -refine current region |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
111 gx -goto X's point| ## -ignore whitespace | ! -update diff regions |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
112 C-l -recenter | #f/#h -focus/hide regions | + -combine diff regions |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
113 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
|
114 </> -scroll lt/rt | m -wide display | wd -save diff output |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
115 ~ -swap variants | s -shrink window C | / -show ancestor buff |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
116 | $$ -show clashes only | & -merge w/new default |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
117 | $* -skip changed regions | |
16247 | 118 " |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
119 "Help message for merge sessions. |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
120 Normally, not a user option. See `ediff-help-message' for details.") |
16247 | 121 |
122 ;; The actual long help message. | |
123 (ediff-defvar-local ediff-long-help-message "" | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
124 "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
|
125 |
16247 | 126 (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
|
127 " Type ? for help" |
16247 | 128 "Contents of the brief help message.") |
129 ;; The actual brief help message | |
130 (ediff-defvar-local ediff-brief-help-message "" | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
131 "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
|
132 |
16247 | 133 (ediff-defvar-local ediff-brief-help-message-function nil |
134 "The brief help message that the user can customize. | |
135 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
|
136 produce the brief help message. This function must return a string.") |
16247 | 137 (ediff-defvar-local ediff-long-help-message-function nil |
138 "The long help message that the user can customize. | |
139 See `ediff-brief-help-message-function' for more.") | |
140 | |
33842
f6a67d77484a
* ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
141 (defcustom ediff-use-long-help-message nil |
100171 | 142 "If t, Ediff displays a long help message. Short help message otherwise." |
33842
f6a67d77484a
* ediff-diff.el: Moved variables around to have it compile under NT.
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
27899
diff
changeset
|
143 :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
|
144 :group 'ediff-window) |
16247 | 145 |
146 ;; The actual help message. | |
147 (ediff-defvar-local ediff-help-message "" | |
148 "The actual help message. | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
149 Normally, the user shouldn't touch this. However, if you want Ediff to |
16247 | 150 start up with different help messages for different jobs, you can change |
151 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
|
152 `ediff-startup-hook'.") |
16247 | 153 |
154 | |
155 ;; the keymap that defines clicks over the quick help regions | |
156 (defvar ediff-help-region-map (make-sparse-keymap)) | |
157 | |
158 (define-key | |
159 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
|
160 (if (featurep 'emacs) [mouse-2] [button2]) |
16247 | 161 'ediff-help-for-quick-help) |
162 | |
163 ;; runs in the control buffer | |
164 (defun ediff-set-help-overlays () | |
165 (goto-char (point-min)) | |
166 (let (overl beg end cmd) | |
167 (while (re-search-forward " *\\([^ \t\n|]+\\||\\) +-[^|\n]+" nil 'noerror) | |
168 (setq beg (match-beginning 0) | |
169 end (match-end 0) | |
170 cmd (buffer-substring (match-beginning 1) (match-end 1))) | |
171 (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
|
172 (if (featurep 'emacs) |
16247 | 173 (ediff-overlay-put overl 'mouse-face 'highlight) |
174 (ediff-overlay-put overl 'highlight t)) | |
175 (ediff-overlay-put overl 'ediff-help-info cmd)))) | |
176 | |
177 | |
178 (defun ediff-help-for-quick-help () | |
179 "Explain Ediff commands in more detail." | |
180 (interactive) | |
181 (ediff-barf-if-not-control-buffer) | |
18054 | 182 (let ((pos (ediff-event-point last-command-event)) |
16247 | 183 overl cmd) |
184 | |
92501
956adeeb0083
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
185 (if (featurep 'xemacs) |
956adeeb0083
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
186 (setq overl (extent-at pos (current-buffer) 'ediff-help-info) |
956adeeb0083
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
187 cmd (ediff-overlay-get overl 'ediff-help-info)) |
956adeeb0083
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
188 (setq cmd (car (mapcar (lambda (elt) |
956adeeb0083
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
189 (overlay-get elt 'ediff-help-info)) |
956adeeb0083
Expand all ediff-cond-compile-for-xemacs-or-emacs calls to a featurep test.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
190 (overlays-at pos))))) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
191 |
16247 | 192 (if (not (stringp cmd)) |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
193 (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
|
194 |
16247 | 195 (ediff-documentation "Quick Help Commands") |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
196 |
16247 | 197 (let (case-fold-search) |
198 (cond ((string= cmd "?") (re-search-forward "^`\\?'")) | |
199 ((string= cmd "G") (re-search-forward "^`G'")) | |
200 ((string= cmd "E") (re-search-forward "^`E'")) | |
201 ((string= cmd "wd") (re-search-forward "^`wd'")) | |
202 ((string= cmd "wx") (re-search-forward "^`wa'")) | |
203 ((string= cmd "a/b") (re-search-forward "^`a'")) | |
204 ((string= cmd "x") (re-search-forward "^`a'")) | |
205 ((string= cmd "xy") (re-search-forward "^`ab'")) | |
206 ((string= cmd "p,DEL") (re-search-forward "^`p'")) | |
207 ((string= cmd "n,SPC") (re-search-forward "^`n'")) | |
208 ((string= cmd "j") (re-search-forward "^`j'")) | |
209 ((string= cmd "gx") (re-search-forward "^`ga'")) | |
210 ((string= cmd "!") (re-search-forward "^`!'")) | |
211 ((string= cmd "*") (re-search-forward "^`\\*'")) | |
212 ((string= cmd "m") (re-search-forward "^`m'")) | |
213 ((string= cmd "|") (re-search-forward "^`|'")) | |
214 ((string= cmd "@") (re-search-forward "^`@'")) | |
215 ((string= cmd "h") (re-search-forward "^`h'")) | |
216 ((string= cmd "r") (re-search-forward "^`r'")) | |
217 ((string= cmd "rx") (re-search-forward "^`ra'")) | |
218 ((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
|
219 ((string= cmd "#c") (re-search-forward "^`#c'")) |
16247 | 220 ((string= cmd "#f/#h") (re-search-forward "^`#f'")) |
221 ((string= cmd "X") (re-search-forward "^`A'")) | |
222 ((string= cmd "v/V") (re-search-forward "^`v'")) | |
223 ((string= cmd "</>") (re-search-forward "^`<'")) | |
224 ((string= cmd "~") (re-search-forward "^`~'")) | |
225 ((string= cmd "i") (re-search-forward "^`i'")) | |
226 ((string= cmd "D") (re-search-forward "^`D'")) | |
227 ((string= cmd "R") (re-search-forward "^`R'")) | |
228 ((string= cmd "M") (re-search-forward "^`M'")) | |
229 ((string= cmd "z/q") (re-search-forward "^`z'")) | |
230 ((string= cmd "%") (re-search-forward "^`%'")) | |
231 ((string= cmd "C-l") (re-search-forward "^`C-l'")) | |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
232 ((string= cmd "$$") (re-search-forward "^`\\$\\$'")) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
233 ((string= cmd "$*") (re-search-forward "^`\\$\\*'")) |
16247 | 234 ((string= cmd "/") (re-search-forward "^`/'")) |
235 ((string= cmd "&") (re-search-forward "^`&'")) | |
236 ((string= cmd "s") (re-search-forward "^`s'")) | |
237 ((string= cmd "+") (re-search-forward "^`\\+'")) | |
238 ((string= cmd "=") (re-search-forward "^`='")) | |
239 (t (error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer"))) | |
240 ) ; let case-fold-search | |
241 )) | |
242 | |
243 | |
244 ;; assuming we are in control window, calculate length of the first line in | |
245 ;; help message | |
246 (defun ediff-help-message-line-length () | |
247 (save-excursion | |
248 (goto-char (point-min)) | |
249 (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
|
250 (forward-line 1)) |
16247 | 251 (end-of-line) |
252 (current-column))) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
253 |
16247 | 254 |
255 (defun ediff-indent-help-message () | |
256 (let* ((shift (/ (max 0 (- (window-width (selected-window)) | |
257 (ediff-help-message-line-length))) | |
258 2)) | |
259 (str (make-string shift ?\ ))) | |
260 (save-excursion | |
261 (goto-char (point-min)) | |
262 (while (< (point) (point-max)) | |
263 (insert str) | |
264 (beginning-of-line) | |
265 (forward-line 1))))) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
266 |
16247 | 267 |
268 ;; compose the help message as a string | |
269 (defun ediff-set-help-message () | |
270 (setq ediff-long-help-message | |
271 (cond ((and ediff-long-help-message-function | |
272 (or (symbolp ediff-long-help-message-function) | |
273 (consp ediff-long-help-message-function))) | |
274 (funcall ediff-long-help-message-function)) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
275 (ediff-word-mode |
16247 | 276 (concat ediff-long-help-message-head |
277 ediff-long-help-message-word-mode | |
278 ediff-long-help-message-tail)) | |
279 (ediff-narrow-job | |
280 (concat ediff-long-help-message-head | |
281 ediff-long-help-message-narrow2 | |
282 ediff-long-help-message-tail)) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
283 (ediff-merge-job |
16247 | 284 (concat ediff-long-help-message-head |
285 ediff-long-help-message-merge | |
286 ediff-long-help-message-tail)) | |
287 (ediff-diff3-job | |
288 (concat ediff-long-help-message-head | |
289 ediff-long-help-message-compare3 | |
290 ediff-long-help-message-tail)) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
291 (t |
16247 | 292 (concat ediff-long-help-message-head |
293 ediff-long-help-message-compare2 | |
294 ediff-long-help-message-tail)))) | |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42602
diff
changeset
|
295 (setq ediff-brief-help-message |
16247 | 296 (cond ((and ediff-brief-help-message-function |
297 (or (symbolp ediff-brief-help-message-function) | |
298 (consp ediff-brief-help-message-function))) | |
299 (funcall ediff-brief-help-message-function)) | |
300 ((stringp ediff-brief-help-message-function) | |
301 ediff-brief-help-message-function) | |
302 ((ediff-multiframe-setup-p) ediff-brief-message-string) | |
303 (t ; long brief msg, not multiframe --- put in the middle | |
304 ediff-brief-message-string) | |
305 )) | |
306 (setq ediff-help-message (if ediff-use-long-help-message | |
307 ediff-long-help-message | |
308 ediff-brief-help-message)) | |
309 (run-hooks 'ediff-display-help-hook)) | |
310 | |
27899
42f9a58e0fc4
* viper-cmd.el (viper-envelop-ESC-key): added the option to
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
26263
diff
changeset
|
311 ;;;###autoload |
26263
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
312 (defun ediff-customize () |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
313 (interactive) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
314 (customize-group "ediff")) |
4f315ca65976
*** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
18054
diff
changeset
|
315 |
16247 | 316 |
68997
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
317 (provide 'ediff-help) |
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
318 |
6169b51037af
2006-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
Michael Kifer <kifer@cs.stonybrook.edu>
parents:
68651
diff
changeset
|
319 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93652
diff
changeset
|
320 ;; arch-tag: 05659813-7fcf-4274-964f-d2f577431a9d |
16247 | 321 ;;; ediff-help.el ends here |