Commit bea169e9 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

entered into RCS

parent dc509e64
......@@ -19,15 +19,15 @@ in the same major mode share one abbrev table. There is also a global
abbrev table. Normally both are used.
An abbrev table is represented as an obarray containing a symbol for
each abbreviation. The symbol's name is the abbreviation. Its value is
each abbreviation. The symbol's name is the abbreviation; its value is
the expansion; its function definition is the hook function to do the
expansion (if any); its property list cell contains the use count, the
number of times the abbreviation has been expanded. Because these
symbols are not interned in the usual obarray, they will never appear as
the result of reading a Lisp expression; in fact, normally they are
never used except by the code that handles abbrevs. Therefore, it is
safe to use them in an extremely nonstandard way. @xref{Creating
Symbols}.
expansion (@pxref{Defining Abbrevs}); its property list cell contains
the use count, the number of times the abbreviation has been expanded.
Because these symbols are not interned in the usual obarray, they will
never appear as the result of reading a Lisp expression; in fact,
normally they are never used except by the code that handles abbrevs.
Therefore, it is safe to use them in an extremely nonstandard way.
@xref{Creating Symbols}.
For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev
Mode, emacs, The GNU Emacs Manual}.
......@@ -58,7 +58,7 @@ This variable automatically becomes local when set in any fashion.
@end defvar
@defvar default-abbrev-mode
This is the value @code{abbrev-mode} for buffers that do not override it.
This is the value of @code{abbrev-mode} for buffers that do not override it.
This is the same as @code{(default-value 'abbrev-mode)}.
@end defvar
......@@ -97,7 +97,7 @@ abbrev table. The value is always @code{nil}.
If @var{human} is non-@code{nil}, the description is human-oriented.
Otherwise the description is a Lisp expression---a call to
@code{define-abbrev-table} which would define @var{name} exactly as it
@code{define-abbrev-table} that would define @var{name} exactly as it
is currently defined.
@end defun
......@@ -111,13 +111,14 @@ is currently defined.
user.
@defun add-abbrev table type arg
This function adds an abbreviation to abbrev table @var{table}. The
argument @var{type} is a string describing in English the kind of abbrev
this will be (typically, @code{"global"} or @code{"mode-specific"});
this is used in prompting the user. The argument @var{arg} is the
number of words in the expansion.
This function adds an abbreviation to abbrev table @var{table} based on
information from the user. The argument @var{type} is a string
describing in English the kind of abbrev this will be (typically,
@code{"global"} or @code{"mode-specific"}); this is used in prompting
the user. The argument @var{arg} is the number of words in the
expansion.
The return value is the symbol which internally represents the new
The return value is the symbol that internally represents the new
abbrev, or @code{nil} if the user declines to confirm redefining an
existing abbrev.
@end defun
......@@ -125,17 +126,17 @@ existing abbrev.
@defun define-abbrev table name expansion hook
This function defines an abbrev in @var{table} named @var{name}, to
expand to @var{expansion}, and call @var{hook}. The return value is an
uninterned symbol which represents the abbrev inside Emacs; its name is
uninterned symbol that represents the abbrev inside Emacs; its name is
@var{name}.
The argument @var{name} should be a string. The argument
@var{expansion} should be a string, or @code{nil}, to undefine the
@var{expansion} should be a string, or @code{nil} to undefine the
abbrev.
The argument @var{hook} is a function or @code{nil}. If @var{hook} is
non-@code{nil}, then it is called with no arguments after the abbrev is
replaced with @var{expansion}; point is located at the end of
@var{expansion}.
@var{expansion} when @var{hook} is called.
The use count of the abbrev is initialized to zero.
@end defun
......@@ -144,7 +145,7 @@ The use count of the abbrev is initialized to zero.
If this variable is non-@code{nil}, it means that the user plans to use
global abbrevs only. This tells the commands that define mode-specific
abbrevs to define global ones instead. This variable does not alter the
functioning of the functions in this section; it is examined by their
behavior of the functions in this section; it is examined by their
callers.
@end defopt
......@@ -189,7 +190,7 @@ save your abbrevs.
@deffn Command write-abbrev-file filename
Save all abbrev definitions, in all abbrev tables, in the file
@var{filename}, in the form of a Lisp program which when loaded will
@var{filename}, in the form of a Lisp program that when loaded will
define the same abbrevs. This function returns @code{nil}.
@end deffn
......@@ -211,6 +212,26 @@ first the current buffer's local abbrev table, and second the global
abbrev table.
@end defun
@defun abbrev-expansion abbrev &optional table
This function returns the string that @var{abbrev} would expand into (as
defined by the abbrev tables used for the current buffer). The optional
argument @var{table} specifies the abbrev table to use, as in
@code{abbrev-symbol}.
@end defun
@deffn Command expand-abbrev
This command expands the abbrev before point, if any.
If point does not follow an abbrev, this command does nothing.
The command returns @code{t} if it did expansion, @code{nil} otherwise.
@end deffn
@deffn Command abbrev-prefix-mark &optional arg
Mark current point as the beginning of an abbrev. The next call to
@code{expand-abbrev} will use the text from here to point (where it is
then) as the abbrev to expand, rather than using the previous word as
usual.
@end deffn
@defopt abbrev-all-caps
When this is set non-@code{nil}, an abbrev entered entirely in upper
case is expanded using all upper case. Otherwise, an abbrev entered
......@@ -218,13 +239,6 @@ entirely in upper case is expanded by capitalizing each word of the
expansion.
@end defopt
@defun abbrev-expansion abbrev &optional table
This function returns the string that @var{abbrev} would expand into (as
defined by the abbrev tables used for the current buffer). The optional
argument @var{table} specifies the abbrev table to use; if it is
specified, the abbrev is looked up in that table only.
@end defun
@defvar abbrev-start-location
This is the buffer position for @code{expand-abbrev} to use as the start
of the next abbrev to be expanded. (@code{nil} means use the word
......@@ -253,11 +267,10 @@ information left by @code{expand-abbrev} for the sake of the
@end defvar
@defvar last-abbrev-text
This is the exact expansion text of the last abbrev expanded, as
results from case conversion. Its value is
@code{nil} if the abbrev has already been unexpanded. This
contains information left by @code{expand-abbrev} for the sake of the
@code{unexpand-abbrev} command.
This is the exact expansion text of the last abbrev expanded, after case
conversion (if any). Its value is @code{nil} if the abbrev has already
been unexpanded. This contains information left by @code{expand-abbrev}
for the sake of the @code{unexpand-abbrev} command.
@end defvar
@c Emacs 19 feature
......@@ -284,7 +297,7 @@ aborts expansion if it is not confirmed.
;; @r{user entered some other character, this function asks whether}
;; @r{expansion should continue.}
;; @r{If the user enters the prompt with @kbd{y}, the function returns}
;; @r{If the user answers the prompt with @kbd{y}, the function returns}
;; @r{@code{nil} (because of the @code{not} function), but that is}
;; @r{acceptable; the return value has no effect on expansion.}
......@@ -314,8 +327,8 @@ abbreviation table of the current buffer.
@end defvar
@defvar fundamental-mode-abbrev-table
This is the local abbrev table used in Fundamental mode. It is the
local abbrev table in all buffers in Fundamental mode.
This is the local abbrev table used in Fundamental mode; in other words,
it is the local abbrev table in all buffers in Fundamental mode.
@end defvar
@defvar text-mode-abbrev-table
......
......@@ -38,13 +38,14 @@ your @file{.emacs} file:@refill
@end example
@noindent
they display both the calendar and diary windows whenever you start Emacs.
this displays both the calendar and diary windows whenever you start Emacs.
@vindex view-calendar-holidays-initially
Similarly, if you set the variable
@code{view-calendar-holidays-initially} to @code{t}, entering the
calendar automatically displays a list of holidays for the current three
month period. The holiday list appears in a separate window.@refill
calendar automatically displays a list of holidays for the current
three-month period. The holiday list appears in a separate
window.
@vindex mark-diary-entries-in-calendar
You can set the variable @code{mark-diary-entries-in-calendar} to
......@@ -118,13 +119,13 @@ the current date is @emph{not} visible in the window.
@vindex hebrew-holidays
@vindex islamic-holidays
Emacs knows about holidays defined by entries on one of several lists.
You can customize theses lists of holidays to your own needs, adding
holidays or deleting lists of holidays. The lists of holidays that
Emacs uses are for general holidays (@code{general-holidays}), local
holidays (@code{local-holidays}), Christian holidays
(@code{christian-holidays}), Hebrew (Jewish) holidays
(@code{hebrew-holidays}), Islamic (Moslem) holidays
(@code{islamic-holidays}), and other holidays (@code{other-holidays}).
You can customize these lists of holidays to your own needs, adding or
deleting holidays. The lists of holidays that Emacs uses are for
general holidays (@code{general-holidays}), local holidays
(@code{local-holidays}), Christian holidays (@code{christian-holidays}),
Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Moslem)
holidays (@code{islamic-holidays}), and other holidays
(@code{other-holidays}).
@vindex general-holidays
The general holidays are, by default, holidays common throughout the
......@@ -140,7 +141,7 @@ described below.
@vindex all-hebrew-calendar-holidays
@vindex all-islamic-calendar-holidays
By default, Emacs does not include all the holidays of the religions
that it knows; only those commonly found in secular calendars. For a
that it knows, only those commonly found in secular calendars. For a
more extensive collection of religious holidays, you can set any (or
all) of the variables @code{all-christian-calendar-holidays},
@code{all-hebrew-calendar-holidays}, or
......@@ -161,14 +162,13 @@ holidays. This list, normally empty, is intended for individual use.
sometimes a list of holidays).
Here is a table of the possible kinds of holiday form. Day numbers
and month numbers count starting from 1, but day-within-week numbers
and month numbers count starting from 1, but ``dayname'' numbers
count Sunday as 0. The element @var{string} is always the
name of the holiday, as a string.
@table @code
@item (holiday-fixed @var{month} @var{day} @var{string})
A fixed date on the Gregorian calendar; @var{month} and
@var{day} are numbers.
A fixed date on the Gregorian calendar.
@item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
......@@ -176,27 +176,27 @@ The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
from the end of the month.
@item (holiday-hebrew @var{month} @var{day} @var{string})
A fixed date on the Hebrew calendar; @var{month} and @var{day} are
numbers.
A fixed date on the Hebrew calendar.
@item (holiday-islamic @var{month} @var{day} @var{string})
A fixed date on the Islamic calendar; @var{month} and @var{day} are
numbers.
A fixed date on the Islamic calendar.
@item (holiday-julian @var{month} @var{day} @var{string})
A fixed date on the Julian calendar; @var{month} and @var{day} are
numbers.
A fixed date on the Julian calendar.
@item (holiday-sexp @var{sexp} @var{string})
A date calculated by the Lisp expression @var{sexp}. The expression
should use the variable @code{year} to compute the date of a holiday, or
@code{nil} if the holiday doesn't happen this year. The value of @var{sexp}
must represent the date as a list of the form @code{(@var{month} @var{day}
@var{year})}.
should use the variable @code{year} to compute and return the date of a
holiday, or @code{nil} if the holiday doesn't happen this year. The
value of @var{sexp} must represent the date as a list of the form
@code{(@var{month} @var{day} @var{year})}.
@item (if @var{condition} @var{holiday-form})
A holiday that happens only if @var{condition} is true.
@item (@var{function} @r{[}@var{args}@r{]})
A date calculated by the function @var{function}, called with arguments
@var{args}.
A list of dates calculated by the function @var{function}, called with
arguments @var{args}.
@end table
For example, suppose you want to add Bastille Day, celebrated in
......@@ -250,9 +250,9 @@ divisible by 4:
@smallexample
(holiday-sexp (if (= 0 (% year 4))
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 year))))))
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 year))))))
"US Presidential Election"))
@end smallexample
......@@ -286,13 +286,13 @@ visible in the calendar window, with descriptive strings, like this:
@section Date Display Format
@vindex calendar-date-display-form
You can customize the manner of displaying dates in the diary,
in mode lines, and in messages by setting
@code{calendar-date-display-form}. This variable holds a list of
expressions that can involve the variables @code{month}, @code{day}, and
@code{year}, all numbers in string form, and @code{monthname} and
@code{dayname}, both alphabetic strings. In the American style, the
default value of this list is as follows:
You can customize the manner of displaying dates in the diary, in mode
lines, and in messages by setting @code{calendar-date-display-form}.
This variable holds a list of expressions that can involve the variables
@code{month}, @code{day}, and @code{year}, which are all numbers in
string form, and @code{monthname} and @code{dayname}, which are both
alphabetic strings. In the American style, the default value of this
list is as follows:
@smallexample
((if dayname (concat dayname ", ")) monthname " " day ", " year)
......@@ -329,10 +329,10 @@ and either @samp{am} or @samp{pm}. If you prefer the European style,
also known in the US as military, in which the hours go from 00 to 23,
you can alter the variable @code{calendar-time-display-form}. This
variable is a list of expressions that can involve the variables
@code{12-hours}, @code{24-hours}, and @code{minutes}, all numbers in
string form, and @code{am-pm} and @code{time-zone}, both alphabetic
strings. The default value of @code{calendar-time-display-form} is as
follows:
@code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
numbers in string form, and @code{am-pm} and @code{time-zone}, which are
both alphabetic strings. The default value of
@code{calendar-time-display-form} is as follows:
@smallexample
(12-hours ":" minutes am-pm
......@@ -362,23 +362,24 @@ know which rules to use.
where you are; on these systems, Emacs gets the information it needs
from the system automatically. If some or all of this information is
missing, Emacs fills in the gaps with the rules currently used in
Cambridge, Massachusetts, which is the center of GNU's world. If the
default choice of rules is not appropriate for your location, you can
tell Emacs the rules to use by setting certain variables.
Cambridge, Massachusetts, which is the center of GNU's world.
@vindex calendar-daylight-savings-starts
@vindex calendar-daylight-savings-ends
These variables are @code{calendar-daylight-savings-starts} together
with @code{calendar-daylight-savings-ends}. Their values should be Lisp
If the default choice of rules is not appropriate for your location,
you can tell Emacs the rules to use by setting the variables
@code{calendar-daylight-savings-starts} and
@code{calendar-daylight-savings-ends}. Their values should be Lisp
expressions that refer to the variable @code{year}, and evaluate to the
Gregorian date on which daylight savings time starts or (respectively)
ends, in the form of a list @code{(@var{month} @var{day} @var{year})}.
The values should be @code{nil} if your area does not use daylight
savings time.
Emacs uses these expressions to determine the starting date of
daylight savings time for the holiday list and for correcting times of
day in the solar and lunar calculations.
Emacs uses these expressions to determine the start and end dates of
daylight savings time as holidays and for correcting times of day in the
solar and lunar calculations.
The values for Cambridge, Massachusetts are as follows:
......@@ -450,11 +451,11 @@ initial display when @code{view-diary-entries-initially} is @code{t}, as
well as the command @kbd{M-x diary}. For example, the default value is
1, which says to display only the current day's diary entries. If the
value is 2, both the current day's and the next day's entries are
displayed. The value can also be a vector of seven elements: if the
value is @code{[0 2 2 2 2 4 1]} then no diary entries appear on Sunday,
the current date's and the next day's diary entries appear Monday
through Thursday, Friday through Monday's entries appear on Friday,
while on Saturday only that day's entries appear.
displayed. The value can also be a vector of seven elements: for
example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
appear on Sunday, the current date's and the next day's diary entries
appear Monday through Thursday, Friday through Monday's entries appear
on Friday, while on Saturday only that day's entries appear.
@vindex print-diary-entries-hook
@findex print-diary-entries
......@@ -591,7 +592,7 @@ Add a diary entry for the Hebrew date corresponding to the selected date
@item i h m
Add a diary entry for the day of the Hebrew month corresponding to the
selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
entry matches any date which has the same Hebrew day-within-month as the
entry matches any date that has the same Hebrew day-within-month as the
selected date.
@item i h y
Add a diary entry for the day of the Hebrew year corresponding to the
......@@ -616,7 +617,7 @@ selected date (@code{insert-yearly-islamic-diary-entry}).
@findex insert-monthly-islamic-diary-entry
@findex insert-yearly-islamic-diary-entry
These commands work much like the corresponding commands for ordinary
diary entries: they apply to the date that point is on, in the calendar
diary entries: they apply to the date that point is on in the calendar
window, and what they do is insert just the date portion of a diary entry
at the end of your diary file. You must then insert the rest of the
diary entry.
......@@ -683,7 +684,7 @@ that apply to all of them. Lines in the diary file of this form:
@noindent
includes the diary entries from the file @var{filename} in the fancy
diary buffer The include mechanism is recursive, so that included files
diary buffer. The include mechanism is recursive, so that included files
can include other files, and so on; you must be careful not to have a
cycle of inclusions, of course. Here is how to enable the include
facility:
......@@ -765,7 +766,7 @@ to find the date being considered; its value is a list (@var{month}
@var{day} @var{year}) that refers to the Gregorian calendar.
Suppose you get paid on the 21st of the month if it is a weekday, and
to the Friday before if the 21st is on a weekend. Here is how to write
on the Friday before if the 21st is on a weekend. Here is how to write
a sexp diary entry that matches those dates:
@smallexample
......@@ -827,8 +828,8 @@ Hebrew calendar, if you are using the fancy diary display. (With simple
diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
diary for any date, but does nothing particularly useful.)
These functions can be used in sexp diary entries based on the Hebrew
calendar in certain standard ways:
These functions can be used to construct sexp diary entries based on
the Hebrew calendar in certain standard ways:
@cindex rosh hodesh
@findex diary-rosh-hodesh
......@@ -862,9 +863,8 @@ the European style, the order of the parameters is changed to @var{day},
@node Appt Customizing
@section Customizing Appointment Reminders
You can specify exactly how Emacs reminds you of an appointment and
how far in advance it begins doing so. Here are the variables that you
can set:
You can specify exactly how Emacs reminds you of an appointment, and
how far in advance it begins doing so, by setting these variables:
@vindex appt-message-warning-time
@vindex appt-audible
......@@ -883,7 +883,7 @@ If this is non-@code{nil}, Emacs rings the
terminal bell for appointment reminders. The default is @code{t}.
@item appt-visible
If this is non-@code{nil}, Emacs displays the appointment
message in echo area. The default is @code{t}.
message in the echo area. The default is @code{t}.
@item appt-display-mode-line
If this is non-@code{nil}, Emacs displays the number of minutes
to the appointment on the mode line. The default is @code{t}.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment