comparison lisp/ediff-help.el @ 26263:4f315ca65976

*** empty log message ***
author Michael Kifer <kifer@cs.stonybrook.edu>
date Mon, 01 Nov 1999 07:16:15 +0000
parents 0b9d9cbf3cd4
children 42f9a58e0fc4
comparison
equal deleted inserted replaced
26262:c416a18b0a5d 26263:4f315ca65976
63 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X 63 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
64 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output 64 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
65 ~ -rotate buffers| m -wide display | 65 ~ -rotate buffers| m -wide display |
66 " 66 "
67 "Help message usually used for 3-way comparison. 67 "Help message usually used for 3-way comparison.
68 Normally, not a user option. See `ediff-help-message' for details.") 68 Normally, not a user option. See `ediff-help-message' for details.")
69 69
70 (defconst ediff-long-help-message-compare2 70 (defconst ediff-long-help-message-compare2
71 " 71 "
72 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A 72 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A
73 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff 73 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
77 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X 77 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
78 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output 78 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
79 ~ -swap variants | m -wide display | 79 ~ -swap variants | m -wide display |
80 " 80 "
81 "Help message usually used for 2-way comparison. 81 "Help message usually used for 2-way comparison.
82 Normally, not a user option. See `ediff-help-message' for details.") 82 Normally, not a user option. See `ediff-help-message' for details.")
83 83
84 (defconst ediff-long-help-message-narrow2 84 (defconst ediff-long-help-message-narrow2
85 " 85 "
86 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A 86 p,DEL -previous diff | | -vert/horiz split |a/b -copy A/B's region to B/A
87 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff 87 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
91 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X 91 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
92 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output 92 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
93 ~ -swap variants | m -wide display | 93 ~ -swap variants | m -wide display |
94 " 94 "
95 "Help message when comparing windows or regions line-by-line. 95 "Help message when comparing windows or regions line-by-line.
96 Normally, not a user option. See `ediff-help-message' for details.") 96 Normally, not a user option. See `ediff-help-message' for details.")
97 97
98 (defconst ediff-long-help-message-word-mode 98 (defconst ediff-long-help-message-word-mode
99 " 99 "
100 p,DEL -previous diff | | -vert/horiz split | xy -copy buf X's region to Y 100 p,DEL -previous diff | | -vert/horiz split | xy -copy buf X's region to Y
101 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff 101 n,SPC -next diff | h -hilighting | rx -restore buf X's old diff
105 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X 105 v/V -scroll up/dn | #f/#h -focus/hide regions | wx -save buf X
106 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output 106 </> -scroll lt/rt | X -read-only in buf X | wd -save diff output
107 ~ -swap variants | m -wide display | 107 ~ -swap variants | m -wide display |
108 " 108 "
109 "Help message when comparing windows or regions word-by-word. 109 "Help message when comparing windows or regions word-by-word.
110 Normally, not a user option. See `ediff-help-message' for details.") 110 Normally, not a user option. See `ediff-help-message' for details.")
111 111
112 (defconst ediff-long-help-message-merge 112 (defconst ediff-long-help-message-merge
113 " 113 "
114 p,DEL -previous diff | | -vert/horiz split | x -copy buf X's region to C 114 p,DEL -previous diff | | -vert/horiz split | x -copy buf X's region to C
115 n,SPC -next diff | h -hilighting | r -restore buf C's old diff 115 n,SPC -next diff | h -hilighting | r -restore buf C's old diff
117 gx -goto X's point| ## -ignore whitespace | ! -update diff regions 117 gx -goto X's point| ## -ignore whitespace | ! -update diff regions
118 C-l -recenter | #f/#h -focus/hide regions | + -combine diff regions 118 C-l -recenter | #f/#h -focus/hide regions | + -combine diff regions
119 v/V -scroll up/dn | X -read-only in buf X | wx -save buf X 119 v/V -scroll up/dn | X -read-only in buf X | wx -save buf X
120 </> -scroll lt/rt | m -wide display | wd -save diff output 120 </> -scroll lt/rt | m -wide display | wd -save diff output
121 ~ -swap variants | s -shrink window C | / -show ancestor buff 121 ~ -swap variants | s -shrink window C | / -show ancestor buff
122 | $ -show clashes only | & -merge w/new default 122 | $$ -show clashes only | & -merge w/new default
123 " 123 | $* -skip changed regions |
124 "Help message during merging. 124 "
125 Normally, not a user option. See `ediff-help-message' for details.") 125 "Help message for merge sessions.
126 Normally, not a user option. See `ediff-help-message' for details.")
126 127
127 ;; The actual long help message. 128 ;; The actual long help message.
128 (ediff-defvar-local ediff-long-help-message "" 129 (ediff-defvar-local ediff-long-help-message ""
129 "Normally, not a user option. See `ediff-help-message' for details.") 130 "Normally, not a user option. See `ediff-help-message' for details.")
130 131
131 (defconst ediff-brief-message-string 132 (defconst ediff-brief-message-string
132 "? -quick help " 133 " ? -quick help "
133 "Contents of the brief help message.") 134 "Contents of the brief help message.")
134 ;; The actual brief help message 135 ;; The actual brief help message
135 (ediff-defvar-local ediff-brief-help-message "" 136 (ediff-defvar-local ediff-brief-help-message ""
136 "Normally, not a user option. See `ediff-help-message' for details.") 137 "Normally, not a user option. See `ediff-help-message' for details.")
137 138
138 (ediff-defvar-local ediff-brief-help-message-function nil 139 (ediff-defvar-local ediff-brief-help-message-function nil
139 "The brief help message that the user can customize. 140 "The brief help message that the user can customize.
140 If the user sets this to a parameter-less function, Ediff will use it to 141 If the user sets this to a parameter-less function, Ediff will use it to
141 produce the brief help message. This function must return a string.") 142 produce the brief help message. This function must return a string.")
142 (ediff-defvar-local ediff-long-help-message-function nil 143 (ediff-defvar-local ediff-long-help-message-function nil
143 "The long help message that the user can customize. 144 "The long help message that the user can customize.
144 See `ediff-brief-help-message-function' for more.") 145 See `ediff-brief-help-message-function' for more.")
145 146
146 (defvar ediff-use-long-help-message nil 147 (defvar ediff-use-long-help-message nil
147 "*If t, Ediff displays a long help message. Short help message otherwise.") 148 "*If t, Ediff displays a long help message. Short help message otherwise.")
148 149
149 ;; The actual help message. 150 ;; The actual help message.
150 (ediff-defvar-local ediff-help-message "" 151 (ediff-defvar-local ediff-help-message ""
151 "The actual help message. 152 "The actual help message.
152 Normally, the user shouldn't touch this. However, if you want Ediff to 153 Normally, the user shouldn't touch this. However, if you want Ediff to
153 start up with different help messages for different jobs, you can change 154 start up with different help messages for different jobs, you can change
154 the value of this variable and the variables `ediff-help-message-*' in 155 the value of this variable and the variables `ediff-help-message-*' in
155 `ediff-startup-hook'.") 156 `ediff-startup-hook'.")
156 157
157 158
186 overl cmd) 187 overl cmd)
187 188
188 (if ediff-xemacs-p 189 (if ediff-xemacs-p
189 (setq overl (extent-at pos (current-buffer) 'ediff-help-info) 190 (setq overl (extent-at pos (current-buffer) 'ediff-help-info)
190 cmd (ediff-overlay-get overl 'ediff-help-info)) 191 cmd (ediff-overlay-get overl 'ediff-help-info))
191 (setq cmd (car (mapcar (function (lambda (elt) 192 (setq cmd (car (mapcar (lambda (elt)
192 (overlay-get elt 'ediff-help-info))) 193 (overlay-get elt 'ediff-help-info))
193 (overlays-at pos))))) 194 (overlays-at pos)))))
194 195
195 (if (not (stringp cmd)) 196 (if (not (stringp cmd))
196 (error "Hmm... I don't see an Ediff command around here...")) 197 (error "Hmm... I don't see an Ediff command around here..."))
197 198
198 (ediff-documentation "Quick Help Commands") 199 (ediff-documentation "Quick Help Commands")
199 200
200 (let (case-fold-search) 201 (let (case-fold-search)
201 (cond ((string= cmd "?") (re-search-forward "^`\\?'")) 202 (cond ((string= cmd "?") (re-search-forward "^`\\?'"))
229 ((string= cmd "R") (re-search-forward "^`R'")) 230 ((string= cmd "R") (re-search-forward "^`R'"))
230 ((string= cmd "M") (re-search-forward "^`M'")) 231 ((string= cmd "M") (re-search-forward "^`M'"))
231 ((string= cmd "z/q") (re-search-forward "^`z'")) 232 ((string= cmd "z/q") (re-search-forward "^`z'"))
232 ((string= cmd "%") (re-search-forward "^`%'")) 233 ((string= cmd "%") (re-search-forward "^`%'"))
233 ((string= cmd "C-l") (re-search-forward "^`C-l'")) 234 ((string= cmd "C-l") (re-search-forward "^`C-l'"))
234 ((string= cmd "$") (re-search-forward "^`\\$'")) 235 ((string= cmd "$$") (re-search-forward "^`\\$\\$'"))
236 ((string= cmd "$*") (re-search-forward "^`\\$\\*'"))
235 ((string= cmd "/") (re-search-forward "^`/'")) 237 ((string= cmd "/") (re-search-forward "^`/'"))
236 ((string= cmd "&") (re-search-forward "^`&'")) 238 ((string= cmd "&") (re-search-forward "^`&'"))
237 ((string= cmd "s") (re-search-forward "^`s'")) 239 ((string= cmd "s") (re-search-forward "^`s'"))
238 ((string= cmd "+") (re-search-forward "^`\\+'")) 240 ((string= cmd "+") (re-search-forward "^`\\+'"))
239 ((string= cmd "=") (re-search-forward "^`='")) 241 ((string= cmd "=") (re-search-forward "^`='"))
307 (setq ediff-help-message (if ediff-use-long-help-message 309 (setq ediff-help-message (if ediff-use-long-help-message
308 ediff-long-help-message 310 ediff-long-help-message
309 ediff-brief-help-message)) 311 ediff-brief-help-message))
310 (run-hooks 'ediff-display-help-hook)) 312 (run-hooks 'ediff-display-help-hook))
311 313
314 (defun ediff-customize ()
315 (interactive)
316 (customize-group "ediff"))
317
312 318
313 ;;; ediff-help.el ends here 319 ;;; ediff-help.el ends here