Mercurial > emacs
annotate man/emacs-xtra.texi @ 69842:121db3a5c7ba
(Basic Indent): C-j deletes trailing whitespace before the newline.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Apr 2006 18:22:59 +0000 |
parents | 11b616eddda4 |
children | 601830ae280c |
rev | line source |
---|---|
56119 | 1 \input texinfo @c -*-texinfo-*- |
2 @comment %**start of header | |
3 @setfilename ../info/emacs-xtra | |
4 @settitle Specialized Emacs Features | |
5 @syncodeindex fn cp | |
6 @syncodeindex vr cp | |
7 @syncodeindex ky cp | |
8 @comment %**end of header | |
9 | |
10 @copying | |
56160
6ad083598109
(Supporting additional buffers): Minor change.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56149
diff
changeset
|
11 This manual describes specialized features of Emacs. |
56119 | 12 |
69681
11b616eddda4
@copyright{}, no indentation in @copying{}
Karl Berry <karl@gnu.org>
parents:
69530
diff
changeset
|
13 Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc. |
56119 | 14 |
15 @quotation | |
16 Permission is granted to copy, distribute and/or modify this document | |
65555
69b3598a61c5
Update all manuals to specify GFDL version 1.2.
Romain Francoise <romain@orebokech.com>
parents:
64890
diff
changeset
|
17 under the terms of the GNU Free Documentation License, Version 1.2 or |
56119 | 18 any later version published by the Free Software Foundation; with no |
19 Invariant Sections, with the Front-Cover texts being ``A GNU | |
20 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the | |
21 license is included in the section entitled ``GNU Free Documentation | |
22 License'' in the Emacs manual. | |
23 | |
24 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify | |
25 this GNU Manual, like GNU software. Copies published by the Free | |
26 Software Foundation raise funds for GNU development.'' | |
27 | |
28 This document is part of a collection distributed under the GNU Free | |
29 Documentation License. If you want to distribute this document | |
30 separately from the collection, you can do so by adding a copy of the | |
31 license to the document, as described in section 6 of the license. | |
32 @end quotation | |
33 @end copying | |
34 | |
35 @dircategory Emacs | |
36 @direntry | |
37 * Emacs-Xtra: (emacs-xtra). Specialized Emacs features. | |
38 @end direntry | |
39 | |
40 @titlepage | |
41 @title Specialized Emacs Features | |
42 @page | |
43 @vskip 0pt plus 1filll | |
44 @insertcopying | |
45 @end titlepage | |
46 | |
47 @contents | |
48 | |
49 @ifnottex | |
50 @node Top | |
51 @top Specialized Emacs Features | |
52 | |
53 @insertcopying | |
54 | |
55 @end ifnottex | |
56 | |
57 @menu | |
58 * Introduction:: What documentation belongs here? | |
59 * Autorevert:: Auto Reverting non-file buffers. | |
60 * Subdir switches:: Subdirectory switches in Dired. | |
61000
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
61 * Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. |
69530
408a60784b2e
(Top): Avoid ugly continuation line in menu in the standalone Info reader.
Luc Teirlinck <teirllm@auburn.edu>
parents:
69506
diff
changeset
|
62 * Emerge:: A convenient way of merging two versions |
408a60784b2e
(Top): Avoid ugly continuation line in menu in the standalone Info reader.
Luc Teirlinck <teirllm@auburn.edu>
parents:
69506
diff
changeset
|
63 of a program. |
69506
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
64 * Picture Mode:: Editing pictures made up of characters |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
65 using the quarter-plane screen model. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
66 * Fortran:: Fortran mode and its special features. |
56119 | 67 * Index:: |
68 @end menu | |
69 | |
70 @node Introduction | |
71 @unnumbered Introduction | |
72 | |
73 This manual contains detailed information about various features that | |
74 are too specialized to be included in the Emacs manual. It is | |
75 intended to be readable by anyone having a basic knowledge of Emacs. | |
76 However, certain sections may be intended for a more specialized | |
77 audience, such as Elisp authors. This should be clearly pointed out | |
78 at the beginning of these sections. | |
79 | |
80 This manual is intended as a complement, rather than an alternative, | |
81 to other ways to gain a more detailed knowledge of Emacs than the | |
82 Emacs manual can provide, such as browsing packages using @kbd{C-h p}, | |
83 accessing mode documentation using @kbd{C-h m} and browsing user | |
84 options using Custom. Also, certain packages, or collections of | |
85 related features, have their own manuals. The present manual is | |
86 mainly intended to be a collection of smaller specialized features, | |
87 too small to get their own manual. | |
88 | |
89 Sections intended specifically for Elisp programmers can follow the | |
90 style of the Elisp manual. Other sections should follow the style of | |
91 the Emacs manual. | |
92 | |
93 @node Autorevert | |
94 @chapter Auto Reverting non-file Buffers | |
95 | |
96 Normally Global Auto Revert Mode only reverts file buffers. There are | |
97 two ways to auto-revert certain non-file buffers: enabling Auto Revert | |
98 Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting | |
99 @code{global-auto-revert-non-file-buffers} to @code{t}. The latter | |
100 enables Auto Reverting for all types of buffers for which it is | |
101 implemented, that is, for the types of buffers listed in the menu | |
102 below. | |
103 | |
104 Like file buffers, non-file buffers should normally not revert while | |
105 you are working on them, or while they contain information that might | |
106 get lost after reverting. Therefore, they do not revert if they are | |
107 ``modified''. This can get tricky, because deciding when a non-file | |
108 buffer should be marked modified is usually more difficult than for | |
109 file buffers. | |
110 | |
111 Another tricky detail is that, for efficiency reasons, Auto Revert | |
112 often does not try to detect all possible changes in the buffer, only | |
113 changes that are ``major'' or easy to detect. Hence, enabling | |
114 auto-reverting for a non-file buffer does not always guarantee that | |
115 all information in the buffer is up to date and does not necessarily | |
116 make manual reverts useless. | |
117 | |
56128
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
118 At the other extreme, certain buffers automatically auto-revert every |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
119 @code{auto-revert-interval} seconds. (This currently only applies to |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
120 the Buffer Menu.) In this case, Auto Revert does not print any |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
121 messages while reverting, even when @code{auto-revert-verbose} is |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
122 non-@code{nil}. |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
123 |
56119 | 124 The details depend on the particular types of buffers and are |
125 explained in the corresponding sections. | |
126 | |
127 @menu | |
128 * Auto Reverting the Buffer Menu:: | |
129 * Auto Reverting Dired:: | |
130 * Supporting additional buffers:: | |
131 @end menu | |
132 | |
133 @node Auto Reverting the Buffer Menu | |
134 @section Auto Reverting the Buffer Menu | |
135 | |
136 If auto-reverting of non-file buffers is enabled, the Buffer Menu | |
137 automatically reverts every @code{auto-revert-interval} seconds, | |
138 whether there is a need for it or not. (It would probably take longer | |
139 to check whether there is a need than to actually revert.) | |
140 | |
141 If the Buffer Menu inappropriately gets marked modified, just revert | |
142 it manually using @kbd{g} and auto-reverting will resume. However, if | |
143 you marked certain buffers to get deleted or to be displayed, you have | |
144 to be careful, because reverting erases all marks. The fact that | |
145 adding marks sets the buffer's modified flag prevents Auto Revert from | |
146 automatically erasing the marks. | |
147 | |
148 @node Auto Reverting Dired | |
149 @section Auto Reverting Dired buffers | |
150 | |
56149
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
151 Auto-reverting Dired buffers currently works on GNU or Unix style |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
152 operating systems. It may not work satisfactorily on some other |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
153 systems. |
56119 | 154 |
155 Dired buffers only auto-revert when the file list of the buffer's main | |
156 directory changes. They do not auto-revert when information about a | |
157 particular file changes or when inserted subdirectories change. To be | |
158 sure that @emph{all} listed information is up to date, you have to | |
159 manually revert using @kbd{g}, @emph{even} if auto-reverting is | |
160 enabled in the Dired buffer. Sometimes, you might get the impression | |
161 that modifying or saving files listed in the main directory actually | |
162 does cause auto-reverting. This is because making changes to a file, | |
163 or saving it, very often causes changes in the directory itself, for | |
164 instance, through backup files or auto-save files. However, this is | |
165 not guaranteed. | |
166 | |
167 If the Dired buffer is marked modified and there are no changes you | |
168 want to protect, then most of the time you can make auto-reverting | |
169 resume by manually reverting the buffer using @kbd{g}. There is one | |
56149
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
170 exception. If you flag or mark files, you can safely revert the |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
171 buffer. This will not erase the flags or marks (unless the marked |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
172 file has been deleted, of course). However, the buffer will stay |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
173 modified, even after reverting, and auto-reverting will not resume. |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
174 This is because, if you flag or mark files, you may be working on the |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
175 buffer and you might not want the buffer to change without warning. |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
176 If you want auto-reverting to resume in the presence of marks and |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
177 flags, mark the buffer non-modified using @kbd{M-~}. However, adding, |
0e86f3e9a45d
(Auto Reverting Dired): Minor changes.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56131
diff
changeset
|
178 deleting or changing marks or flags will mark it modified again. |
56119 | 179 |
180 Remote Dired buffers are not auto-reverted. Neither are Dired buffers | |
181 for which you used shell wildcards or file arguments to list only some | |
182 of the files. @samp{*Find*} and @samp{*Locate*} buffers do not | |
183 auto-revert either. | |
184 | |
185 @node Supporting additional buffers | |
186 @section Adding Support for Auto-Reverting additional Buffers. | |
187 | |
188 This section is intended for Elisp programmers who would like to add | |
189 support for auto-reverting new types of buffers. | |
190 | |
191 To support auto-reverting the buffer must first of all have a | |
192 @code{revert-buffer-function}. @xref{Definition of | |
193 revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}. | |
194 | |
195 In addition, it @emph{must} have a @code{buffer-stale-function}. | |
196 | |
197 @defvar buffer-stale-function | |
198 The value of this variable is a function to check whether a non-file | |
199 buffer needs reverting. This should be a function with one optional | |
200 argument @var{noconfirm}. The function should return non-@code{nil} | |
201 if the buffer should be reverted. The buffer is current when this | |
202 function is called. | |
203 | |
204 While this function is mainly intended for use in auto-reverting, it | |
205 could be used for other purposes as well. For instance, if | |
206 auto-reverting is not enabled, it could be used to warn the user that | |
207 the buffer needs reverting. The idea behind the @var{noconfirm} | |
208 argument is that it should be @code{t} if the buffer is going to be | |
209 reverted without asking the user and @code{nil} if the function is | |
210 just going to be used to warn the user that the buffer is out of date. | |
211 In particular, for use in auto-reverting, @var{noconfirm} is @code{t}. | |
212 If the function is only going to be used for auto-reverting, you can | |
213 ignore the @var{noconfirm} argument. | |
214 | |
215 If you just want to automatically auto-revert every | |
216 @code{auto-revert-interval} seconds, use: | |
217 | |
218 @example | |
219 (set (make-local-variable 'buffer-stale-function) | |
220 #'(lambda (&optional noconfirm) 'fast)) | |
221 @end example | |
222 | |
223 @noindent | |
224 in the buffer's mode function. | |
225 | |
56128
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
226 The special return value @samp{fast} tells the caller that the need |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
227 for reverting was not checked, but that reverting the buffer is fast. |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
228 It also tells Auto Revert not to print any revert messages, even if |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
229 @code{auto-revert-verbose} is non-@code{nil}. This is important, as |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
230 getting revert messages every @code{auto-revert-interval} seconds can |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
231 be very annoying. The information provided by this return value could |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
232 also be useful if the function is consulted for purposes other than |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
233 auto-reverting. |
56119 | 234 @end defvar |
235 | |
236 Once the buffer has a @code{revert-buffer-function} and a | |
237 @code{buffer-stale-function}, several problems usually remain. | |
238 | |
239 The buffer will only auto-revert if it is marked unmodified. Hence, | |
240 you will have to make sure that various functions mark the buffer | |
241 modified if and only if either the buffer contains information that | |
242 might be lost by reverting or there is reason to believe that the user | |
243 might be inconvenienced by auto-reverting, because he is actively | |
244 working on the buffer. The user can always override this by manually | |
245 adjusting the modified status of the buffer. To support this, calling | |
246 the @code{revert-buffer-function} on a buffer that is marked | |
247 unmodified should always keep the buffer marked unmodified. | |
248 | |
249 It is important to assure that point does not continuously jump around | |
250 as a consequence of auto-reverting. Of course, moving point might be | |
251 inevitable if the buffer radically changes. | |
252 | |
253 You should make sure that the @code{revert-buffer-function} does not | |
254 print messages that unnecessarily duplicate Auto Revert's own messages | |
255 if @code{auto-revert-verbose} is @code{t} and effectively override a | |
256 @code{nil} value for @code{auto-revert-verbose}. Hence, adapting a | |
257 mode for auto-reverting often involves getting rid of such messages. | |
56128
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
258 This is especially important for buffers that automatically |
cf2e292bf084
(Autorevert, Supporting additional buffers): Explain special treatment
Luc Teirlinck <teirllm@auburn.edu>
parents:
56119
diff
changeset
|
259 auto-revert every @code{auto-revert-interval} seconds. |
56119 | 260 |
56160
6ad083598109
(Supporting additional buffers): Minor change.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56149
diff
changeset
|
261 Also, you may want to update the documentation string of |
6ad083598109
(Supporting additional buffers): Minor change.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56149
diff
changeset
|
262 @code{global-auto-revert-non-file-buffers}. |
6ad083598109
(Supporting additional buffers): Minor change.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56149
diff
changeset
|
263 |
56119 | 264 @ifinfo |
265 Finally, you should add a node to this chapter's menu. This node | |
266 @end ifinfo | |
267 @ifnotinfo | |
268 Finally, you should add a section to this chapter. This section | |
269 @end ifnotinfo | |
270 should at the very least make clear whether enabling auto-reverting | |
271 for the buffer reliably assures that all information in the buffer is | |
272 completely up to date (or will be after @code{auto-revert-interval} | |
273 seconds). | |
274 | |
275 @node Subdir switches | |
276 @chapter Subdirectory Switches in Dired | |
277 | |
278 You can insert subdirectories with specified @code{ls} switches in | |
279 Dired buffers, using @kbd{C-u i}. You can change the @code{ls} | |
280 switches of an already inserted subdirectory using @kbd{C-u l}. | |
281 | |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
56473
diff
changeset
|
282 In Emacs versions 22.1 and later, Dired remembers the switches, so |
56119 | 283 that reverting the buffer will not change them back to the main |
284 directory's switches. Deleting a subdirectory forgets about its | |
285 switches. | |
286 | |
287 Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u}) | |
288 to reinsert or delete subdirectories, that were inserted with explicit | |
289 switches, can bypass Dired's machinery for remembering (or forgetting) | |
290 switches. Deleting a subdirectory using @code{dired-undo} does not | |
291 forget its switches. When later reinserted using @kbd{i}, it will be | |
292 reinserted using its old switches. Using @code{dired-undo} to | |
293 reinsert a subdirectory that was deleted using the regular | |
294 Dired commands (not @code{dired-undo}) will originally insert it with | |
295 its old switches. However, reverting the buffer will relist it using | |
296 the buffer's default switches. If any of this yields problems, you | |
297 can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. | |
298 | |
56471
ca944d885fe6
(Subdir switches): Dired does not remember the `R' switch.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56160
diff
changeset
|
299 Dired does not remember the @code{R} switch. Inserting a subdirectory |
ca944d885fe6
(Subdir switches): Dired does not remember the `R' switch.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56160
diff
changeset
|
300 with switches that include the @code{R} switch is equivalent with |
ca944d885fe6
(Subdir switches): Dired does not remember the `R' switch.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56160
diff
changeset
|
301 inserting each of its subdirectories using all remaining switches. |
56473
d9fdff5fee26
(Subdir switches): Minor fix to previous change.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56471
diff
changeset
|
302 For instance, updating or killing a subdirectory that was inserted |
d9fdff5fee26
(Subdir switches): Minor fix to previous change.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56471
diff
changeset
|
303 with the @code{R} switch will not update or kill its subdirectories. |
56471
ca944d885fe6
(Subdir switches): Dired does not remember the `R' switch.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56160
diff
changeset
|
304 |
56119 | 305 The buffer's default switches do not affect subdirectories that were |
306 inserted using explicitly specified switches. In particular, | |
307 commands such as @kbd{s}, that change the buffer's switches do not | |
308 affect such subdirectories. (They do affect subdirectories without | |
309 explicitly assigned switches, however.) | |
310 | |
311 You can make Dired forget about all subdirectory switches and relist | |
312 all subdirectories with the buffer's default switches using | |
313 @kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer. | |
314 | |
61000
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
315 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
316 @c Moved here from the Emacs Lisp Reference Manual, 2005-03-26. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
317 @node Advanced Calendar/Diary Usage |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
318 @chapter Customizing the Calendar and Diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
319 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
320 There are many customizations that you can use to make the calendar and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
321 diary suit your personal tastes. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
322 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
323 @menu |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
324 * Calendar Customizing:: Defaults you can set. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
325 * Holiday Customizing:: Defining your own holidays. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
326 * Date Display Format:: Changing the format. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
327 * Time Display Format:: Changing the format. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
328 * Daylight Savings:: Changing the default. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
329 * Diary Customizing:: Defaults you can set. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
330 * Hebrew/Islamic Entries:: How to obtain them. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
331 * Fancy Diary Display:: Enhancing the diary display, sorting entries, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
332 using included diary files. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
333 * Sexp Diary Entries:: Fancy things you can do. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
334 @end menu |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
335 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
336 @node Calendar Customizing |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
337 @section Customizing the Calendar |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
338 @vindex calendar-holiday-marker |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
339 @vindex diary-entry-marker |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
340 The variable @code{calendar-holiday-marker} specifies how to mark a |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
341 date as being a holiday. Its value may be a single-character string |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
342 to insert next to the date, or a face name to use for displaying the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
343 date. Likewise, the variable @code{diary-entry-marker} specifies how |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
344 to mark a date that has diary entries. The calendar creates faces |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
345 named @code{holiday-face} and @code{diary-face} for these purposes; |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
346 those symbols are the default values of these variables. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
347 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
348 @vindex calendar-load-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
349 The variable @code{calendar-load-hook} is a normal hook run when the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
350 calendar package is first loaded (before actually starting to display |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
351 the calendar). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
352 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
353 @vindex initial-calendar-window-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
354 Starting the calendar runs the normal hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
355 @code{initial-calendar-window-hook}. Recomputation of the calendar |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
356 display does not run this hook. But if you leave the calendar with the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
357 @kbd{q} command and reenter it, the hook runs again.@refill |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
358 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
359 @vindex today-visible-calendar-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
360 The variable @code{today-visible-calendar-hook} is a normal hook run |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
361 after the calendar buffer has been prepared with the calendar when the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
362 current date is visible in the window. One use of this hook is to |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
363 replace today's date with asterisks; to do that, use the hook function |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
364 @code{calendar-star-date}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
365 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
366 @findex calendar-star-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
367 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
368 (add-hook 'today-visible-calendar-hook 'calendar-star-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
369 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
370 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
371 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
372 Another standard hook function marks the current date, either by |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
373 changing its face or by adding an asterisk. Here's how to use it: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
374 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
375 @findex calendar-mark-today |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
376 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
377 (add-hook 'today-visible-calendar-hook 'calendar-mark-today) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
378 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
379 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
380 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
381 @vindex calendar-today-marker |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
382 The variable @code{calendar-today-marker} specifies how to mark |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
383 today's date. Its value should be a single-character string to insert |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
384 next to the date or a face name to use for displaying the date. A |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
385 face named @code{calendar-today-face} is provided for this purpose; |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
386 that symbol is the default for this variable. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
387 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
388 @vindex today-invisible-calendar-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
389 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
390 A similar normal hook, @code{today-invisible-calendar-hook} is run if |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
391 the current date is @emph{not} visible in the window. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
392 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
393 @vindex calendar-move-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
394 Each of the calendar cursor motion commands runs the hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
395 @code{calendar-move-hook} after it moves the cursor. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
396 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
397 @node Holiday Customizing |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
398 @section Customizing the Holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
399 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
400 @vindex calendar-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
401 @vindex christian-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
402 @vindex hebrew-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
403 @vindex islamic-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
404 Emacs knows about holidays defined by entries on one of several lists. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
405 You can customize these lists of holidays to your own needs, adding or |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
406 deleting holidays. The lists of holidays that Emacs uses are for |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
407 general holidays (@code{general-holidays}), local holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
408 (@code{local-holidays}), Christian holidays (@code{christian-holidays}), |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
409 Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
410 holidays (@code{islamic-holidays}), and other holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
411 (@code{other-holidays}). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
412 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
413 @vindex general-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
414 The general holidays are, by default, holidays common throughout the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
415 United States. To eliminate these holidays, set @code{general-holidays} |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
416 to @code{nil}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
417 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
418 @vindex local-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
419 There are no default local holidays (but sites may supply some). You |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
420 can set the variable @code{local-holidays} to any list of holidays, as |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
421 described below. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
422 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
423 @vindex all-christian-calendar-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
424 @vindex all-hebrew-calendar-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
425 @vindex all-islamic-calendar-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
426 By default, Emacs does not include all the holidays of the religions |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
427 that it knows, only those commonly found in secular calendars. For a |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
428 more extensive collection of religious holidays, you can set any (or |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
429 all) of the variables @code{all-christian-calendar-holidays}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
430 @code{all-hebrew-calendar-holidays}, or |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
431 @code{all-islamic-calendar-holidays} to @code{t}. If you want to |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
432 eliminate the religious holidays, set any or all of the corresponding |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
433 variables @code{christian-holidays}, @code{hebrew-holidays}, and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
434 @code{islamic-holidays} to @code{nil}.@refill |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
435 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
436 @vindex other-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
437 You can set the variable @code{other-holidays} to any list of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
438 holidays. This list, normally empty, is intended for individual use. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
439 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
440 @cindex holiday forms |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
441 Each of the lists (@code{general-holidays}, @code{local-holidays}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
442 @code{christian-holidays}, @code{hebrew-holidays}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
443 @code{islamic-holidays}, and @code{other-holidays}) is a list of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
444 @dfn{holiday forms}, each holiday form describing a holiday (or |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
445 sometimes a list of holidays). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
446 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
447 Here is a table of the possible kinds of holiday form. Day numbers |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
448 and month numbers count starting from 1, but ``dayname'' numbers |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
449 count Sunday as 0. The element @var{string} is always the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
450 name of the holiday, as a string. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
451 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
452 @table @code |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
453 @item (holiday-fixed @var{month} @var{day} @var{string}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
454 A fixed date on the Gregorian calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
455 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
456 @item (holiday-float @var{month} @var{dayname} @var{k} @var{string}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
457 The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
458 (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
459 from the end of the month. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
460 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
461 @item (holiday-hebrew @var{month} @var{day} @var{string}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
462 A fixed date on the Hebrew calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
463 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
464 @item (holiday-islamic @var{month} @var{day} @var{string}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
465 A fixed date on the Islamic calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
466 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
467 @item (holiday-julian @var{month} @var{day} @var{string}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
468 A fixed date on the Julian calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
469 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
470 @item (holiday-sexp @var{sexp} @var{string}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
471 A date calculated by the Lisp expression @var{sexp}. The expression |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
472 should use the variable @code{year} to compute and return the date of a |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
473 holiday, or @code{nil} if the holiday doesn't happen this year. The |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
474 value of @var{sexp} must represent the date as a list of the form |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
475 @code{(@var{month} @var{day} @var{year})}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
476 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
477 @item (if @var{condition} @var{holiday-form}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
478 A holiday that happens only if @var{condition} is true. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
479 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
480 @item (@var{function} @r{[}@var{args}@r{]}) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
481 A list of dates calculated by the function @var{function}, called with |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
482 arguments @var{args}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
483 @end table |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
484 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
485 For example, suppose you want to add Bastille Day, celebrated in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
486 France on July 14. You can do this as follows: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
487 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
488 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
489 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
490 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
491 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
492 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
493 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
494 fourteenth day of the seventh month (July). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
495 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
496 Many holidays occur on a specific day of the week, at a specific time |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
497 of month. Here is a holiday form describing Hurricane Supplication Day, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
498 celebrated in the Virgin Islands on the fourth Monday in August: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
499 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
500 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
501 (holiday-float 8 1 4 "Hurricane Supplication Day") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
502 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
503 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
504 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
505 Here the 8 specifies August, the 1 specifies Monday (Sunday is 0, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
506 Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
507 the month (1 specifies the first occurrence, 2 the second occurrence, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
508 @minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
509 so on). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
510 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
511 You can specify holidays that occur on fixed days of the Hebrew, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
512 Islamic, and Julian calendars too. For example, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
513 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
514 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
515 (setq other-holidays |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
516 '((holiday-hebrew 10 2 "Last day of Hanukkah") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
517 (holiday-islamic 3 12 "Mohammed's Birthday") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
518 (holiday-julian 4 2 "Jefferson's Birthday"))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
519 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
520 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
521 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
522 adds the last day of Hanukkah (since the Hebrew months are numbered with |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
523 1 starting from Nisan), the Islamic feast celebrating Mohammed's |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
524 birthday (since the Islamic months are numbered from 1 starting with |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
525 Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
526 Julian calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
527 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
528 To include a holiday conditionally, use either Emacs Lisp's @code{if} or the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
529 @code{holiday-sexp} form. For example, American presidential elections |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
530 occur on the first Tuesday after the first Monday in November of years |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
531 divisible by 4: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
532 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
533 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
534 (holiday-sexp '(if (= 0 (% year 4)) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
535 (calendar-gregorian-from-absolute |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
536 (1+ (calendar-dayname-on-or-before |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
537 1 (+ 6 (calendar-absolute-from-gregorian |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
538 (list 11 1 year))))))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
539 "US Presidential Election") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
540 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
541 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
542 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
543 or |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
544 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
545 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
546 (if (= 0 (% displayed-year 4)) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
547 (fixed 11 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
548 (extract-calendar-day |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
549 (calendar-gregorian-from-absolute |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
550 (1+ (calendar-dayname-on-or-before |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
551 1 (+ 6 (calendar-absolute-from-gregorian |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
552 (list 11 1 displayed-year))))))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
553 "US Presidential Election")) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
554 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
555 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
556 Some holidays just don't fit into any of these forms because special |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
557 calculations are involved in their determination. In such cases you |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
558 must write a Lisp function to do the calculation. To include eclipses, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
559 for example, add @code{(eclipses)} to @code{other-holidays} |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
560 and write an Emacs Lisp function @code{eclipses} that returns a |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
561 (possibly empty) list of the relevant Gregorian dates among the range |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
562 visible in the calendar window, with descriptive strings, like this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
563 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
564 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
565 (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... ) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
566 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
567 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
568 @node Date Display Format |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
569 @section Date Display Format |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
570 @vindex calendar-date-display-form |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
571 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
572 You can customize the manner of displaying dates in the diary, in mode |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
573 lines, and in messages by setting @code{calendar-date-display-form}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
574 This variable holds a list of expressions that can involve the variables |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
575 @code{month}, @code{day}, and @code{year}, which are all numbers in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
576 string form, and @code{monthname} and @code{dayname}, which are both |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
577 alphabetic strings. In the American style, the default value of this |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
578 list is as follows: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
579 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
580 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
581 ((if dayname (concat dayname ", ")) monthname " " day ", " year) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
582 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
583 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
584 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
585 while in the European style this value is the default: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
586 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
587 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
588 ((if dayname (concat dayname ", ")) day " " monthname " " year) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
589 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
590 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
591 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
592 The ISO standard date representation is this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
593 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
594 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
595 (year "-" month "-" day) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
596 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
597 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
598 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
599 This specifies a typical American format: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
600 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
601 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
602 (month "/" day "/" (substring year -2)) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
603 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
604 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
605 @node Time Display Format |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
606 @section Time Display Format |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
607 @vindex calendar-time-display-form |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
608 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
609 The calendar and diary by default display times of day in the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
610 conventional American style with the hours from 1 through 12, minutes, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
611 and either @samp{am} or @samp{pm}. If you prefer the European style, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
612 also known in the US as military, in which the hours go from 00 to 23, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
613 you can alter the variable @code{calendar-time-display-form}. This |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
614 variable is a list of expressions that can involve the variables |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
615 @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
616 numbers in string form, and @code{am-pm} and @code{time-zone}, which are |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
617 both alphabetic strings. The default value of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
618 @code{calendar-time-display-form} is as follows: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
619 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
620 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
621 (12-hours ":" minutes am-pm |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
622 (if time-zone " (") time-zone (if time-zone ")")) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
623 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
624 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
625 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
626 Here is a value that provides European style times: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
627 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
628 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
629 (24-hours ":" minutes |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
630 (if time-zone " (") time-zone (if time-zone ")")) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
631 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
632 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
633 @node Daylight Savings |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
634 @section Daylight Savings Time |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
635 @cindex daylight savings time |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
636 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
637 Emacs understands the difference between standard time and daylight |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
638 savings time---the times given for sunrise, sunset, solstices, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
639 equinoxes, and the phases of the moon take that into account. The rules |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
640 for daylight savings time vary from place to place and have also varied |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
641 historically from year to year. To do the job properly, Emacs needs to |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
642 know which rules to use. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
643 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
644 Some operating systems keep track of the rules that apply to the place |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
645 where you are; on these systems, Emacs gets the information it needs |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
646 from the system automatically. If some or all of this information is |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
647 missing, Emacs fills in the gaps with the rules currently used in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
648 Cambridge, Massachusetts, which is the center of GNU's world. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
649 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
650 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
651 @vindex calendar-daylight-savings-starts |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
652 @vindex calendar-daylight-savings-ends |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
653 If the default choice of rules is not appropriate for your location, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
654 you can tell Emacs the rules to use by setting the variables |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
655 @code{calendar-daylight-savings-starts} and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
656 @code{calendar-daylight-savings-ends}. Their values should be Lisp |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
657 expressions that refer to the variable @code{year}, and evaluate to the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
658 Gregorian date on which daylight savings time starts or (respectively) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
659 ends, in the form of a list @code{(@var{month} @var{day} @var{year})}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
660 The values should be @code{nil} if your area does not use daylight |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
661 savings time. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
662 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
663 Emacs uses these expressions to determine the start and end dates of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
664 daylight savings time as holidays and for correcting times of day in the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
665 solar and lunar calculations. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
666 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
667 The values for Cambridge, Massachusetts are as follows: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
668 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
669 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
670 @group |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
671 (calendar-nth-named-day 1 0 4 year) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
672 (calendar-nth-named-day -1 0 10 year) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
673 @end group |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
674 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
675 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
676 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
677 i.e., the first 0th day (Sunday) of the fourth month (April) in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
678 the year specified by @code{year}, and the last Sunday of the tenth month |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
679 (October) of that year. If daylight savings time were |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
680 changed to start on October 1, you would set |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
681 @code{calendar-daylight-savings-starts} to this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
682 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
683 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
684 (list 10 1 year) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
685 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
686 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
687 For a more complex example, suppose daylight savings time begins on |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
688 the first of Nisan on the Hebrew calendar. You should set |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
689 @code{calendar-daylight-savings-starts} to this value: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
690 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
691 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
692 (calendar-gregorian-from-absolute |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
693 (calendar-absolute-from-hebrew |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
694 (list 1 1 (+ year 3760)))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
695 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
696 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
697 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
698 because Nisan is the first month in the Hebrew calendar and the Hebrew |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
699 year differs from the Gregorian year by 3760 at Nisan. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
700 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
701 If there is no daylight savings time at your location, or if you want |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
702 all times in standard time, set @code{calendar-daylight-savings-starts} |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
703 and @code{calendar-daylight-savings-ends} to @code{nil}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
704 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
705 @vindex calendar-daylight-time-offset |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
706 The variable @code{calendar-daylight-time-offset} specifies the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
707 difference between daylight savings time and standard time, measured in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
708 minutes. The value for Cambridge is 60. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
709 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
710 @vindex calendar-daylight-savings-starts-time |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
711 @vindex calendar-daylight-savings-ends-time |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
712 The variable @code{calendar-daylight-savings-starts-time} and the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
713 variable @code{calendar-daylight-savings-ends-time} specify the number |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
714 of minutes after midnight local time when the transition to and from |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
715 daylight savings time should occur. For Cambridge, both variables' |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
716 values are 120. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
717 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
718 @node Diary Customizing |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
719 @section Customizing the Diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
720 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
721 @vindex holidays-in-diary-buffer |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
722 Ordinarily, the mode line of the diary buffer window indicates any |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
723 holidays that fall on the date of the diary entries. The process of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
724 checking for holidays can take several seconds, so including holiday |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
725 information delays the display of the diary buffer noticeably. If you'd |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
726 prefer to have a faster display of the diary buffer but without the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
727 holiday information, set the variable @code{holidays-in-diary-buffer} to |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
728 @code{nil}.@refill |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
729 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
730 @vindex number-of-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
731 The variable @code{number-of-diary-entries} controls the number of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
732 days of diary entries to be displayed at one time. It affects the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
733 initial display when @code{view-diary-entries-initially} is @code{t}, as |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
734 well as the command @kbd{M-x diary}. For example, the default value is |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
735 1, which says to display only the current day's diary entries. If the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
736 value is 2, both the current day's and the next day's entries are |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
737 displayed. The value can also be a vector of seven elements: for |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
738 example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
739 appear on Sunday, the current date's and the next day's diary entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
740 appear Monday through Thursday, Friday through Monday's entries appear |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
741 on Friday, while on Saturday only that day's entries appear. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
742 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
743 @vindex print-diary-entries-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
744 @findex print-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
745 The variable @code{print-diary-entries-hook} is a normal hook run |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
746 after preparation of a temporary buffer containing just the diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
747 entries currently visible in the diary buffer. (The other, irrelevant |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
748 diary entries are really absent from the temporary buffer; in the diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
749 buffer, they are merely hidden.) The default value of this hook does |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
750 the printing with the command @code{lpr-buffer}. If you want to use a |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
751 different command to do the printing, just change the value of this |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
752 hook. Other uses might include, for example, rearranging the lines into |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
753 order by day and time. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
754 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
755 @vindex diary-date-forms |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
756 You can customize the form of dates in your diary file, if neither the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
757 standard American nor European styles suits your needs, by setting the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
758 variable @code{diary-date-forms}. This variable is a list of patterns |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
759 for recognizing a date. Each date pattern is a list whose elements may |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
760 be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
761 Lisp Reference Manual}) or the symbols @code{month}, @code{day}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
762 @code{year}, @code{monthname}, and @code{dayname}. All these elements |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
763 serve as patterns that match certain kinds of text in the diary file. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
764 In order for the date pattern, as a whole, to match, all of its elements |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
765 must match consecutively. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
766 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
767 A regular expression in a date pattern matches in its usual fashion, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
768 using the standard syntax table altered so that @samp{*} is a word |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
769 constituent. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
770 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
771 The symbols @code{month}, @code{day}, @code{year}, @code{monthname}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
772 and @code{dayname} match the month number, day number, year number, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
773 month name, and day name of the date being considered. The symbols that |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
774 match numbers allow leading zeros; those that match names allow |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
775 three-letter abbreviations and capitalization. All the symbols can |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
776 match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
777 month'', and so on, it should match regardless of the date being |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
778 considered. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
779 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
780 The default value of @code{diary-date-forms} in the American style is |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
781 this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
782 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
783 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
784 ((month "/" day "[^/0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
785 (month "/" day "/" year "[^0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
786 (monthname " *" day "[^,0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
787 (monthname " *" day ", *" year "[^0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
788 (dayname "\\W")) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
789 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
790 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
791 The date patterns in the list must be @emph{mutually exclusive} and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
792 must not match any portion of the diary entry itself, just the date and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
793 one character of whitespace. If, to be mutually exclusive, the pattern |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
794 must match a portion of the diary entry text---beyond the whitespace |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
795 that ends the date---then the first element of the date pattern |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
796 @emph{must} be @code{backup}. This causes the date recognizer to back |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
797 up to the beginning of the current word of the diary entry, after |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
798 finishing the match. Even if you use @code{backup}, the date pattern |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
799 must absolutely not match more than a portion of the first word of the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
800 diary entry. The default value of @code{diary-date-forms} in the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
801 European style is this list: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
802 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
803 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
804 ((day "/" month "[^/0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
805 (day "/" month "/" year "[^0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
806 (backup day " *" monthname "\\W+\\<[^*0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
807 (day " *" monthname " *" year "[^0-9]") |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
808 (dayname "\\W")) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
809 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
810 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
811 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
812 Notice the use of @code{backup} in the third pattern, because it needs |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
813 to match part of a word beyond the date itself to distinguish it from |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
814 the fourth pattern. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
815 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
816 @node Hebrew/Islamic Entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
817 @section Hebrew- and Islamic-Date Diary Entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
818 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
819 Your diary file can have entries based on Hebrew or Islamic dates, as |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
820 well as entries based on the world-standard Gregorian calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
821 However, because recognition of such entries is time-consuming and most |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
822 people don't use them, you must explicitly enable their use. If you |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
823 want the diary to recognize Hebrew-date diary entries, for example, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
824 you must do this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
825 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
826 @vindex nongregorian-diary-listing-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
827 @vindex nongregorian-diary-marking-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
828 @findex list-hebrew-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
829 @findex mark-hebrew-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
830 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
831 (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
832 (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
833 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
834 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
835 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
836 If you want Islamic-date entries, do this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
837 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
838 @findex list-islamic-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
839 @findex mark-islamic-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
840 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
841 (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
842 (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
843 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
844 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
845 Hebrew- and Islamic-date diary entries have the same formats as |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
846 Gregorian-date diary entries, except that @samp{H} precedes a Hebrew |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
847 date and @samp{I} precedes an Islamic date. Moreover, because the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
848 Hebrew and Islamic month names are not uniquely specified by the first |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
849 three letters, you may not abbreviate them. For example, a diary entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
850 for the Hebrew date Heshvan 25 could look like this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
851 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
852 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
853 HHeshvan 25 Happy Hebrew birthday! |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
854 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
855 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
856 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
857 and would appear in the diary for any date that corresponds to Heshvan 25 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
858 on the Hebrew calendar. And here is an Islamic-date diary entry that matches |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
859 Dhu al-Qada 25: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
860 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
861 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
862 IDhu al-Qada 25 Happy Islamic birthday! |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
863 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
864 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
865 As with Gregorian-date diary entries, Hebrew- and Islamic-date entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
866 are nonmarking if they are preceded with an ampersand (@samp{&}). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
867 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
868 Here is a table of commands used in the calendar to create diary entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
869 that match the selected date and other dates that are similar in the Hebrew |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
870 or Islamic calendar: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
871 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
872 @table @kbd |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
873 @item i h d |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
874 Add a diary entry for the Hebrew date corresponding to the selected date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
875 (@code{insert-hebrew-diary-entry}). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
876 @item i h m |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
877 Add a diary entry for the day of the Hebrew month corresponding to the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
878 selected date (@code{insert-monthly-hebrew-diary-entry}). This diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
879 entry matches any date that has the same Hebrew day-within-month as the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
880 selected date. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
881 @item i h y |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
882 Add a diary entry for the day of the Hebrew year corresponding to the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
883 selected date (@code{insert-yearly-hebrew-diary-entry}). This diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
884 entry matches any date which has the same Hebrew month and day-within-month |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
885 as the selected date. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
886 @item i i d |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
887 Add a diary entry for the Islamic date corresponding to the selected date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
888 (@code{insert-islamic-diary-entry}). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
889 @item i i m |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
890 Add a diary entry for the day of the Islamic month corresponding to the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
891 selected date (@code{insert-monthly-islamic-diary-entry}). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
892 @item i i y |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
893 Add a diary entry for the day of the Islamic year corresponding to the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
894 selected date (@code{insert-yearly-islamic-diary-entry}). |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
895 @end table |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
896 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
897 @findex insert-hebrew-diary-entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
898 @findex insert-monthly-hebrew-diary-entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
899 @findex insert-yearly-hebrew-diary-entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
900 @findex insert-islamic-diary-entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
901 @findex insert-monthly-islamic-diary-entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
902 @findex insert-yearly-islamic-diary-entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
903 These commands work much like the corresponding commands for ordinary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
904 diary entries: they apply to the date that point is on in the calendar |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
905 window, and what they do is insert just the date portion of a diary entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
906 at the end of your diary file. You must then insert the rest of the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
907 diary entry. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
908 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
909 @node Fancy Diary Display |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
910 @section Fancy Diary Display |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
911 @vindex diary-display-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
912 @findex simple-diary-display |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
913 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
914 Diary display works by preparing the diary buffer and then running the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
915 hook @code{diary-display-hook}. The default value of this hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
916 (@code{simple-diary-display}) hides the irrelevant diary entries and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
917 then displays the buffer. However, if you specify the hook as follows, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
918 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
919 @cindex diary buffer |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
920 @findex fancy-diary-display |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
921 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
922 (add-hook 'diary-display-hook 'fancy-diary-display) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
923 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
924 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
925 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
926 this enables fancy diary display. It displays diary entries and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
927 holidays by copying them into a special buffer that exists only for the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
928 sake of display. Copying to a separate buffer provides an opportunity |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
929 to change the displayed text to make it prettier---for example, to sort |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
930 the entries by the dates they apply to. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
931 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
932 As with simple diary display, you can print a hard copy of the buffer |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
933 with @code{print-diary-entries}. To print a hard copy of a day-by-day |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
934 diary for a week, position point on Sunday of that week, type |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
935 @kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
936 inclusion of the holidays slows down the display slightly; you can speed |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
937 things up by setting the variable @code{holidays-in-diary-buffer} to |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
938 @code{nil}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
939 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
940 @vindex diary-list-include-blanks |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
941 Ordinarily, the fancy diary buffer does not show days for which there are |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
942 no diary entries, even if that day is a holiday. If you want such days to be |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
943 shown in the fancy diary buffer, set the variable |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
944 @code{diary-list-include-blanks} to @code{t}.@refill |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
945 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
946 @cindex sorting diary entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
947 If you use the fancy diary display, you can use the normal hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
948 @code{list-diary-entries-hook} to sort each day's diary entries by their |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
949 time of day. Here's how: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
950 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
951 @findex sort-diary-entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
952 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
953 (add-hook 'list-diary-entries-hook 'sort-diary-entries t) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
954 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
955 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
956 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
957 For each day, this sorts diary entries that begin with a recognizable |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
958 time of day according to their times. Diary entries without times come |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
959 first within each day. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
960 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
961 Fancy diary display also has the ability to process included diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
962 files. This permits a group of people to share a diary file for events |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
963 that apply to all of them. Lines in the diary file of this form: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
964 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
965 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
966 #include "@var{filename}" |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
967 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
968 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
969 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
970 includes the diary entries from the file @var{filename} in the fancy |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
971 diary buffer. The include mechanism is recursive, so that included files |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
972 can include other files, and so on; you must be careful not to have a |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
973 cycle of inclusions, of course. Here is how to enable the include |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
974 facility: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
975 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
976 @vindex list-diary-entries-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
977 @vindex mark-diary-entries-hook |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
978 @findex include-other-diary-files |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
979 @findex mark-included-diary-files |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
980 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
981 (add-hook 'list-diary-entries-hook 'include-other-diary-files) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
982 (add-hook 'mark-diary-entries-hook 'mark-included-diary-files) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
983 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
984 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
985 The include mechanism works only with the fancy diary display, because |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
986 ordinary diary display shows the entries directly from your diary file. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
987 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
988 @node Sexp Diary Entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
989 @section Sexp Entries and the Fancy Diary Display |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
990 @cindex sexp diary entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
991 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
992 Sexp diary entries allow you to do more than just have complicated |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
993 conditions under which a diary entry applies. If you use the fancy |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
994 diary display, sexp entries can generate the text of the entry depending |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
995 on the date itself. For example, an anniversary diary entry can insert |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
996 the number of years since the anniversary date into the text of the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
997 diary entry. Thus the @samp{%d} in this dairy entry: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
998 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
999 @findex diary-anniversary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1000 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1001 %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1002 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1003 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1004 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1005 gets replaced by the age, so on October 31, 1990 the entry appears in |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1006 the fancy diary buffer like this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1007 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1008 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1009 Arthur's birthday (42 years old) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1010 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1011 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1012 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1013 If the diary file instead contains this entry: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1014 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1015 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1016 %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1017 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1018 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1019 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1020 the entry in the fancy diary buffer for October 31, 1990 appears like this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1021 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1022 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1023 Arthur's 42nd birthday |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1024 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1025 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1026 Similarly, cyclic diary entries can interpolate the number of repetitions |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1027 that have occurred: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1028 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1029 @findex diary-cyclic |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1030 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1031 %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1032 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1033 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1034 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1035 looks like this: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1036 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1037 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1038 Renew medication (5th time) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1039 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1040 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1041 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1042 in the fancy diary display on September 8, 1990. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1043 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1044 There is an early reminder diary sexp that includes its entry in the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1045 diary not only on the date of occurrence, but also on earlier dates. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1046 For example, if you want a reminder a week before your anniversary, you |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1047 can use |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1048 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1049 @findex diary-remind |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1050 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1051 %%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1052 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1053 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1054 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1055 and the fancy diary will show |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1056 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1057 Ed's anniversary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1058 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1059 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1060 both on December 15 and on December 22. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1061 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1062 @findex diary-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1063 The function @code{diary-date} applies to dates described by a month, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1064 day, year combination, each of which can be an integer, a list of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1065 integers, or @code{t}. The value @code{t} means all values. For |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1066 example, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1067 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1068 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1069 %%(diary-date '(10 11 12) 22 t) Rake leaves |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1070 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1071 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1072 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1073 causes the fancy diary to show |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1074 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1075 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1076 Rake leaves |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1077 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1078 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1079 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1080 on October 22, November 22, and December 22 of every year. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1081 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1082 @findex diary-float |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1083 The function @code{diary-float} allows you to describe diary entries |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1084 that apply to dates like the third Friday of November, or the last |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1085 Tuesday in April. The parameters are the @var{month}, @var{dayname}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1086 and an index @var{n}. The entry appears on the @var{n}th @var{dayname} |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1087 of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1088 so on. If @var{n} is negative it counts backward from the end of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1089 @var{month}. The value of @var{month} can be a list of months, a single |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1090 month, or @code{t} to specify all months. You can also use an optional |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1091 parameter @var{day} to specify the @var{n}th @var{dayname} of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1092 @var{month} on or after/before @var{day}; the value of @var{day} defaults |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1093 to 1 if @var{n} is positive and to the last day of @var{month} if |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1094 @var{n} is negative. For example, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1095 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1096 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1097 %%(diary-float t 1 -1) Pay rent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1098 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1099 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1100 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1101 causes the fancy diary to show |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1102 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1103 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1104 Pay rent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1105 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1106 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1107 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1108 on the last Monday of every month. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1109 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1110 The generality of sexp diary entries lets you specify any diary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1111 entry that you can describe algorithmically. A sexp diary entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1112 contains an expression that computes whether the entry applies to any |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1113 given date. If its value is non-@code{nil}, the entry applies to that |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1114 date; otherwise, it does not. The expression can use the variable |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1115 @code{date} to find the date being considered; its value is a list |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1116 (@var{month} @var{day} @var{year}) that refers to the Gregorian |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1117 calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1118 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1119 The sexp diary entry applies to a date when the expression's value |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1120 is non-@code{nil}, but some values have more specific meanings. If |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1121 the value is a string, that string is a description of the event which |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1122 occurs on that date. The value can also have the form |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1123 @code{(@var{mark} . @var{string})}; then @var{mark} specifies how to |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1124 mark the date in the calendar, and @var{string} is the description of |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1125 the event. If @var{mark} is a single-character string, that character |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1126 appears next to the date in the calendar. If @var{mark} is a face |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1127 name, the date is displayed in that face. If @var{mark} is |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1128 @code{nil}, that specifies no particular highlighting for the date. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1129 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1130 Suppose you get paid on the 21st of the month if it is a weekday, and |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1131 on the Friday before if the 21st is on a weekend. Here is how to write |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1132 a sexp diary entry that matches those dates: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1133 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1134 @smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1135 &%%(let ((dayname (calendar-day-of-week date)) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1136 (day (car (cdr date)))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1137 (or (and (= day 21) (memq dayname '(1 2 3 4 5))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1138 (and (memq day '(19 20)) (= dayname 5))) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1139 ) Pay check deposited |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1140 @end smallexample |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1141 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1142 The following sexp diary entries take advantage of the ability (in the fancy |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1143 diary display) to concoct diary entries whose text varies based on the date: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1144 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1145 @findex diary-sunrise-sunset |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1146 @findex diary-phases-of-moon |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1147 @findex diary-day-of-year |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1148 @findex diary-iso-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1149 @findex diary-julian-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1150 @findex diary-astro-day-number |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1151 @findex diary-hebrew-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1152 @findex diary-islamic-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1153 @findex diary-french-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1154 @findex diary-mayan-date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1155 @table @code |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1156 @item %%(diary-sunrise-sunset) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1157 Make a diary entry for the local times of today's sunrise and sunset. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1158 @item %%(diary-phases-of-moon) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1159 Make a diary entry for the phases (quarters) of the moon. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1160 @item %%(diary-day-of-year) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1161 Make a diary entry with today's day number in the current year and the number |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1162 of days remaining in the current year. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1163 @item %%(diary-iso-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1164 Make a diary entry with today's equivalent ISO commercial date. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1165 @item %%(diary-julian-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1166 Make a diary entry with today's equivalent date on the Julian calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1167 @item %%(diary-astro-day-number) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1168 Make a diary entry with today's equivalent astronomical (Julian) day number. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1169 @item %%(diary-hebrew-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1170 Make a diary entry with today's equivalent date on the Hebrew calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1171 @item %%(diary-islamic-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1172 Make a diary entry with today's equivalent date on the Islamic calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1173 @item %%(diary-french-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1174 Make a diary entry with today's equivalent date on the French Revolutionary |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1175 calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1176 @item %%(diary-mayan-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1177 Make a diary entry with today's equivalent date on the Mayan calendar. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1178 @end table |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1179 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1180 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1181 Thus including the diary entry |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1182 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1183 @example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1184 &%%(diary-hebrew-date) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1185 @end example |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1186 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1187 @noindent |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1188 causes every day's diary display to contain the equivalent date on the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1189 Hebrew calendar, if you are using the fancy diary display. (With simple |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1190 diary display, the line @samp{&%%(diary-hebrew-date)} appears in the |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1191 diary for any date, but does nothing particularly useful.) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1192 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1193 These functions can be used to construct sexp diary entries based on |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1194 the Hebrew calendar in certain standard ways: |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1195 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1196 @cindex rosh hodesh |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1197 @findex diary-rosh-hodesh |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1198 @cindex parasha, weekly |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1199 @findex diary-parasha |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1200 @cindex candle lighting times |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1201 @findex diary-sabbath-candles |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1202 @cindex omer count |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1203 @findex diary-omer |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1204 @cindex yahrzeits |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1205 @findex diary-yahrzeit |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1206 @table @code |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1207 @item %%(diary-rosh-hodesh) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1208 Make a diary entry that tells the occurrence and ritual announcement of each |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1209 new Hebrew month. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1210 @item %%(diary-parasha) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1211 Make a Saturday diary entry that tells the weekly synagogue scripture reading. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1212 @item %%(diary-sabbath-candles) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1213 Make a Friday diary entry that tells the @emph{local time} of Sabbath |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1214 candle lighting. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1215 @item %%(diary-omer) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1216 Make a diary entry that gives the omer count, when appropriate. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1217 @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name} |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1218 Make a diary entry marking the anniversary of a date of death. The date |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1219 is the @emph{Gregorian} (civil) date of death. The diary entry appears |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1220 on the proper Hebrew calendar anniversary and on the day before. (In |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1221 the European style, the order of the parameters is changed to @var{day}, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1222 @var{month}, @var{year}.) |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1223 @end table |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1224 |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1225 All the functions documented above take an optional argument |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1226 @var{mark} which specifies how to mark the date in the calendar display. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1227 If one of these functions decides that it applies to a certain date, |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1228 it returns a value that contains @var{mark}. |
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
1229 |
69506
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1230 @node Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1231 @chapter Merging Files with Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1232 @cindex Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1233 @cindex merging files |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1234 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1235 It's not unusual for programmers to get their signals crossed and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1236 modify the same program in two different directions. To recover from |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1237 this confusion, you need to merge the two versions. Emerge makes this |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1238 easier. For other ways to compare files, see @ref{Comparing Files,,, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1239 emacs, the Emacs Manual} and @ref{Top, Ediff,, ediff, The Ediff |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1240 Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1241 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1242 @menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1243 * Overview of Emerge:: How to start Emerge. Basic concepts. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1244 * Submodes of Emerge:: Fast mode vs. Edit mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1245 Skip Prefers mode and Auto Advance mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1246 * State of Difference:: You do the merge by specifying state A or B |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1247 for each difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1248 * Merge Commands:: Commands for selecting a difference, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1249 changing states of differences, etc. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1250 * Exiting Emerge:: What to do when you've finished the merge. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1251 * Combining in Emerge:: How to keep both alternatives for a difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1252 * Fine Points of Emerge:: Misc. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1253 @end menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1254 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1255 @node Overview of Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1256 @section Overview of Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1257 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1258 To start Emerge, run one of these four commands: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1259 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1260 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1261 @item M-x emerge-files |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1262 @findex emerge-files |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1263 Merge two specified files. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1264 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1265 @item M-x emerge-files-with-ancestor |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1266 @findex emerge-files-with-ancestor |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1267 Merge two specified files, with reference to a common ancestor. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1268 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1269 @item M-x emerge-buffers |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1270 @findex emerge-buffers |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1271 Merge two buffers. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1272 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1273 @item M-x emerge-buffers-with-ancestor |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1274 @findex emerge-buffers-with-ancestor |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1275 Merge two buffers with reference to a common ancestor in a third |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1276 buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1277 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1278 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1279 @cindex merge buffer (Emerge) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1280 @cindex A and B buffers (Emerge) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1281 The Emerge commands compare two files or buffers, and display the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1282 comparison in three buffers: one for each input text (the @dfn{A buffer} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1283 and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1284 takes place. The merge buffer shows the full merged text, not just the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1285 differences. Wherever the two input texts differ, you can choose which |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1286 one of them to include in the merge buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1287 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1288 The Emerge commands that take input from existing buffers use only |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1289 the accessible portions of those buffers, if they are narrowed. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1290 @xref{Narrowing,,, emacs, the Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1291 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1292 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1293 If a common ancestor version is available, from which the two texts to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1294 be merged were both derived, Emerge can use it to guess which |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1295 alternative is right. Wherever one current version agrees with the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1296 ancestor, Emerge presumes that the other current version is a deliberate |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1297 change which should be kept in the merged version. Use the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1298 @samp{with-ancestor} commands if you want to specify a common ancestor |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1299 text. These commands read three file or buffer names---variant A, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1300 variant B, and the common ancestor. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1301 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1302 After the comparison is done and the buffers are prepared, the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1303 interactive merging starts. You control the merging by typing special |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1304 @dfn{merge commands} in the merge buffer (@pxref{Merge Commands}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1305 For each run of differences between the input texts, you can choose |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1306 which one of them to keep, or edit them both together. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1307 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1308 The merge buffer uses a special major mode, Emerge mode, with commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1309 for making these choices. But you can also edit the buffer with |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1310 ordinary Emacs commands. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1311 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1312 At any given time, the attention of Emerge is focused on one |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1313 particular difference, called the @dfn{selected} difference. This |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1314 difference is marked off in the three buffers like this: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1315 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1316 @example |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1317 vvvvvvvvvvvvvvvvvvvv |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1318 @var{text that differs} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1319 ^^^^^^^^^^^^^^^^^^^^ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1320 @end example |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1321 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1322 @noindent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1323 Emerge numbers all the differences sequentially and the mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1324 line always shows the number of the selected difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1325 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1326 Normally, the merge buffer starts out with the A version of the text. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1327 But when the A version of a difference agrees with the common ancestor, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1328 then the B version is initially preferred for that difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1329 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1330 Emerge leaves the merged text in the merge buffer when you exit. At |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1331 that point, you can save it in a file with @kbd{C-x C-w}. If you give a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1332 numeric argument to @code{emerge-files} or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1333 @code{emerge-files-with-ancestor}, it reads the name of the output file |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1334 using the minibuffer. (This is the last file name those commands read.) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1335 Then exiting from Emerge saves the merged text in the output file. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1336 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1337 Normally, Emerge commands save the output buffer in its file when you |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1338 exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1339 save the output buffer, but you can save it yourself if you wish. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1340 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1341 @node Submodes of Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1342 @section Submodes of Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1343 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1344 You can choose between two modes for giving merge commands: Fast mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1345 and Edit mode. In Fast mode, basic merge commands are single |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1346 characters, but ordinary Emacs commands are disabled. This is |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1347 convenient if you use only merge commands. In Edit mode, all merge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1348 commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1349 commands are also available. This allows editing the merge buffer, but |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1350 slows down Emerge operations. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1351 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1352 Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1353 Fast mode. The mode line indicates Edit and Fast modes with @samp{E} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1354 and @samp{F}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1355 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1356 Emerge has two additional submodes that affect how particular merge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1357 commands work: Auto Advance mode and Skip Prefers mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1358 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1359 If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1360 advance to the next difference. This lets you go through the merge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1361 faster as long as you simply choose one of the alternatives from the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1362 input. The mode line indicates Auto Advance mode with @samp{A}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1363 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1364 If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1365 skip over differences in states prefer-A and prefer-B (@pxref{State of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1366 Difference}). Thus you see only differences for which neither version |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1367 is presumed ``correct.'' The mode line indicates Skip Prefers mode with |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1368 @samp{S}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1369 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1370 @findex emerge-auto-advance-mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1371 @findex emerge-skip-prefers-mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1372 Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1373 clear Auto Advance mode. Use @kbd{s s} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1374 (@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1375 These commands turn on the mode with a positive argument, turns it off |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1376 with a negative or zero argument, and toggle the mode with no argument. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1377 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1378 @node State of Difference |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1379 @section State of a Difference |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1380 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1381 In the merge buffer, a difference is marked with lines of @samp{v} and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1382 @samp{^} characters. Each difference has one of these seven states: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1383 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1384 @table @asis |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1385 @item A |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1386 The difference is showing the A version. The @kbd{a} command always |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1387 produces this state; the mode line indicates it with @samp{A}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1388 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1389 @item B |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1390 The difference is showing the B version. The @kbd{b} command always |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1391 produces this state; the mode line indicates it with @samp{B}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1392 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1393 @item default-A |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1394 @itemx default-B |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1395 The difference is showing the A or the B state by default, because you |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1396 haven't made a choice. All differences start in the default-A state |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1397 (and thus the merge buffer is a copy of the A buffer), except those for |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1398 which one alternative is ``preferred'' (see below). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1399 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1400 When you select a difference, its state changes from default-A or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1401 default-B to plain A or B. Thus, the selected difference never has |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1402 state default-A or default-B, and these states are never displayed in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1403 the mode line. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1404 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1405 The command @kbd{d a} chooses default-A as the default state, and @kbd{d |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1406 b} chooses default-B. This chosen default applies to all differences |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1407 which you haven't ever selected and for which no alternative is preferred. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1408 If you are moving through the merge sequentially, the differences you |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1409 haven't selected are those following the selected one. Thus, while |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1410 moving sequentially, you can effectively make the A version the default |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1411 for some sections of the merge buffer and the B version the default for |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1412 others by using @kbd{d a} and @kbd{d b} between sections. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1413 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1414 @item prefer-A |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1415 @itemx prefer-B |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1416 The difference is showing the A or B state because it is |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1417 @dfn{preferred}. This means that you haven't made an explicit choice, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1418 but one alternative seems likely to be right because the other |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1419 alternative agrees with the common ancestor. Thus, where the A buffer |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1420 agrees with the common ancestor, the B version is preferred, because |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1421 chances are it is the one that was actually changed. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1422 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1423 These two states are displayed in the mode line as @samp{A*} and @samp{B*}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1424 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1425 @item combined |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1426 The difference is showing a combination of the A and B states, as a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1427 result of the @kbd{x c} or @kbd{x C} commands. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1428 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1429 Once a difference is in this state, the @kbd{a} and @kbd{b} commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1430 don't do anything to it unless you give them a numeric argument. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1431 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1432 The mode line displays this state as @samp{comb}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1433 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1434 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1435 @node Merge Commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1436 @section Merge Commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1437 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1438 Here are the Merge commands for Fast mode; in Edit mode, precede them |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1439 with @kbd{C-c C-c}: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1440 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1441 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1442 @item p |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1443 Select the previous difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1444 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1445 @item n |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1446 Select the next difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1447 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1448 @item a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1449 Choose the A version of this difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1450 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1451 @item b |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1452 Choose the B version of this difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1453 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1454 @item C-u @var{n} j |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1455 Select difference number @var{n}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1456 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1457 @item . |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1458 Select the difference containing point. You can use this command in the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1459 merge buffer or in the A or B buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1460 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1461 @item q |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1462 Quit---finish the merge. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1463 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1464 @item C-] |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1465 Abort---exit merging and do not save the output. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1466 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1467 @item f |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1468 Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1469 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1470 @item e |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1471 Go into Edit mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1472 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1473 @item l |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1474 Recenter (like @kbd{C-l}) all three windows. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1475 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1476 @item - |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1477 Specify part of a prefix numeric argument. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1478 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1479 @item @var{digit} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1480 Also specify part of a prefix numeric argument. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1481 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1482 @item d a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1483 Choose the A version as the default from here down in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1484 the merge buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1485 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1486 @item d b |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1487 Choose the B version as the default from here down in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1488 the merge buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1489 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1490 @item c a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1491 Copy the A version of this difference into the kill ring. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1492 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1493 @item c b |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1494 Copy the B version of this difference into the kill ring. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1495 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1496 @item i a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1497 Insert the A version of this difference at point. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1498 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1499 @item i b |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1500 Insert the B version of this difference at point. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1501 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1502 @item m |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1503 Put point and mark around the difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1504 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1505 @item ^ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1506 Scroll all three windows down (like @kbd{M-v}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1507 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1508 @item v |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1509 Scroll all three windows up (like @kbd{C-v}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1510 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1511 @item < |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1512 Scroll all three windows left (like @kbd{C-x <}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1513 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1514 @item > |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1515 Scroll all three windows right (like @kbd{C-x >}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1516 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1517 @item | |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1518 Reset horizontal scroll on all three windows. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1519 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1520 @item x 1 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1521 Shrink the merge window to one line. (Use @kbd{C-u l} to restore it |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1522 to full size.) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1523 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1524 @item x c |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1525 Combine the two versions of this difference (@pxref{Combining in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1526 Emerge}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1527 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1528 @item x f |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1529 Show the names of the files/buffers Emerge is operating on, in a Help |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1530 window. (Use @kbd{C-u l} to restore windows.) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1531 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1532 @item x j |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1533 Join this difference with the following one. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1534 (@kbd{C-u x j} joins this difference with the previous one.) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1535 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1536 @item x s |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1537 Split this difference into two differences. Before you use this |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1538 command, position point in each of the three buffers at the place where |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1539 you want to split the difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1540 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1541 @item x t |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1542 Trim identical lines off the top and bottom of the difference. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1543 Such lines occur when the A and B versions are |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1544 identical but differ from the ancestor version. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1545 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1546 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1547 @node Exiting Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1548 @section Exiting Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1549 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1550 The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1551 the results into the output file if you specified one. It restores the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1552 A and B buffers to their proper contents, or kills them if they were |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1553 created by Emerge and you haven't changed them. It also disables the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1554 Emerge commands in the merge buffer, since executing them later could |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1555 damage the contents of the various buffers. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1556 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1557 @kbd{C-]} aborts the merge. This means exiting without writing the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1558 output file. If you didn't specify an output file, then there is no |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1559 real difference between aborting and finishing the merge. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1560 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1561 If the Emerge command was called from another Lisp program, then its |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1562 return value is @code{t} for successful completion, or @code{nil} if you |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1563 abort. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1564 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1565 @node Combining in Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1566 @section Combining the Two Versions |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1567 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1568 Sometimes you want to keep @emph{both} alternatives for a particular |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1569 difference. To do this, use @kbd{x c}, which edits the merge buffer |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1570 like this: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1571 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1572 @example |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1573 @group |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1574 #ifdef NEW |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1575 @var{version from A buffer} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1576 #else /* not NEW */ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1577 @var{version from B buffer} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1578 #endif /* not NEW */ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1579 @end group |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1580 @end example |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1581 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1582 @noindent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1583 @vindex emerge-combine-versions-template |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1584 While this example shows C preprocessor conditionals delimiting the two |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1585 alternative versions, you can specify the strings to use by setting |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1586 the variable @code{emerge-combine-versions-template} to a string of your |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1587 choice. In the string, @samp{%a} says where to put version A, and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1588 @samp{%b} says where to put version B. The default setting, which |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1589 produces the results shown above, looks like this: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1590 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1591 @example |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1592 @group |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1593 "#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n" |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1594 @end group |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1595 @end example |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1596 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1597 @node Fine Points of Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1598 @section Fine Points of Emerge |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1599 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1600 During the merge, you mustn't try to edit the A and B buffers yourself. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1601 Emerge modifies them temporarily, but ultimately puts them back the way |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1602 they were. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1603 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1604 You can have any number of merges going at once---just don't use any one |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1605 buffer as input to more than one merge at once, since the temporary |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1606 changes made in these buffers would get in each other's way. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1607 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1608 Starting Emerge can take a long time because it needs to compare the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1609 files fully. Emacs can't do anything else until @code{diff} finishes. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1610 Perhaps in the future someone will change Emerge to do the comparison in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1611 the background when the input files are large---then you could keep on |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1612 doing other things with Emacs until Emerge is ready to accept |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1613 commands. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1614 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1615 @vindex emerge-startup-hook |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1616 After setting up the merge, Emerge runs the hook |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1617 @code{emerge-startup-hook}. @xref{Hooks,,, emacs, the Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1618 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1619 @node Picture Mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1620 @chapter Editing Pictures |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1621 @cindex pictures |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1622 @cindex making pictures out of text characters |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1623 @findex edit-picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1624 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1625 To edit a picture made out of text characters (for example, a picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1626 of the division of a register into fields, as a comment in a program), |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1627 use the command @kbd{M-x edit-picture} to enter Picture mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1628 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1629 In Picture mode, editing is based on the @dfn{quarter-plane} model of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1630 text, according to which the text characters lie studded on an area that |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1631 stretches infinitely far to the right and downward. The concept of the end |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1632 of a line does not exist in this model; the most you can say is where the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1633 last nonblank character on the line is found. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1634 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1635 Of course, Emacs really always considers text as a sequence of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1636 characters, and lines really do have ends. But Picture mode replaces |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1637 the most frequently-used commands with variants that simulate the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1638 quarter-plane model of text. They do this by inserting spaces or by |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1639 converting tabs to spaces. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1640 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1641 Most of the basic editing commands of Emacs are redefined by Picture mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1642 to do essentially the same thing but in a quarter-plane way. In addition, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1643 Picture mode defines various keys starting with the @kbd{C-c} prefix to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1644 run special picture editing commands. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1645 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1646 One of these keys, @kbd{C-c C-c}, is particularly important. Often a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1647 picture is part of a larger file that is usually edited in some other |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1648 major mode. @kbd{M-x edit-picture} records the name of the previous |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1649 major mode so you can use the @kbd{C-c C-c} command |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1650 (@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1651 also deletes spaces from the ends of lines, unless given a numeric |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1652 argument. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1653 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1654 The special commands of Picture mode all work in other modes (provided |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1655 the @file{picture} library is loaded), but are not bound to keys except |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1656 in Picture mode. The descriptions below talk of moving ``one column'' |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1657 and so on, but all the picture mode commands handle numeric arguments as |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1658 their normal equivalents do. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1659 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1660 @vindex picture-mode-hook |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1661 Turning on Picture mode runs the hook @code{picture-mode-hook}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1662 Additional extensions to Picture mode can be found in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1663 @file{artist.el}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1664 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1665 @menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1666 * Basic Picture:: Basic concepts and simple commands of Picture Mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1667 * Insert in Picture:: Controlling direction of cursor motion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1668 after "self-inserting" characters. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1669 * Tabs in Picture:: Various features for tab stops and indentation. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1670 * Rectangles in Picture:: Clearing and superimposing rectangles. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1671 @end menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1672 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1673 @node Basic Picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1674 @section Basic Editing in Picture Mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1675 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1676 @findex picture-forward-column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1677 @findex picture-backward-column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1678 @findex picture-move-down |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1679 @findex picture-move-up |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1680 @cindex editing in Picture mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1681 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1682 Most keys do the same thing in Picture mode that they usually do, but |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1683 do it in a quarter-plane style. For example, @kbd{C-f} is rebound to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1684 run @code{picture-forward-column}, a command which moves point one |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1685 column to the right, inserting a space if necessary so that the actual |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1686 end of the line makes no difference. @kbd{C-b} is rebound to run |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1687 @code{picture-backward-column}, which always moves point left one |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1688 column, converting a tab to multiple spaces if necessary. @kbd{C-n} and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1689 @kbd{C-p} are rebound to run @code{picture-move-down} and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1690 @code{picture-move-up}, which can either insert spaces or convert tabs |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1691 as necessary to make sure that point stays in exactly the same column. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1692 @kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1693 nonblank character on the line. There is no need to change @kbd{C-a}, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1694 as the choice of screen model does not affect beginnings of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1695 lines. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1696 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1697 @findex picture-newline |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1698 Insertion of text is adapted to the quarter-plane screen model |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1699 through the use of Overwrite mode (@pxref{Minor Modes,,, emacs, the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1700 Emacs Manual}.) Self-inserting characters replace existing text, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1701 column by column, rather than pushing existing text to the right. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1702 @key{RET} runs @code{picture-newline}, which just moves to the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1703 beginning of the following line so that new text will replace that |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1704 line. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1705 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1706 @findex picture-backward-clear-column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1707 @findex picture-clear-column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1708 @findex picture-clear-line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1709 In Picture mode, the commands that normally delete or kill text, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1710 instead erase text (replacing it with spaces). @key{DEL} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1711 (@code{picture-backward-clear-column}) replaces the preceding |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1712 character with a space rather than removing it; this moves point |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1713 backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1714 character or characters with spaces, but does not move point. (If you |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1715 want to clear characters to spaces and move forward over them, use |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1716 @key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1717 contents of lines, but does not delete the newlines from the buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1718 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1719 @findex picture-open-line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1720 To do actual insertion, you must use special commands. @kbd{C-o} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1721 (@code{picture-open-line}) creates a blank line after the current |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1722 line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1723 sense in Picture mode, so it is not changed. @kbd{C-j} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1724 (@code{picture-duplicate-line}) inserts another line with the same |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1725 contents below the current line. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1726 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1727 @kindex C-c C-d @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1728 To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1729 (which is defined as @code{delete-char}, as @kbd{C-d} is in other |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1730 modes), or one of the picture rectangle commands (@pxref{Rectangles in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1731 Picture}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1732 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1733 @node Insert in Picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1734 @section Controlling Motion after Insert |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1735 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1736 @findex picture-movement-up |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1737 @findex picture-movement-down |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1738 @findex picture-movement-left |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1739 @findex picture-movement-right |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1740 @findex picture-movement-nw |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1741 @findex picture-movement-ne |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1742 @findex picture-movement-sw |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1743 @findex picture-movement-se |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1744 @kindex C-c < @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1745 @kindex C-c > @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1746 @kindex C-c ^ @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1747 @kindex C-c . @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1748 @kindex C-c ` @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1749 @kindex C-c ' @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1750 @kindex C-c / @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1751 @kindex C-c \ @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1752 Since ``self-inserting'' characters in Picture mode overwrite and move |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1753 point, there is no essential restriction on how point should be moved. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1754 Normally point moves right, but you can specify any of the eight |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1755 orthogonal or diagonal directions for motion after a ``self-inserting'' |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1756 character. This is useful for drawing lines in the buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1757 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1758 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1759 @item C-c < |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1760 @itemx C-c @key{LEFT} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1761 Move left after insertion (@code{picture-movement-left}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1762 @item C-c > |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1763 @itemx C-c @key{RIGHT} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1764 Move right after insertion (@code{picture-movement-right}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1765 @item C-c ^ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1766 @itemx C-c @key{UP} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1767 Move up after insertion (@code{picture-movement-up}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1768 @item C-c . |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1769 @itemx C-c @key{DOWN} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1770 Move down after insertion (@code{picture-movement-down}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1771 @item C-c ` |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1772 @itemx C-c @key{HOME} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1773 Move up and left (``northwest'') after insertion (@code{picture-movement-nw}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1774 @item C-c ' |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1775 @itemx C-c @key{PAGEUP} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1776 Move up and right (``northeast'') after insertion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1777 (@code{picture-movement-ne}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1778 @item C-c / |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1779 @itemx C-c @key{END} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1780 Move down and left (``southwest'') after insertion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1781 @*(@code{picture-movement-sw}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1782 @item C-c \ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1783 @itemx C-c @key{PAGEDOWN} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1784 Move down and right (``southeast'') after insertion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1785 @*(@code{picture-movement-se}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1786 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1787 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1788 @kindex C-c C-f @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1789 @kindex C-c C-b @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1790 @findex picture-motion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1791 @findex picture-motion-reverse |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1792 Two motion commands move based on the current Picture insertion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1793 direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1794 same direction as motion after ``insertion'' currently does, while @kbd{C-c |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1795 C-b} (@code{picture-motion-reverse}) moves in the opposite direction. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1796 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1797 @node Tabs in Picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1798 @section Picture Mode Tabs |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1799 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1800 @kindex M-TAB @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1801 @findex picture-tab-search |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1802 @vindex picture-tab-chars |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1803 Two kinds of tab-like action are provided in Picture mode. Use |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1804 @kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1805 With no argument, it moves to a point underneath the next |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1806 ``interesting'' character that follows whitespace in the previous |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1807 nonblank line. ``Next'' here means ``appearing at a horizontal position |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1808 greater than the one point starts out at.'' With an argument, as in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1809 @kbd{C-u M-@key{TAB}}, this command moves to the next such interesting |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1810 character in the current line. @kbd{M-@key{TAB}} does not change the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1811 text; it only moves point. ``Interesting'' characters are defined by |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1812 the variable @code{picture-tab-chars}, which should define a set of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1813 characters. The syntax for this variable is like the syntax used inside |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1814 of @samp{[@dots{}]} in a regular expression---but without the @samp{[} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1815 and the @samp{]}. Its default value is @code{"!-~"}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1816 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1817 @findex picture-tab |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1818 @key{TAB} itself runs @code{picture-tab}, which operates based on the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1819 current tab stop settings; it is the Picture mode equivalent of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1820 @code{tab-to-tab-stop}. Normally it just moves point, but with a numeric |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1821 argument it clears the text that it moves over. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1822 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1823 @kindex C-c TAB @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1824 @findex picture-set-tab-stops |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1825 The context-based and tab-stop-based forms of tabbing are brought |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1826 together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1827 This command sets the tab stops to the positions which @kbd{M-@key{TAB}} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1828 would consider significant in the current line. The use of this command, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1829 together with @key{TAB}, can get the effect of context-based tabbing. But |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1830 @kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1831 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1832 It may be convenient to prevent use of actual tab characters in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1833 pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1834 up the picture. You can do this by setting the variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1835 @code{indent-tabs-mode} to @code{nil}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1836 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1837 @node Rectangles in Picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1838 @section Picture Mode Rectangle Commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1839 @cindex rectangles and Picture mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1840 @cindex Picture mode and rectangles |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1841 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1842 Picture mode defines commands for working on rectangular pieces of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1843 the text in ways that fit with the quarter-plane model. The standard |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1844 rectangle commands may also be useful. @xref{Rectangles,,, emacs, the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1845 Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1846 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1847 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1848 @item C-c C-k |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1849 Clear out the region-rectangle with spaces |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1850 (@code{picture-clear-rectangle}). With argument, delete the text. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1851 @item C-c C-w @var{r} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1852 Similar, but save rectangle contents in register @var{r} first |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1853 (@code{picture-clear-rectangle-to-register}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1854 @item C-c C-y |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1855 Copy last killed rectangle into the buffer by overwriting, with upper |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1856 left corner at point (@code{picture-yank-rectangle}). With argument, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1857 insert instead. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1858 @item C-c C-x @var{r} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1859 Similar, but use the rectangle in register @var{r} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1860 (@code{picture-yank-rectangle-from-register}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1861 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1862 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1863 @kindex C-c C-k @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1864 @kindex C-c C-w @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1865 @findex picture-clear-rectangle |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1866 @findex picture-clear-rectangle-to-register |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1867 The picture rectangle commands @kbd{C-c C-k} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1868 (@code{picture-clear-rectangle}) and @kbd{C-c C-w} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1869 (@code{picture-clear-rectangle-to-register}) differ from the standard |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1870 rectangle commands in that they normally clear the rectangle instead of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1871 deleting it; this is analogous with the way @kbd{C-d} is changed in Picture |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1872 mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1873 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1874 However, deletion of rectangles can be useful in Picture mode, so |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1875 these commands delete the rectangle if given a numeric argument. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1876 @kbd{C-c C-k} either with or without a numeric argument saves the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1877 rectangle for @kbd{C-c C-y}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1878 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1879 @kindex C-c C-y @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1880 @kindex C-c C-x @r{(Picture mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1881 @findex picture-yank-rectangle |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1882 @findex picture-yank-rectangle-from-register |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1883 The Picture mode commands for yanking rectangles differ from the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1884 standard ones in that they overwrite instead of inserting. This is |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1885 the same way that Picture mode insertion of other text differs from |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1886 other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1887 (by overwriting) the rectangle that was most recently killed, while |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1888 @kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1889 likewise for the rectangle found in a specified register. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1890 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1891 @node Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1892 @chapter Fortran Mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1893 @cindex Fortran mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1894 @cindex mode, Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1895 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1896 Fortran mode provides special motion commands for Fortran statements |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1897 and subprograms, and indentation commands that understand Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1898 conventions of nesting, line numbers and continuation statements. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1899 Fortran mode has support for Auto Fill mode that breaks long lines into |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1900 proper Fortran continuation lines. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1901 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1902 Special commands for comments are provided because Fortran comments |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1903 are unlike those of other languages. Built-in abbrevs optionally save |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1904 typing when you insert Fortran keywords. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1905 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1906 Use @kbd{M-x fortran-mode} to switch to this major mode. This |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1907 command runs the hook @code{fortran-mode-hook}. @xref{Hooks,,, emacs, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1908 the Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1909 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1910 @cindex Fortran77 and Fortran90 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1911 @findex f90-mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1912 @findex fortran-mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1913 Fortran mode is meant for editing Fortran77 ``fixed format'' (and also |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1914 ``tab format'') source code. For editing the modern Fortran90 or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1915 Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1916 Emacs normally uses Fortran mode for files with extension @samp{.f}, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1917 @samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1918 @samp{.f95}. GNU Fortran supports both kinds of format. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1919 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1920 @menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1921 * Motion: Fortran Motion. Moving point by statements or subprograms. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1922 * Indent: Fortran Indent. Indentation commands for Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1923 * Comments: Fortran Comments. Inserting and aligning comments. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1924 * Autofill: Fortran Autofill. Auto fill support for Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1925 * Columns: Fortran Columns. Measuring columns for valid Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1926 * Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1927 @end menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1928 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1929 @node Fortran Motion |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1930 @section Motion Commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1931 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1932 In addition to the normal commands for moving by and operating on |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1933 ``defuns'' (Fortran subprograms---functions and subroutines, as well as |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1934 modules for F90 mode), Fortran mode provides special commands to move by |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1935 statements and other program units. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1936 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1937 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1938 @kindex C-c C-n @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1939 @findex fortran-next-statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1940 @findex f90-next-statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1941 @item C-c C-n |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1942 Move to the beginning of the next statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1943 (@code{fortran-next-statement}/@code{f90-next-statement}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1944 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1945 @kindex C-c C-p @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1946 @findex fortran-previous-statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1947 @findex f90-previous-statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1948 @item C-c C-p |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1949 Move to the beginning of the previous statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1950 (@code{fortran-previous-statement}/@code{f90-previous-statement}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1951 If there is no previous statement (i.e. if called from the first |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1952 statement in the buffer), move to the start of the buffer. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1953 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1954 @kindex C-c C-e @r{(F90 mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1955 @findex f90-next-block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1956 @item C-c C-e |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1957 Move point forward to the start of the next code block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1958 (@code{f90-next-block}). A code block is a subroutine, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1959 @code{if}--@code{endif} statement, and so forth. This command exists |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1960 for F90 mode only, not Fortran mode. With a numeric argument, this |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1961 moves forward that many blocks. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1962 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1963 @kindex C-c C-a @r{(F90 mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1964 @findex f90-previous-block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1965 @item C-c C-a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1966 Move point backward to the previous code block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1967 (@code{f90-previous-block}). This is like @code{f90-next-block}, but |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1968 moves backwards. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1969 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1970 @kindex C-M-n @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1971 @findex fortran-end-of-block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1972 @findex f90-end-of-block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1973 @item C-M-n |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1974 Move to the end of the current code block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1975 (@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1976 agument, move forward that number of blocks. The mark is set before |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1977 moving point. The F90 mode version of this command checks for |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1978 consistency of block types and labels (if present), but it does not |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1979 check the outermost block since that may be incomplete. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1980 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1981 @kindex C-M-p @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1982 @findex fortran-beginning-of-block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1983 @findex f90-beginning-of-block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1984 @item C-M-p |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1985 Move to the start of the current code block |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1986 (@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1987 is like @code{fortran-end-of-block}, but moves backwards. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1988 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1989 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1990 @node Fortran Indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1991 @section Fortran Indentation |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1992 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1993 Special commands and features are needed for indenting Fortran code in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1994 order to make sure various syntactic entities (line numbers, comment line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1995 indicators and continuation line flags) appear in the columns that are |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1996 required for standard, fixed (or tab) format Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1997 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1998 @menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
1999 * Commands: ForIndent Commands. Commands for indenting and filling Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2000 * Contline: ForIndent Cont. How continuation lines indent. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2001 * Numbers: ForIndent Num. How line numbers auto-indent. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2002 * Conv: ForIndent Conv. Conventions you must obey to avoid trouble. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2003 * Vars: ForIndent Vars. Variables controlling Fortran indent style. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2004 @end menu |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2005 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2006 @node ForIndent Commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2007 @subsection Fortran Indentation and Filling Commands |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2008 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2009 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2010 @item C-M-j |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2011 Break the current line at point and set up a continuation line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2012 (@code{fortran-split-line}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2013 @item M-^ |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2014 Join this line to the previous line (@code{fortran-join-line}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2015 @item C-M-q |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2016 Indent all the lines of the subprogram point is in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2017 (@code{fortran-indent-subprogram}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2018 @item M-q |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2019 Fill a comment block or statement. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2020 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2021 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2022 @kindex C-M-q @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2023 @findex fortran-indent-subprogram |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2024 The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2025 to reindent all the lines of the Fortran subprogram (function or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2026 subroutine) containing point. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2027 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2028 @kindex C-M-j @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2029 @findex fortran-split-line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2030 The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2031 a line in the appropriate fashion for Fortran. In a non-comment line, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2032 the second half becomes a continuation line and is indented |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2033 accordingly. In a comment line, both halves become separate comment |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2034 lines. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2035 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2036 @kindex M-^ @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2037 @kindex C-c C-d @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2038 @findex fortran-join-line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2039 @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line}, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2040 which joins a continuation line back to the previous line, roughly as |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2041 the inverse of @code{fortran-split-line}. The point must be on a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2042 continuation line when this command is invoked. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2043 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2044 @kindex M-q @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2045 @kbd{M-q} in Fortran mode fills the comment block or statement that |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2046 point is in. This removes any excess statement continuations. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2047 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2048 @node ForIndent Cont |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2049 @subsection Continuation Lines |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2050 @cindex Fortran continuation lines |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2051 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2052 @vindex fortran-continuation-string |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2053 Most Fortran77 compilers allow two ways of writing continuation lines. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2054 If the first non-space character on a line is in column 5, then that |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2055 line is a continuation of the previous line. We call this @dfn{fixed |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2056 format}. (In GNU Emacs we always count columns from 0; but note that |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2057 the Fortran standard counts from 1.) The variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2058 @code{fortran-continuation-string} specifies what character to put in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2059 column 5. A line that starts with a tab character followed by any digit |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2060 except @samp{0} is also a continuation line. We call this style of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2061 continuation @dfn{tab format}. (Fortran90 introduced ``free format'', |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2062 with another style of continuation lines). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2063 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2064 @vindex indent-tabs-mode @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2065 @vindex fortran-analyze-depth |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2066 @vindex fortran-tab-mode-default |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2067 Fortran mode can use either style of continuation line. When you |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2068 enter Fortran mode, it tries to deduce the proper continuation style |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2069 automatically from the buffer contents. It does this by scanning up to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2070 @code{fortran-analyze-depth} (default 100) lines from the start of the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2071 buffer. The first line that begins with either a tab character or six |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2072 spaces determines the choice. If the scan fails (for example, if the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2073 buffer is new and therefore empty), the value of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2074 @code{fortran-tab-mode-default} (@code{nil} for fixed format, and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2075 non-@code{nil} for tab format) is used. @samp{/t} in the mode line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2076 indicates tab format is selected. Fortran mode sets the value of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2077 @code{indent-tabs-mode} accordingly. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2078 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2079 If the text on a line starts with the Fortran continuation marker |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2080 @samp{$}, or if it begins with any non-whitespace character in column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2081 5, Fortran mode treats it as a continuation line. When you indent a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2082 continuation line with @key{TAB}, it converts the line to the current |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2083 continuation style. When you split a Fortran statement with |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2084 @kbd{C-M-j}, the continuation marker on the newline is created according |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2085 to the continuation style. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2086 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2087 The setting of continuation style affects several other aspects of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2088 editing in Fortran mode. In fixed format mode, the minimum column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2089 number for the body of a statement is 6. Lines inside of Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2090 blocks that are indented to larger column numbers always use only the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2091 space character for whitespace. In tab format mode, the minimum |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2092 column number for the statement body is 8, and the whitespace before |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2093 column 8 must always consist of one tab character. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2094 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2095 @node ForIndent Num |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2096 @subsection Line Numbers |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2097 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2098 If a number is the first non-whitespace in the line, Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2099 indentation assumes it is a line number and moves it to columns 0 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2100 through 4. (Columns always count from 0 in GNU Emacs.) |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2101 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2102 @vindex fortran-line-number-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2103 Line numbers of four digits or less are normally indented one space. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2104 The variable @code{fortran-line-number-indent} controls this; it |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2105 specifies the maximum indentation a line number can have. The default |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2106 value of the variable is 1. Fortran mode tries to prevent line number |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2107 digits passing column 4, reducing the indentation below the specified |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2108 maximum if necessary. If @code{fortran-line-number-indent} has the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2109 value 5, line numbers are right-justified to end in column 4. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2110 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2111 @vindex fortran-electric-line-number |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2112 Simply inserting a line number is enough to indent it according to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2113 these rules. As each digit is inserted, the indentation is recomputed. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2114 To turn off this feature, set the variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2115 @code{fortran-electric-line-number} to @code{nil}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2116 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2117 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2118 @node ForIndent Conv |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2119 @subsection Syntactic Conventions |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2120 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2121 Fortran mode assumes that you follow certain conventions that simplify |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2122 the task of understanding a Fortran program well enough to indent it |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2123 properly: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2124 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2125 @itemize @bullet |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2126 @item |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2127 Two nested @samp{do} loops never share a @samp{continue} statement. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2128 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2129 @item |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2130 Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2131 and others are written without embedded whitespace or line breaks. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2132 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2133 Fortran compilers generally ignore whitespace outside of string |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2134 constants, but Fortran mode does not recognize these keywords if they |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2135 are not contiguous. Constructs such as @samp{else if} or @samp{end do} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2136 are acceptable, but the second word should be on the same line as the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2137 first and not on a continuation line. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2138 @end itemize |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2139 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2140 @noindent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2141 If you fail to follow these conventions, the indentation commands may |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2142 indent some lines unaesthetically. However, a correct Fortran program |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2143 retains its meaning when reindented even if the conventions are not |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2144 followed. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2145 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2146 @node ForIndent Vars |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2147 @subsection Variables for Fortran Indentation |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2148 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2149 @vindex fortran-do-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2150 @vindex fortran-if-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2151 @vindex fortran-structure-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2152 @vindex fortran-continuation-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2153 @vindex fortran-check-all-num@dots{} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2154 @vindex fortran-minimum-statement-indent@dots{} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2155 Several additional variables control how Fortran indentation works: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2156 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2157 @table @code |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2158 @item fortran-do-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2159 Extra indentation within each level of @samp{do} statement (default 3). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2160 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2161 @item fortran-if-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2162 Extra indentation within each level of @samp{if}, @samp{select case}, or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2163 @samp{where} statements (default 3). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2164 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2165 @item fortran-structure-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2166 Extra indentation within each level of @samp{structure}, @samp{union}, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2167 @samp{map}, or @samp{interface} statements (default 3). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2168 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2169 @item fortran-continuation-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2170 Extra indentation for bodies of continuation lines (default 5). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2171 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2172 @item fortran-check-all-num-for-matching-do |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2173 In Fortran77, a numbered @samp{do} statement is ended by any statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2174 with a matching line number. It is common (but not compulsory) to use a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2175 @samp{continue} statement for this purpose. If this variable has a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2176 non-@code{nil} value, indenting any numbered statement must check for a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2177 @samp{do} that ends there. If you always end @samp{do} statements with |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2178 a @samp{continue} line (or if you use the more modern @samp{enddo}), |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2179 then you can speed up indentation by setting this variable to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2180 @code{nil}. The default is @code{nil}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2181 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2182 @item fortran-blink-matching-if |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2183 If this is @code{t}, indenting an @samp{endif} (or @samp{enddo} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2184 statement moves the cursor momentarily to the matching @samp{if} (or |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2185 @samp{do}) statement to show where it is. The default is @code{nil}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2186 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2187 @item fortran-minimum-statement-indent-fixed |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2188 Minimum indentation for Fortran statements when using fixed format |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2189 continuation line style. Statement bodies are never indented less than |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2190 this much. The default is 6. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2191 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2192 @item fortran-minimum-statement-indent-tab |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2193 Minimum indentation for Fortran statements for tab format continuation line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2194 style. Statement bodies are never indented less than this much. The |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2195 default is 8. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2196 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2197 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2198 The variables controlling the indentation of comments are described in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2199 the following section. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2200 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2201 @node Fortran Comments |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2202 @section Fortran Comments |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2203 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2204 The usual Emacs comment commands assume that a comment can follow a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2205 line of code. In Fortran77, the standard comment syntax requires an |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2206 entire line to be just a comment. Therefore, Fortran mode replaces the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2207 standard Emacs comment commands and defines some new variables. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2208 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2209 @vindex fortran-comment-line-start |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2210 Fortran mode can also handle the Fortran90 comment syntax where comments |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2211 start with @samp{!} and can follow other text. Because only some Fortran77 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2212 compilers accept this syntax, Fortran mode will not insert such comments |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2213 unless you have said in advance to do so. To do this, set the variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2214 @code{fortran-comment-line-start} to @samp{"!"}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2215 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2216 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2217 @item M-; |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2218 Align comment or insert new comment (@code{fortran-indent-comment}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2219 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2220 @item C-x ; |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2221 Applies to nonstandard @samp{!} comments only. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2222 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2223 @item C-c ; |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2224 Turn all lines of the region into comments, or (with argument) turn them back |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2225 into real code (@code{fortran-comment-region}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2226 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2227 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2228 @findex fortran-indent-comment |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2229 @kbd{M-;} in Fortran mode is redefined as the command |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2230 @code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2231 recognizes any kind of existing comment and aligns its text appropriately; |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2232 if there is no existing comment, a comment is inserted and aligned. But |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2233 inserting and aligning comments are not the same in Fortran mode as in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2234 other modes. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2235 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2236 When a new comment must be inserted, if the current line is blank, a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2237 full-line comment is inserted. On a non-blank line, a nonstandard @samp{!} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2238 comment is inserted if you have said you want to use them. Otherwise a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2239 full-line comment is inserted on a new line before the current line. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2240 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2241 Nonstandard @samp{!} comments are aligned like comments in other |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2242 languages, but full-line comments are different. In a standard full-line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2243 comment, the comment delimiter itself must always appear in column zero. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2244 What can be aligned is the text within the comment. You can choose from |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2245 three styles of alignment by setting the variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2246 @code{fortran-comment-indent-style} to one of these values: |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2247 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2248 @vindex fortran-comment-indent-style |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2249 @vindex fortran-comment-line-extra-indent |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2250 @table @code |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2251 @item fixed |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2252 Align the text at a fixed column, which is the sum of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2253 @code{fortran-comment-line-extra-indent} and the minimum statement |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2254 indentation. This is the default. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2255 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2256 The minimum statement indentation is |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2257 @code{fortran-minimum-statement-indent-fixed} for fixed format |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2258 continuation line style and @code{fortran-minimum-statement-indent-tab} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2259 for tab format style. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2260 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2261 @item relative |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2262 Align the text as if it were a line of code, but with an additional |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2263 @code{fortran-comment-line-extra-indent} columns of indentation. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2264 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2265 @item nil |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2266 Don't move text in full-line comments automatically. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2267 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2268 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2269 @vindex fortran-comment-indent-char |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2270 In addition, you can specify the character to be used to indent within |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2271 full-line comments by setting the variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2272 @code{fortran-comment-indent-char} to the single-character string you want |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2273 to use. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2274 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2275 @vindex fortran-directive-re |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2276 Compiler directive lines, or preprocessor lines, have much the same |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2277 appearance as comment lines. It is important, though, that such lines |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2278 never be indented at all, no matter what the value of |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2279 @code{fortran-comment-indent-style}. The variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2280 @code{fortran-directive-re} is a regular expression that specifies which |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2281 lines are directives. Matching lines are never indented, and receive |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2282 distinctive font-locking. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2283 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2284 The normal Emacs comment command @kbd{C-x ;} has not been redefined. If |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2285 you use @samp{!} comments, this command can be used with them. Otherwise |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2286 it is useless in Fortran mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2287 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2288 @kindex C-c ; @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2289 @findex fortran-comment-region |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2290 @vindex fortran-comment-region |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2291 The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2292 lines of the region into comments by inserting the string @samp{C$$$} at |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2293 the front of each one. With a numeric argument, it turns the region |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2294 back into live code by deleting @samp{C$$$} from the front of each line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2295 in it. The string used for these comments can be controlled by setting |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2296 the variable @code{fortran-comment-region}. Note that here we have an |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2297 example of a command and a variable with the same name; these two uses |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2298 of the name never conflict because in Lisp and in Emacs it is always |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2299 clear from the context which one is meant. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2300 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2301 @node Fortran Autofill |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2302 @section Auto Fill in Fortran Mode |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2303 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2304 Fortran mode has specialized support for Auto Fill mode, which is a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2305 minor mode that automatically splits statements as you insert them |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2306 when they become too wide. Splitting a statement involves making |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2307 continuation lines using @code{fortran-continuation-string} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2308 (@pxref{ForIndent Cont}). This splitting happens when you type |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2309 @key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2310 indentation commands. You activate Auto Fill in Fortran mode in the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2311 normal way. @xref{Auto Fill,,, emacs, the Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2312 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2313 @vindex fortran-break-before-delimiters |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2314 Auto Fill breaks lines at spaces or delimiters when the lines get |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2315 longer than the desired width (the value of @code{fill-column}). The |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2316 delimiters (besides whitespace) that Auto Fill can break at are |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2317 @samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>}, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2318 and @samp{,}. The line break comes after the delimiter if the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2319 variable @code{fortran-break-before-delimiters} is @code{nil}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2320 Otherwise (and by default), the break comes before the delimiter. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2321 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2322 To enable Auto Fill in all Fortran buffers, add |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2323 @code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks,,, |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2324 emacs, the Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2325 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2326 @node Fortran Columns |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2327 @section Checking Columns in Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2328 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2329 @table @kbd |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2330 @item C-c C-r |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2331 Display a ``column ruler'' momentarily above the current line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2332 (@code{fortran-column-ruler}). |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2333 @item C-c C-w |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2334 Split the current window horizontally temporarily so that it is 72 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2335 columns wide (@code{fortran-window-create-momentarily}). This may |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2336 help you avoid making lines longer than the 72-character limit that |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2337 some Fortran compilers impose. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2338 @item C-u C-c C-w |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2339 Split the current window horizontally so that it is 72 columns wide |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2340 (@code{fortran-window-create}). You can then continue editing. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2341 @item M-x fortran-strip-sequence-nos |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2342 Delete all text in column 72 and beyond. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2343 @end table |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2344 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2345 @kindex C-c C-r @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2346 @findex fortran-column-ruler |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2347 The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2348 ruler momentarily above the current line. The comment ruler is two lines |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2349 of text that show you the locations of columns with special significance in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2350 Fortran programs. Square brackets show the limits of the columns for line |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2351 numbers, and curly brackets show the limits of the columns for the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2352 statement body. Column numbers appear above them. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2353 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2354 Note that the column numbers count from zero, as always in GNU Emacs. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2355 As a result, the numbers may be one less than those you are familiar |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2356 with; but the positions they indicate in the line are standard for |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2357 Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2358 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2359 @vindex fortran-column-ruler-fixed |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2360 @vindex fortran-column-ruler-tabs |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2361 The text used to display the column ruler depends on the value of the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2362 variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2363 @code{nil}, then the value of the variable |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2364 @code{fortran-column-ruler-fixed} is used as the column ruler. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2365 Otherwise, the value of the variable @code{fortran-column-ruler-tab} is |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2366 displayed. By changing these variables, you can change the column ruler |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2367 display. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2368 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2369 @kindex C-c C-w @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2370 @findex fortran-window-create-momentarily |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2371 @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2372 splits the current window horizontally, making a window 72 columns |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2373 wide, so you can see any lines that are too long. Type a space to |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2374 restore the normal width. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2375 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2376 @kindex C-u C-c C-w @r{(Fortran mode)} |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2377 @findex fortran-window-create |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2378 You can also split the window horizontally and continue editing with |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2379 the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2380 fortran-window-create}). By editing in this window you can |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2381 immediately see when you make a line too wide to be correct Fortran. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2382 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2383 @findex fortran-strip-sequence-nos |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2384 The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2385 column 72 and beyond, on all lines in the current buffer. This is the |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2386 easiest way to get rid of old sequence numbers. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2387 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2388 @node Fortran Abbrev |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2389 @section Fortran Keyword Abbrevs |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2390 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2391 Fortran mode provides many built-in abbrevs for common keywords and |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2392 declarations. These are the same sort of abbrev that you can define |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2393 yourself. To use them, you must turn on Abbrev mode. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2394 @xref{Abbrevs,,, emacs, the Emacs Manual}. |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2395 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2396 The built-in abbrevs are unusual in one way: they all start with a |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2397 semicolon. You cannot normally use semicolon in an abbrev, but Fortran |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2398 mode makes this possible by changing the syntax of semicolon to ``word |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2399 constituent.'' |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2400 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2401 For example, one built-in Fortran abbrev is @samp{;c} for |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2402 @samp{continue}. If you insert @samp{;c} and then insert a punctuation |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2403 character such as a space or a newline, the @samp{;c} expands automatically |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2404 to @samp{continue}, provided Abbrev mode is enabled.@refill |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2405 |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2406 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in |
91970b147f39
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
Chong Yidong <cyd@stupidchicken.com>
parents:
68639
diff
changeset
|
2407 Fortran abbrevs and what they stand for. |
61000
7493ddb113fc
(Advanced Calendar/Diary Usage): New section; move here from Emacs
Glenn Morris <rgm@gnu.org>
parents:
59996
diff
changeset
|
2408 |
56119 | 2409 @node Index |
2410 @unnumbered Index | |
2411 | |
2412 @printindex cp | |
2413 | |
2414 @bye | |
56131
0806d31e3c9c
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
56128
diff
changeset
|
2415 |
0806d31e3c9c
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
56128
diff
changeset
|
2416 @ignore |
0806d31e3c9c
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
56128
diff
changeset
|
2417 arch-tag: 75c33f13-32c6-41b6-9537-847a312e2e49 |
0806d31e3c9c
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
56128
diff
changeset
|
2418 @end ignore |