changeset 7688:ab6b8aa5002e

entered into RCS
author Richard M. Stallman <rms@gnu.org>
date Thu, 26 May 1994 05:45:30 +0000
parents 6447f9b3c966
children 48867d3871d5
files lispref/abbrevs.texi lispref/calendar.texi
diffstat 2 files changed, 112 insertions(+), 99 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/abbrevs.texi	Thu May 26 05:06:14 1994 +0000
+++ b/lispref/abbrevs.texi	Thu May 26 05:45:30 1994 +0000
@@ -19,15 +19,15 @@
 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 @@
 @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 @@
 
 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 @@
 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 @@
 @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 @@
 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 @@
 
 @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 @@
 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 @@
 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 @@
 @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 @@
 ;; @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 @@
 @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
--- a/lispref/calendar.texi	Thu May 26 05:06:14 1994 +0000
+++ b/lispref/calendar.texi	Thu May 26 05:45:30 1994 +0000
@@ -38,13 +38,14 @@
 @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 @@
 @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 @@
 @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 @@
 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 @@
 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 @@
 @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 @@
 @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 @@
 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 @@
 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 @@
 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 @@
 @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 @@
 @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 @@
 
 @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 @@
 @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 @@
 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 @@
 @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 @@
 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}.