Sync up with r21-4-14-chise-0_21-22.
[chise/xemacs-chise.git-] / info / xemacs.info-16
1 This is ../info/xemacs.info, produced by makeinfo version 4.0b from
2 xemacs/xemacs.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * XEmacs: (xemacs).             XEmacs Editor.
7 END-INFO-DIR-ENTRY
8
9    This file documents the XEmacs editor.
10
11    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
12 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
13 Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
14
15    Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
18
19    Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
22 General Public License" are included exactly as in the original, and
23 provided that the entire resulting derived work is distributed under the
24 terms of a permission notice identical to this one.
25
26    Permission is granted to copy and distribute translations of this
27 manual into another language, under the above conditions for modified
28 versions, except that the sections entitled "The GNU Manifesto",
29 "Distribution" and "GNU General Public License" may be included in a
30 translation approved by the author instead of in the original English.
31
32 \1f
33 File: xemacs.info,  Node: Holiday Customizing,  Next: Date Display Format,  Prev: Calendar Customizing,  Up: Calendar Customization
34
35 Customizing the Holidays
36 ........................
37
38    Emacs knows about holidays defined by entries on one of several
39 lists.  You can customize these lists of holidays to your own needs,
40 adding or deleting holidays.  The lists of holidays that Emacs uses are
41 for general holidays (`general-holidays'), local holidays
42 (`local-holidays'), Christian holidays (`christian-holidays'), Hebrew
43 (Jewish) holidays (`hebrew-holidays'), Islamic (Moslem) holidays
44 (`islamic-holidays'), and other holidays (`other-holidays').
45
46    The general holidays are, by default, holidays common throughout the
47 United States.  To eliminate these holidays, set `general-holidays' to
48 `nil'.
49
50    There are no default local holidays (but sites may supply some).  You
51 can set the variable `local-holidays' to any list of holidays, as
52 described below.
53
54    By default, Emacs does not include all the holidays of the religions
55 that it knows, only those commonly found in secular calendars.  For a
56 more extensive collection of religious holidays, you can set any (or
57 all) of the variables `all-christian-calendar-holidays',
58 `all-hebrew-calendar-holidays', or `all-islamic-calendar-holidays' to
59 `t'.  If you want to eliminate the religious holidays, set any or all
60 of the corresponding variables `christian-holidays', `hebrew-holidays',
61 and `islamic-holidays' to `nil'.
62
63    You can set the variable `other-holidays' to any list of holidays.
64 This list, normally empty, is intended for individual use.
65
66    Each of the lists (`general-holidays', `local-holidays',
67 `christian-holidays', `hebrew-holidays', `islamic-holidays', and
68 `other-holidays') is a list of "holiday forms", each holiday form
69 describing a holiday (or sometimes a list of holidays).
70
71    Here is a table of the possible kinds of holiday form.  Day numbers
72 and month numbers count starting from 1, but "dayname" numbers count
73 Sunday as 0.  The element STRING is always the name of the holiday, as
74 a string.
75
76 `(holiday-fixed MONTH DAY STRING)'
77      A fixed date on the Gregorian calendar.  MONTH and DAY are
78      numbers, STRING is the name of the holiday.
79
80 `(holiday-float MONTH DAYNAME K STRING)'
81      The Kth DAYNAME in MONTH on the Gregorian calendar (DAYNAME=0 for
82      Sunday, and so on); negative K means count back from the end of
83      the month.  STRING is the name of the holiday.
84
85 `(holiday-hebrew MONTH DAY STRING)'
86      A fixed date on the Hebrew calendar.  MONTH and DAY are numbers,
87      STRING is the name of the holiday.
88
89 `(holiday-islamic MONTH DAY STRING)'
90      A fixed date on the Islamic calendar.  MONTH and DAY are numbers,
91      STRING is the name of the holiday.
92
93 `(holiday-julian MONTH DAY STRING)'
94      A fixed date on the Julian calendar.  MONTH and DAY are numbers,
95      STRING is the name of the holiday.
96
97 `(holiday-sexp SEXP STRING)'
98      A date calculated by the Lisp expression SEXP.  The expression
99      should use the variable `year' to compute and return the date of a
100      holiday, or `nil' if the holiday doesn't happen this year.  The
101      value of SEXP must represent the date as a list of the form
102      `(MONTH DAY YEAR)'.  STRING is the name of the holiday.
103
104 `(if CONDITION HOLIDAY-FORM &optional HOLIDAY-FORM)'
105      A holiday that happens only if CONDITION is true.
106
107 `(FUNCTION [ARGS])'
108      A list of dates calculated by the function FUNCTION, called with
109      arguments ARGS.
110
111    For example, suppose you want to add Bastille Day, celebrated in
112 France on July 14.  You can do this by adding the following line to
113 your init file:
114
115      (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
116
117    *Note Init File::.
118
119 The holiday form `(holiday-fixed 7 14 "Bastille Day")' specifies the
120 fourteenth day of the seventh month (July).
121
122    Many holidays occur on a specific day of the week, at a specific time
123 of month.  Here is a holiday form describing Hurricane Supplication Day,
124 celebrated in the Virgin Islands on the fourth Monday in August:
125
126      (holiday-float 8 1 4 "Hurricane Supplication Day")
127
128 Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
129 Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
130 the month (1 specifies the first occurrence, 2 the second occurrence,
131 -1 the last occurrence, -2 the second-to-last occurrence, and so on).
132
133    You can specify holidays that occur on fixed days of the Hebrew,
134 Islamic, and Julian calendars too.  For example,
135
136      (setq other-holidays
137            '((holiday-hebrew 10 2 "Last day of Hanukkah")
138              (holiday-islamic 3 12 "Mohammed's Birthday")
139              (holiday-julian 4 2 "Jefferson's Birthday")))
140
141 adds the last day of Hanukkah (since the Hebrew months are numbered with
142 1 starting from Nisan), the Islamic feast celebrating Mohammed's
143 birthday (since the Islamic months are numbered from 1 starting with
144 Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
145 Julian calendar.
146
147    To include a holiday conditionally, use either Emacs Lisp's `if' or
148 the `holiday-sexp' form.  For example, American presidential elections
149 occur on the first Tuesday after the first Monday in November of years
150 divisible by 4:
151
152      (holiday-sexp (if (= 0 (% year 4))
153                         (calendar-gregorian-from-absolute
154                       (1+ (calendar-dayname-on-or-before
155                             1 (+ 6 (calendar-absolute-from-gregorian
156                                      (list 11 1 year))))))
157                    "US Presidential Election"))
158
159 or
160
161      (if (= 0 (% displayed-year 4))
162          (fixed 11
163                 (extract-calendar-day
164                   (calendar-gregorian-from-absolute
165                     (1+ (calendar-dayname-on-or-before
166                           1 (+ 6 (calendar-absolute-from-gregorian
167                                    (list 11 1 displayed-year)))))))
168                 "US Presidential Election"))
169
170    Some holidays just don't fit into any of these forms because special
171 calculations are involved in their determination.  In such cases you
172 must write a Lisp function to do the calculation.  To include eclipses,
173 for example, add `(eclipses)' to `other-holidays' and write an Emacs
174 Lisp function `eclipses' that returns a (possibly empty) list of the
175 relevant Gregorian dates among the range visible in the calendar
176 window, with descriptive strings, like this:
177
178      (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
179
180 \1f
181 File: xemacs.info,  Node: Date Display Format,  Next: Time Display Format,  Prev: Holiday Customizing,  Up: Calendar Customization
182
183 Date Display Format
184 ...................
185
186    You can customize the manner of displaying dates in the diary, in
187 mode lines, and in messages by setting `calendar-date-display-form'.
188 This variable holds a list of expressions that can involve the variables
189 `month', `day', and `year', which are all numbers in string form, and
190 `monthname' and `dayname', which are both alphabetic strings.  In the
191 American style, the default value of this list is as follows:
192
193      ((if dayname (concat dayname ", ")) monthname " " day ", " year)
194
195 while in the European style this value is the default:
196
197      ((if dayname (concat dayname ", ")) day " " monthname " " year)
198
199    + The ISO standard date representation is this:
200
201      (year "-" month "-" day)
202
203 This specifies a typical American format:
204
205      (month "/" day "/" (substring year -2))
206
207 \1f
208 File: xemacs.info,  Node: Time Display Format,  Next: Daylight Savings,  Prev: Date Display Format,  Up: Calendar Customization
209
210 Time Display Format
211 ...................
212
213    The calendar and diary by default display times of day in the
214 conventional American style with the hours from 1 through 12, minutes,
215 and either `am' or `pm'.  If you prefer the European style, also known
216 in the US as military, in which the hours go from 00 to 23, you can
217 alter the variable `calendar-time-display-form'.  This variable is a
218 list of expressions that can involve the variables `12-hours',
219 `24-hours', and `minutes', which are all numbers in string form, and
220 `am-pm' and `time-zone', which are both alphabetic strings.  The
221 default value of `calendar-time-display-form' is as follows:
222
223      (12-hours ":" minutes am-pm
224                (if time-zone " (") time-zone (if time-zone ")"))
225
226 Here is a value that provides European style times:
227
228      (24-hours ":" minutes
229                (if time-zone " (") time-zone (if time-zone ")"))
230
231 gives military-style times like `21:07 (UT)' if time zone names are
232 defined, and times like `21:07' if they are not.
233
234 \1f
235 File: xemacs.info,  Node: Daylight Savings,  Next: Diary Customizing,  Prev: Time Display Format,  Up: Calendar Customization
236
237 Daylight Savings Time
238 .....................
239
240    Emacs understands the difference between standard time and daylight
241 savings time--the times given for sunrise, sunset, solstices,
242 equinoxes, and the phases of the moon take that into account.  The rules
243 for daylight savings time vary from place to place and have also varied
244 historically from year to year.  To do the job properly, Emacs needs to
245 know which rules to use.
246
247    Some operating systems keep track of the rules that apply to the
248 place where you are; on these systems, Emacs gets the information it
249 needs from the system automatically.  If some or all of this
250 information is missing, Emacs fills in the gaps with the rules
251 currently used in Cambridge, Massachusetts.  If the resulting rules are
252 not what you want, you can tell Emacs the rules to use by setting
253 certain variables.
254
255    If the default choice of rules is not appropriate for your location,
256 you can tell Emacs the rules to use by setting the variables
257 `calendar-daylight-savings-starts' and
258 `calendar-daylight-savings-ends'.  Their values should be Lisp
259 expressions that refer to the variable `year', and evaluate to the
260 Gregorian date on which daylight savings time starts or (respectively)
261 ends, in the form of a list `(MONTH DAY YEAR)'.  The values should be
262 `nil' if your area does not use daylight savings time.
263
264    Emacs uses these expressions to determine the starting date of
265 daylight savings time for the holiday list  and for correcting times of
266 day in the solar and lunar calculations.
267
268    The values for Cambridge, Massachusetts are as follows:
269
270      (calendar-nth-named-day 1 0 4 year)
271      (calendar-nth-named-day -1 0 10 year)
272
273 That is, the first 0th day (Sunday) of the fourth month (April) in the
274 year specified by `year', and the last Sunday of the tenth month
275 (October) of that year.  If daylight savings time were changed to start
276 on October 1, you would set `calendar-daylight-savings-starts' to this:
277
278      (list 10 1 year)
279
280    For a more complex example, suppose daylight savings time begins on
281 the first of Nisan on the Hebrew calendar.  You should set
282 `calendar-daylight-savings-starts' to this value:
283
284      (calendar-gregorian-from-absolute
285        (calendar-absolute-from-hebrew
286          (list 1 1 (+ year 3760))))
287
288 because Nisan is the first month in the Hebrew calendar and the Hebrew
289 year differs from the Gregorian year by 3760 at Nisan.
290
291    If there is no daylight savings time at your location, or if you want
292 all times in standard time, set `calendar-daylight-savings-starts' and
293 `calendar-daylight-savings-ends' to `nil'.
294
295    The variable `calendar-daylight-time-offset' specifies the
296 difference between daylight savings time and standard time, measured in
297 minutes.  The value for Cambridge, Massachusetts is 60.
298
299    The two variables `calendar-daylight-savings-starts-time' and
300 `calendar-daylight-savings-ends-time' specify the number of minutes
301 after midnight local time when the transition to and from daylight
302 savings time should occur.  For Cambridge, Massachusetts both variables'
303 values are 120.
304
305 \1f
306 File: xemacs.info,  Node: Diary Customizing,  Next: Hebrew/Islamic Entries,  Prev: Daylight Savings,  Up: Calendar Customization
307
308 Customizing the Diary
309 .....................
310
311    Ordinarily, the mode line of the diary buffer window indicates any
312 holidays that fall on the date of the diary entries.  The process of
313 checking for holidays can take several seconds, so including holiday
314 information delays the display of the diary buffer noticeably.  If you'd
315 prefer to have a faster display of the diary buffer but without the
316 holiday information, set the variable `holidays-in-diary-buffer' to
317 `nil'.
318
319    The variable `number-of-diary-entries' controls the number of days
320 of diary entries to be displayed at one time.  It affects the initial
321 display when `view-diary-entries-initially' is `t', as well as the
322 command `M-x diary'.  For example, the default value is 1, which says
323 to display only the current day's diary entries.  If the value is 2,
324 both the current day's and the next day's entries are displayed.  The
325 value can also be a vector of seven elements: for example, if the value
326 is `[0 2 2 2 2 4 1]' then no diary entries appear on Sunday, the
327 current date's and the next day's diary entries appear Monday through
328 Thursday, Friday through Monday's entries appear on Friday, while on
329 Saturday only that day's entries appear.
330
331    The variable `print-diary-entries-hook' is a normal hook run after
332 preparation of a temporary buffer containing just the diary entries
333 currently visible in the diary buffer.  (The other, irrelevant diary
334 entries are really absent from the temporary buffer; in the diary
335 buffer, they are merely hidden.)  The default value of this hook does
336 the printing with the command `lpr-buffer'.  If you want to use a
337 different command to do the printing, just change the value of this
338 hook.  Other uses might include, for example, rearranging the lines into
339 order by day and time.
340
341    You can customize the form of dates in your diary file, if neither
342 the standard American nor European styles suits your needs, by setting
343 the variable `diary-date-forms'.  This variable is a list of patterns
344 for recognizing a date.  Each date pattern is a list whose elements may
345 be regular expressions (*note Regexps::) or the symbols `month', `day',
346 `year', `monthname', and `dayname'.  All these elements serve as
347 patterns that match certain kinds of text in the diary file.  In order
348 for the date pattern, as a whole, to match, all of its elements must
349 match consecutively.
350
351    A regular expression in a date pattern matches in its usual fashion,
352 using the standard syntax table altered so that `*' is a word
353 constituent.
354
355    The symbols `month', `day', `year', `monthname', and `dayname' match
356 the month number, day number, year number, month name, and day name of
357 the date being considered.  The symbols that match numbers allow
358 leading zeros; those that match names allow three-letter abbreviations
359 and capitalization.  All the symbols can match `*'; since `*' in a
360 diary entry means "any day", "any month", and so on, it should match
361 regardless of the date being considered.
362
363    The default value of `diary-date-forms' in the American style is
364 this:
365
366      ((month "/" day "[^/0-9]")
367       (month "/" day "/" year "[^0-9]")
368       (monthname " *" day "[^,0-9]")
369       (monthname " *" day ", *" year "[^0-9]")
370       (dayname "\\W"))
371
372 Emacs matches of the diary entries with the date forms is done with the
373 standard syntax table from Fundamental mode (*note Syntax Tables:
374 (lispref)Syntax Tables.), but with the `*' changed so that it is a word
375 constituent.
376
377    The date patterns in the list must be _mutually exclusive_ and must
378 not match any portion of the diary entry itself, just the date and one
379 character of whitespace.  If, to be mutually exclusive, the pattern
380 must match a portion of the diary entry text--beyond the whitespace
381 that ends the date--then the first element of the date pattern _must_
382 be `backup'.  This causes the date recognizer to back up to the
383 beginning of the current word of the diary entry, after finishing the
384 match.  Even if you use `backup', the date pattern must absolutely not
385 match more than a portion of the first word of the diary entry.  The
386 default value of `diary-date-forms' in the European style is this list:
387
388      ((day "/" month "[^/0-9]")
389       (day "/" month "/" year "[^0-9]")
390       (backup day " *" monthname "\\W+\\<[^*0-9]")
391       (day " *" monthname " *" year "[^0-9]")
392       (dayname "\\W"))
393
394 Notice the use of `backup' in the third pattern, because it needs to
395 match part of a word beyond the date itself to distinguish it from the
396 fourth pattern.
397
398 \1f
399 File: xemacs.info,  Node: Hebrew/Islamic Entries,  Next: Fancy Diary Display,  Prev: Diary Customizing,  Up: Calendar Customization
400
401 Hebrew- and Islamic-Date Diary Entries
402 ......................................
403
404    Your diary file can have entries based on Hebrew or Islamic dates, as
405 well as entries based on the world-standard Gregorian calendar.
406 However, because recognition of such entries is time-consuming and most
407 people don't use them, you must explicitly enable their use.  If you
408 want the diary to recognize Hebrew-date diary entries, for example, you
409 must do this:
410
411      (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
412      (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
413
414 If you want Islamic-date entries, do this:
415
416      (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
417      (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
418
419    Hebrew- and Islamic-date diary entries have the same formats as
420 Gregorian-date diary entries, except that `H' precedes a Hebrew date
421 and `I' precedes an Islamic date.  Moreover, because the Hebrew and
422 Islamic month names are not uniquely specified by the first three
423 letters, you may not abbreviate them.  For example, a diary entry for
424 the Hebrew date Heshvan 25 could look like this:
425
426      HHeshvan 25 Happy Hebrew birthday!
427
428 and would appear in the diary for any date that corresponds to Heshvan
429 25 on the Hebrew calendar.  And here is  Islamic-date diary entry  that
430 matches Dhu al-Qada 25:
431
432      IDhu al-Qada 25 Happy Islamic birthday!
433
434 and would appear in the diary for any date that corresponds to Dhu
435 al-Qada 25 on the Islamic calendar.
436
437    As with Gregorian-date diary entries, Hebrew- and Islamic-date
438 entries are nonmarking if they are preceded with an ampersand (`&').
439
440    Here is a table of commands used in the calendar to create diary
441 entries that match the selected date and other dates that are similar
442 in the Hebrew or Islamic calendar:
443
444 `i h d'
445      Add a diary entry for the Hebrew date corresponding to the
446      selected date (`insert-hebrew-diary-entry').
447
448 `i h m'
449      Add a diary entry for the day of the Hebrew month corresponding to
450      the selected date (`insert-monthly-hebrew-diary-entry').  This
451      diary entry matches any date that has the same Hebrew
452      day-within-month as the selected date.
453
454 `i h y'
455      Add a diary entry for the day of the Hebrew year corresponding to
456      the selected date (`insert-yearly-hebrew-diary-entry').  This diary
457      entry matches any date which has the same Hebrew month and
458      day-within-month as the selected date.
459
460 `i i d'
461      Add a diary entry for the Islamic date corresponding to the
462      selected date (`insert-islamic-diary-entry').
463
464 `i i m'
465      Add a diary entry for the day of the Islamic month corresponding
466      to the selected date (`insert-monthly-islamic-diary-entry').
467
468 `i i y'
469      Add a diary entry for the day of the Islamic year corresponding to
470      the selected date (`insert-yearly-islamic-diary-entry').
471
472    These commands work much like the corresponding commands for ordinary
473 diary entries: they apply to the date that point is on in the calendar
474 window, and what they do is insert just the date portion of a diary
475 entry at the end of your diary file.  You must then insert the rest of
476 the diary entry.
477
478 \1f
479 File: xemacs.info,  Node: Fancy Diary Display,  Next: Included Diary Files,  Prev: Hebrew/Islamic Entries,  Up: Calendar Customization
480
481 Fancy Diary Display
482 ...................
483
484    Diary display works by preparing the diary buffer and then running
485 the hook `diary-display-hook'.  The default value of this hook
486 (`simple-diary-display') hides the irrelevant diary entries and then
487 displays the buffer.  However, if you specify the hook as follows,
488
489      (add-hook 'diary-display-hook 'fancy-diary-display)
490
491 this enables fancy diary display.  It displays diary entries and
492 holidays by copying them into a special buffer that exists only for the
493 sake of display.  Copying to a separate buffer provides an opportunity
494 to change the displayed text to make it prettier--for example, to sort
495 the entries by the dates they apply to.
496
497    As with simple diary display, you can print a hard copy of the buffer
498 with `print-diary-entries'.  To print a hard copy of a day-by-day diary
499 for a week by positioning point on Sunday of that week, type `7 d' and
500 then do `M-x print-diary-entries'.  As usual, the inclusion of the
501 holidays slows down the display slightly; you can speed things up by
502 setting the variable `holidays-in-diary-buffer' to `nil'.
503
504    Ordinarily, the fancy diary buffer does not show days for which
505 there are no diary entries, even if that day is a holiday.  If you want
506 such days to be shown in the fancy diary buffer, set the variable
507 `diary-list-include-blanks' to `t'.
508
509    If you use the fancy diary display, you can use the normal hook
510 `list-diary-entries-hook' to sort each day's diary entries by their
511 time of day.  Add this line to your init file:
512
513      (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
514
515    *Note Init File::.
516
517 For each day, this sorts diary entries that begin with a recognizable
518 time of day according to their times.  Diary entries without times come
519 first within each day.
520
521 \1f
522 File: xemacs.info,  Node: Included Diary Files,  Next: Sexp Diary Entries,  Prev: Fancy Diary Display,  Up: Calendar Customization
523
524 Included Diary Files
525 ....................
526
527    Fancy diary display also has the ability to process included diary
528 files.  This permits a group of people to share a diary file for events
529 that apply to all of them.  Lines in the diary file of this form:
530
531      #include "FILENAME"
532
533 includes the diary entries from the file FILENAME in the fancy diary
534 buffer.  The include mechanism is recursive, so that included files can
535 include other files, and so on; you must be careful not to have a cycle
536 of inclusions, of course.  Here is how to enable the include facility:
537
538      (add-hook 'list-diary-entries-hook 'include-other-diary-files)
539      (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
540
541    The include mechanism works only with the fancy diary display,
542 because ordinary diary display shows the entries directly from your
543 diary file.
544
545 \1f
546 File: xemacs.info,  Node: Sexp Diary Entries,  Next: Appt Customizing,  Prev: Included Diary Files,  Up: Calendar Customization
547
548 Sexp Entries and the Fancy Diary Display
549 ........................................
550
551    Sexp diary entries allow you to do more than just have complicated
552 conditions under which a diary entry applies.  If you use the fancy
553 diary display, sexp entries can generate the text of the entry depending
554 on the date itself.  For example, an anniversary diary entry can insert
555 the number of years since the anniversary date into the text of the
556 diary entry.  Thus the `%d' in this dairy entry:
557
558      %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
559
560 gets replaced by the age, so on October 31, 1990 the entry appears in
561 the fancy diary buffer like this:
562
563      Arthur's birthday (42 years old)
564
565 If the diary file instead contains this entry:
566
567      %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
568
569 the entry in the fancy diary buffer for October 31, 1990 appears like
570 this:
571
572      Arthur's 42nd birthday
573
574    Similarly, cyclic diary entries can interpolate the number of
575 repetitions that have occurred:
576
577      %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
578
579 looks like this:
580
581      Renew medication (5th time)
582
583 in the fancy diary display on September 8, 1990.
584
585    The generality of sexp diary entries lets you specify any diary entry
586 that you can describe algorithmically.  A sexp diary entry contains an
587 expression that computes whether the entry applies to any given date.
588 If its value is non-`nil', the entry applies to that date; otherwise,
589 it does not.  The expression can use the variable  `date' to find the
590 date being considered; its value is a list (MONTH DAY YEAR) that refers
591 to the Gregorian calendar.
592
593    Suppose you get paid on the 21st of the month if it is a weekday, and
594 on the Friday before if the 21st is on a weekend.  Here is how to write
595 a sexp diary entry that matches those dates:
596
597      &%%(let ((dayname (calendar-day-of-week date))
598               (day (car (cdr date))))
599            (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
600                (and (memq day '(19 20)) (= dayname 5)))
601               ) Pay check deposited
602
603 applies to just those dates.  This example illustrates how the sexp can
604 depend on the variable `date'; this variable is a list (MONTH DAY YEAR)
605 that gives the Gregorian date for which the diary entries are being
606 found.  If the value of the expression is `t', the entry applies to
607 that date.  If the expression evaluates to `nil', the entry does _not_
608 apply to that date.
609
610    The following sexp diary entries take advantage of the ability (in
611 the fancy diary display) to concoct diary entries whose text varies
612 based on the date:
613
614 `%%(diary-sunrise-sunset)'
615      Make a diary entry for the local times of today's sunrise and
616      sunset.
617
618 `%%(diary-phases-of-moon)'
619      Make a diary entry for the phases (quarters) of the moon.
620
621 `%%(diary-day-of-year)'
622      Make a diary entry with today's day number in the current year and
623      the number of days remaining in the current year.
624
625 `%%(diary-iso-date)'
626      Make a diary entry with today's equivalent ISO commercial date.
627
628 `%%(diary-julian-date)'
629      Make a diary entry with today's equivalent date on the Julian
630      calendar.
631
632 `%%(diary-astro-day-number)'
633      Make a diary entry with today's equivalent astronomical (Julian)
634      day number.
635
636 `%%(diary-hebrew-date)'
637      Make a diary entry with today's equivalent date on the Hebrew
638      calendar.
639
640 `%%(diary-islamic-date)'
641      Make a diary entry with today's equivalent date on the Islamic
642      calendar.
643
644 `%%(diary-french-date)'
645      Make a diary entry with today's equivalent date on the French
646      Revolutionary calendar.
647
648 `%%(diary-mayan-date)'
649      Make a diary entry with today's equivalent date on the Mayan
650      calendar.
651
652 Thus including the diary entry
653
654      &%%(diary-hebrew-date)
655
656 causes every day's diary display to contain the equivalent date on the
657 Hebrew calendar, if you are using the fancy diary display.  (With simple
658 diary display, the line `&%%(diary-hebrew-date)' appears in the diary
659 for any date, but does nothing particularly useful.)
660
661    These functions can be used to construct sexp diary entries based on
662 the Hebrew calendar in certain standard ways:
663
664 `%%(diary-rosh-hodesh)'
665      Make a diary entry that tells the occurrence and ritual
666      announcement of each new Hebrew month.
667
668 `%%(diary-parasha)'
669      Make a Saturday diary entry that tells the weekly synagogue
670      scripture reading.
671
672 `%%(diary-sabbath-candles)'
673      Make a Friday diary entry that tells the _local time_ of Sabbath
674      candle lighting.
675
676 `%%(diary-omer)'
677      Make a diary entry that gives the omer count, when appropriate.
678
679 `%%(diary-yahrzeit MONTH DAY YEAR) NAME'
680      Make a diary entry marking the anniversary of a date of death.
681      The date is the _Gregorian_ (civil) date of death.  The diary
682      entry appears on the proper Hebrew calendar anniversary and on the
683      day before.  (In the European style, the order of the parameters
684      is changed to DAY, MONTH, YEAR.)
685
686 \1f
687 File: xemacs.info,  Node: Appt Customizing,  Prev: Sexp Diary Entries,  Up: Calendar Customization
688
689 Customizing Appointment Reminders
690 .................................
691
692    You can specify exactly how Emacs reminds you of an appointment, and
693 how far in advance it begins doing so, by setting these variables:
694
695 `appt-message-warning-time'
696      The time in minutes before an appointment that the reminder
697      begins.  The default is 10 minutes.
698
699 `appt-audible'
700      If this is `t' (the default), Emacs rings the terminal bell for
701      appointment reminders.
702
703 `appt-visible'
704      If this is `t' (the default), Emacs displays the appointment
705      message in echo area.
706
707 `appt-display-mode-line'
708      If this is `t' (the default), Emacs displays the number of minutes
709      to the appointment on the mode line.
710
711 `appt-msg-window'
712      If this is `t' (the default), Emacs displays the appointment
713      message in another window.
714
715 `appt-display-duration'
716      The number of seconds an appointment message is displayed.  The
717      default is 5 seconds.
718
719 \1f
720 File: xemacs.info,  Node: Sorting,  Next: Shell,  Prev: Calendar/Diary,  Up: Top
721
722 Sorting Text
723 ============
724
725    XEmacs provides several commands for sorting text in a buffer.  All
726 operate on the contents of the region (the text between point and the
727 mark).  They divide the text of the region into many "sort records",
728 identify a "sort key" for each record, and then reorder the records
729 using the order determined by the sort keys.  The records are ordered so
730 that their keys are in alphabetical order, or, for numerical sorting, in
731 numerical order.  In alphabetical sorting, all upper-case letters `A'
732 through `Z' come before lower-case `a', in accordance with the ASCII
733 character sequence.
734
735    The sort commands differ in how they divide the text into sort
736 records and in which part of each record they use as the sort key.
737 Most of the commands make each line a separate sort record, but some
738 commands use paragraphs or pages as sort records.  Most of the sort
739 commands use each entire sort record as its own sort key, but some use
740 only a portion of the record as the sort key.
741
742 `M-x sort-lines'
743      Divide the region into lines and sort by comparing the entire text
744      of a line.  A prefix argument means sort in descending order.
745
746 `M-x sort-paragraphs'
747      Divide the region into paragraphs and sort by comparing the entire
748      text of a paragraph (except for leading blank lines).  A prefix
749      argument means sort in descending order.
750
751 `M-x sort-pages'
752      Divide the region into pages and sort by comparing the entire text
753      of a page (except for leading blank lines).  A prefix argument
754      means sort in descending order.
755
756 `M-x sort-fields'
757      Divide the region into lines and sort by comparing the contents of
758      one field in each line.  Fields are defined as separated by
759      whitespace, so the first run of consecutive non-whitespace
760      characters in a line constitutes field 1, the second such run
761      constitutes field 2, etc.
762
763      You specify which field to sort by with a numeric argument: 1 to
764      sort by field 1, etc.  A negative argument means sort in descending
765      order.  Thus, minus 2 means sort by field 2 in reverse-alphabetical
766      order.
767
768 `M-x sort-numeric-fields'
769      Like `M-x sort-fields', except the specified field is converted to
770      a number for each line and the numbers are compared.  `10' comes
771      before `2' when considered as text, but after it when considered
772      as a number.
773
774 `M-x sort-columns'
775      Like `M-x sort-fields', except that the text within each line used
776      for comparison comes from a fixed range of columns.  An explanation
777      is given below.
778
779    For example, if the buffer contains:
780
781      On systems where clash detection (locking of files being edited) is
782      implemented, XEmacs also checks the first time you modify a buffer
783      whether the file has changed on disk since it was last visited or
784      saved.  If it has, you are asked to confirm that you want to change
785      the buffer.
786
787 then if you apply `M-x sort-lines' to the entire buffer you get:
788
789      On systems where clash detection (locking of files being edited) is
790      implemented, XEmacs also checks the first time you modify a buffer
791      saved.  If it has, you are asked to confirm that you want to change
792      the buffer.
793      whether the file has changed on disk since it was last visited or
794
795 where the upper case `O' comes before all lower case letters.  If you
796 apply instead `C-u 2 M-x sort-fields' you get:
797
798      saved.  If it has, you are asked to confirm that you want to change
799      implemented, XEmacs also checks the first time you modify a buffer
800      the buffer.
801      On systems where clash detection (locking of files being edited) is
802      whether the file has changed on disk since it was last visited or
803
804 where the sort keys were `If', `XEmacs', `buffer', `systems', and `the'.
805
806    `M-x sort-columns' requires more explanation.  You specify the
807 columns by putting point at one of the columns and the mark at the other
808 column.  Because this means you cannot put point or the mark at the
809 beginning of the first line to sort, this command uses an unusual
810 definition of `region': all of the line point is in is considered part
811 of the region, and so is all of the line the mark is in.
812
813    For example, to sort a table by information found in columns 10 to
814 15, you could put the mark on column 10 in the first line of the table,
815 and point on column 15 in the last line of the table, and then use this
816 command.  Or you could put the mark on column 15 in the first line and
817 point on column 10 in the last line.
818
819    This can be thought of as sorting the rectangle specified by point
820 and the mark, except that the text on each line to the left or right of
821 the rectangle moves along with the text inside the rectangle.  *Note
822 Rectangles::.
823
824 \1f
825 File: xemacs.info,  Node: Shell,  Next: Narrowing,  Prev: Sorting,  Up: Top
826
827 Running Shell Commands from XEmacs
828 ==================================
829
830    XEmacs has commands for passing single command lines to inferior
831 shell processes; it can also run a shell interactively with input and
832 output to an XEmacs buffer `*shell*'.
833
834 `M-!'
835      Run a specified shell command line and display the output
836      (`shell-command').
837
838 `M-|'
839      Run a specified shell command line with region contents as input;
840      optionally replace the region with the output
841      (`shell-command-on-region').
842
843 `M-x shell'
844      Run a subshell with input and output through an XEmacs buffer.
845      You can then give commands interactively.
846
847 `M-x term'
848      Run a subshell with input and output through an XEmacs buffer.
849      You can then give commands interactively.  Full terminal emulation
850      is available.
851
852 * Menu:
853
854 * Single Shell::         How to run one shell command and return.
855 * Interactive Shell::    Permanent shell taking input via XEmacs.
856 * Shell Mode::           Special XEmacs commands used with permanent shell.
857 * Terminal emulator::    An XEmacs window as a terminal emulator.
858 * Term Mode::            Special XEmacs commands used in Term mode.
859 * Paging in Term::       Paging in the terminal emulator.
860
861 \1f
862 File: xemacs.info,  Node: Single Shell,  Next: Interactive Shell,  Prev: Shell,  Up: Shell
863
864 Single Shell Commands
865 ---------------------
866
867    `M-!' (`shell-command') reads a line of text using the minibuffer
868 and creates an inferior shell to execute the line as a command.
869 Standard input from the command comes from the null device.  If the
870 shell command produces any output, the output goes to an XEmacs buffer
871 named `*Shell Command Output*', which is displayed in another window
872 but not selected.  A numeric argument, as in `M-1 M-!', directs this
873 command to insert any output into the current buffer.  In that case,
874 point is left before the output and the mark is set after the output.
875
876    `M-|' (`shell-command-on-region') is like `M-!' but passes the
877 contents of the region as input to the shell command, instead of no
878 input.  If a numeric argument is used to direct  output to the current
879 buffer, then the old region is deleted first and the output replaces it
880 as the contents of the region.
881
882    Both `M-!' and `M-|' use `shell-file-name' to specify the shell to
883 use.  This variable is initialized based on your `SHELL' environment
884 variable when you start XEmacs.  If the file name does not specify a
885 directory, the directories in the list `exec-path' are searched; this
886 list is initialized based on the `PATH' environment variable when you
887 start XEmacs.  You can override either or both of these default
888 initializations in your init file. *Note Init File::.
889
890    When you use `M-!' and `M-|', XEmacs has to wait until the shell
891 command completes.  You can quit with `C-g'; that terminates the shell
892 command.
893
894 \1f
895 File: xemacs.info,  Node: Interactive Shell,  Next: Shell Mode,  Prev: Single Shell,  Up: Shell
896
897 Interactive Inferior Shell
898 --------------------------
899
900    To run a subshell interactively with its typescript in an XEmacs
901 buffer, use `M-x shell'.  This creates (or reuses) a buffer named
902 `*shell*' and runs a subshell with input coming from and output going
903 to that buffer.  That is to say, any "terminal output" from the subshell
904 will go into the buffer, advancing point, and any "terminal input" for
905 the subshell comes from text in the buffer.  To give input to the
906 subshell, go to the end of the buffer and type the input, terminated by
907 <RET>.
908
909    XEmacs does not wait for the subshell to do anything.  You can switch
910 windows or buffers and edit them while the shell is waiting, or while
911 it is running a command.  Output from the subshell waits until XEmacs
912 has time to process it; this happens whenever XEmacs is waiting for
913 keyboard input or for time to elapse.
914
915    To get multiple subshells, change the name of buffer `*shell*' to
916 something different by using `M-x rename-buffer'.  The next use of `M-x
917 shell' creates a new buffer `*shell*' with its own subshell.  By
918 renaming this buffer as well you can create a third one, and so on.
919 All the subshells run independently and in parallel.
920
921    The file name used to load the subshell is the value of the variable
922 `explicit-shell-file-name', if that is non-`nil'.  Otherwise, the
923 environment variable `ESHELL' is used, or the environment variable
924 `SHELL' if there is no `ESHELL'.  If the file name specified is
925 relative, the directories in the list `exec-path' are searched (*note
926 Single Shell Commands: Single Shell.).
927
928    As soon as the subshell is started, it is sent as input the contents
929 of the file `~/.emacs_SHELLNAME', if that file exists, where SHELLNAME
930 is the name of the file that the shell was loaded from.  For example,
931 if you use `csh', the file sent to it is `~/.emacs_csh'.
932
933    `cd', `pushd', and `popd' commands given to the inferior shell are
934 watched by XEmacs so it can keep the `*shell*' buffer's default
935 directory the same as the shell's working directory.  These commands
936 are recognized syntactically by examining lines of input that are sent.
937 If you use aliases for these commands, you can tell XEmacs to
938 recognize them also.  For example, if the value of the variable
939 `shell-pushd-regexp' matches the beginning of a shell command line,
940 that line is regarded as a `pushd' command.  Change this variable when
941 you add aliases for `pushd'.  Likewise, `shell-popd-regexp' and
942 `shell-cd-regexp' are used to recognize commands with the meaning of
943 `popd' and `cd'.
944
945    `M-x shell-resync-dirs' queries the shell and resynchronizes XEmacs'
946 idea of what the current directory stack is.  `M-x
947 shell-dirtrack-toggle' turns directory tracking on and off.
948
949    XEmacs keeps a history of the most recent commands you have typed in
950 the `*shell*' buffer.  If you are at the beginning of a shell command
951 line and type <M-p>, the previous shell input is inserted into the
952 buffer before point.  Immediately typing <M-p> again deletes that input
953 and inserts the one before it.  By repeating <M-p> you can move
954 backward through your commands until you find one you want to repeat.
955 You may then edit the command before typing <RET> if you wish. <M-n>
956 moves forward through the command history, in case you moved backward
957 past the one you wanted while using <M-p>.  If you type the first few
958 characters of a previous command and then type <M-p>, the most recent
959 shell input starting with those characters is inserted.  This can be
960 very convenient when you are repeating a sequence of shell commands.
961 The variable `input-ring-size' controls how many commands are saved in
962 your input history.  The default is 30.
963
964 \1f
965 File: xemacs.info,  Node: Shell Mode,  Next: Terminal emulator,  Prev: Interactive Shell,  Up: Shell
966
967 Shell Mode
968 ----------
969
970    The shell buffer uses Shell mode, which defines several special keys
971 attached to the `C-c' prefix.  They are chosen to resemble the usual
972 editing and job control characters present in shells that are not under
973 XEmacs, except that you must type `C-c' first.  Here is a list of the
974 special key bindings of Shell mode:
975
976 `<RET>'
977      At end of buffer send line as input; otherwise, copy current line
978      to end of buffer and send it (`send-shell-input').  When a line is
979      copied, any text at the beginning of the line that matches the
980      variable `shell-prompt-pattern' is left out; this variable's value
981      should be a regexp string that matches the prompts that you use in
982      your subshell.
983
984 `C-c C-d'
985      Send end-of-file as input, probably causing the shell or its
986      current subjob to finish (`shell-send-eof').
987
988 `C-d'
989      If point is not at the end of the buffer, delete the next
990      character just like most other modes.  If point is at the end of
991      the buffer, send end-of-file as input, instead of generating an
992      error as in other modes (`comint-delchar-or-maybe-eof').
993
994 `C-c C-u'
995      Kill all text that has yet to be sent as input
996      (`kill-shell-input').
997
998 `C-c C-w'
999      Kill a word before point (`backward-kill-word').
1000
1001 `C-c C-c'
1002      Interrupt the shell or its current subjob if any
1003      (`interrupt-shell-subjob').
1004
1005 `C-c C-z'
1006      Stop the shell or its current subjob if any (`stop-shell-subjob').
1007
1008 `C-c C-\'
1009      Send quit signal to the shell or its current subjob if any
1010      (`quit-shell-subjob').
1011
1012 `C-c C-o'
1013      Delete last batch of output from shell (`kill-output-from-shell').
1014
1015 `C-c C-r'
1016      Scroll top of last batch of output to top of window
1017      (`show-output-from-shell').
1018
1019 `C-c C-y'
1020      Copy the previous bunch of shell input and insert it into the
1021      buffer before point (`copy-last-shell-input').  No final newline
1022      is inserted, and the input copied is not resubmitted until you type
1023      <RET>.
1024
1025 `M-p'
1026      Move backward through the input history.  Search for a matching
1027      command if you have typed the beginning of a command
1028      (`comint-previous-input').
1029
1030 `M-n'
1031      Move forward through the input history.  Useful when you are using
1032      <M-p> quickly and go past the desired command
1033      (`comint-next-input').
1034
1035 `<TAB>'
1036      Complete the file name preceding point (`comint-dynamic-complete').
1037
1038 \1f
1039 File: xemacs.info,  Node: Terminal emulator,  Next: Term Mode,  Prev: Shell Mode,  Up: Shell
1040
1041 Interactive Inferior Shell with Terminal Emulator
1042 -------------------------------------------------
1043
1044    To run a subshell in a terminal emulator, putting its typescript in
1045 an XEmacs buffer, use `M-x term'.  This creates (or reuses) a buffer
1046 named `*term*' and runs a subshell with input coming from your keyboard
1047 and output going to that buffer.
1048
1049    All the normal keys that you type are sent without any interpretation
1050 by XEmacs directly to the subshell, as "terminal input."  Any "echo" of
1051 your input is the responsibility of the subshell.  (The exception is
1052 the terminal escape character, which by default is `C-c'. *note Term
1053 Mode::.)  Any "terminal output" from the subshell goes into the buffer,
1054 advancing point.
1055
1056    Some programs (such as XEmacs itself) need to control the appearance
1057 on the terminal screen in detail.  They do this by sending special
1058 control codes.  The exact control codes needed vary from terminal to
1059 terminal, but nowadays most terminals and terminal emulators (including
1060 xterm) understand the so-called "ANSI escape sequences" (first
1061 popularized by the Digital's VT100 family of terminal).  The term mode
1062 also understands these escape sequences, and for each control code does
1063 the appropriate thing to change the buffer so that the appearance of
1064 the window will match what it would be on a real terminal.  Thus you
1065 can actually run XEmacs inside an XEmacs Term window!
1066
1067    XEmacs does not wait for the subshell to do anything.  You can switch
1068 windows or buffers and edit them while the shell is waiting, or while
1069 it is running a command.  Output from the subshell waits until XEmacs
1070 has time to process it; this happens whenever XEmacs is waiting for
1071 keyboard input or for time to elapse.
1072
1073    To make multiple terminal emulators, rename the buffer `*term*' to
1074 something different using `M-x rename-uniquely', just as with Shell
1075 mode.
1076
1077    The file name used to load the subshell is determined the same way
1078 as for Shell mode.
1079
1080    Unlike Shell mode, Term mode does not track the current directory by
1081 examining your input.  Instead, if you use a programmable shell, you
1082 can have it tell Term what the current directory is.  This is done
1083 automatically by bash for version 1.15 and later.
1084
1085 \1f
1086 File: xemacs.info,  Node: Term Mode,  Next: Paging in Term,  Prev: Terminal emulator,  Up: Shell
1087
1088 Term Mode
1089 ---------
1090
1091    Term uses Term mode, which has two input modes: In line mode, Term
1092 basically acts like Shell mode.  *Note Shell Mode::.  In Char mode,
1093 each character is sent directly to the inferior subshell, except for
1094 the Term escape character, normally `C-c'.
1095
1096    To switch between line and char mode, use these commands:
1097      findex term-char-mode
1098
1099 `C-c C-k'
1100      Switch to line mode.  Do nothing if already in line mode.
1101
1102 `C-c C-j'
1103      Switch to char mode.  Do nothing if already in char mode.
1104
1105    The following commands are only available in Char mode:
1106 `C-c C-c'
1107      Send a literal <C-c> to the sub-shell.
1108
1109 `C-c C-x'
1110      A prefix command to conveniently access the global <C-x> commands.
1111      For example, `C-c C-x o' invokes the global binding of `C-x o',
1112      which is normally `other-window'.
1113
1114 \1f
1115 File: xemacs.info,  Node: Paging in Term,  Prev: Term Mode,  Up: Shell
1116
1117 Paging in the terminal emulator
1118 -------------------------------
1119
1120    Term mode has a pager feature.  When the pager is enabled, term mode
1121 will pause at the end of each screenful.
1122
1123 `C-c C-q'
1124      Toggles the pager feature:  Disables the pager if it is enabled,
1125      and vice versa.  This works in both line and char modes.  If the
1126      pager enabled, the mode-line contains the word `page'.
1127
1128    If the pager is enabled, and Term receives more than a screenful of
1129 output since your last input, Term will enter More break mode.  This is
1130 indicated by `**MORE**' in the mode-line.  Type a `Space' to display
1131 the next screenful of output.  Type `?' to see your other options.  The
1132 interface is similar to the Unix `more' program.
1133
1134 \1f
1135 File: xemacs.info,  Node: Narrowing,  Next: Hardcopy,  Prev: Shell,  Up: Top
1136
1137 Narrowing
1138 =========
1139
1140    "Narrowing" means focusing in on some portion of the buffer, making
1141 the rest temporarily invisible and inaccessible.  Cancelling the
1142 narrowing and making the entire buffer once again visible is called
1143 "widening".  The amount of narrowing in effect in a buffer at any time
1144 is called the buffer's "restriction".
1145
1146 `C-x n n'
1147      Narrow down to between point and mark (`narrow-to-region').
1148
1149 `C-x n w'
1150      Widen to make the entire buffer visible again (`widen').
1151
1152    Narrowing sometimes makes it easier to concentrate on a single
1153 subroutine or paragraph by eliminating clutter.  It can also be used to
1154 restrict the range of operation of a replace command or repeating
1155 keyboard macro.  The word `Narrow' appears in the mode line whenever
1156 narrowing is in effect.  When you have narrowed to a part of the
1157 buffer, that part appears to be all there is.  You can't see the rest,
1158 can't move into it (motion commands won't go outside the visible part),
1159 and can't change it in any way.  However, the invisible text is not
1160 gone; if you save the file, it will be saved.
1161
1162    The primary narrowing command is `C-x n n' (`narrow-to-region').  It
1163 sets the current buffer's restrictions so that the text in the current
1164 region remains visible but all text before the region or after the
1165 region is invisible.  Point and mark do not change.
1166
1167    Because narrowing can easily confuse users who do not understand it,
1168 `narrow-to-region' is normally a disabled command.  Attempting to use
1169 this command asks for confirmation and gives you the option of enabling
1170 it; once you enable the command, confirmation will no longer be
1171 required.  *Note Disabling::.
1172
1173    To undo narrowing, use `C-x n w' (`widen').  This makes all text in
1174 the buffer accessible again.
1175
1176    Use the `C-x =' command to get information on what part of the
1177 buffer you narrowed down.  *Note Position Info::.
1178
1179 \1f
1180 File: xemacs.info,  Node: Hardcopy,  Next: Recursive Edit,  Prev: Narrowing,  Up: Top
1181
1182 Hardcopy Output
1183 ===============
1184
1185    The XEmacs commands for making hardcopy derive their names from the
1186 Unix commands `print' and `lpr'.
1187
1188 `M-x print-buffer'
1189      Print hardcopy of current buffer using Unix command `print'
1190      (`lpr -p').  This command adds page headings containing the file
1191      name and page number.
1192
1193 `M-x lpr-buffer'
1194      Print hardcopy of current buffer using Unix command `lpr'.  This
1195      command does not add page headings.
1196
1197 `M-x print-region'
1198      Like `print-buffer', but prints only the current region.
1199
1200 `M-x lpr-region'
1201      Like `lpr-buffer', but prints only the current region.
1202
1203    All the hardcopy commands pass extra switches to the `lpr' program
1204 based on the value of the variable `lpr-switches'.  Its value should be
1205 a list of strings, each string a switch starting with `-'.  For
1206 example, the value could be `("-Pfoo")' to print on printer `foo'.
1207