diff options
| author | Richard M. Stallman | 1994-05-26 05:45:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-26 05:45:30 +0000 |
| commit | bea169e96c70b9982327c82087ff41ddb64c1bf9 (patch) | |
| tree | 82e024a06f09d3c5ed1840e16249806ca6108e5a | |
| parent | dc509e648d6f9d4486063d5b0c9b34987d50abc3 (diff) | |
| download | emacs-bea169e96c70b9982327c82087ff41ddb64c1bf9.tar.gz emacs-bea169e96c70b9982327c82087ff41ddb64c1bf9.zip | |
entered into RCS
| -rw-r--r-- | lispref/abbrevs.texi | 85 | ||||
| -rw-r--r-- | lispref/calendar.texi | 126 |
2 files changed, 112 insertions, 99 deletions
diff --git a/lispref/abbrevs.texi b/lispref/abbrevs.texi index 59e1995a4d5..914e2659450 100644 --- a/lispref/abbrevs.texi +++ b/lispref/abbrevs.texi | |||
| @@ -19,15 +19,15 @@ in the same major mode share one abbrev table. There is also a global | |||
| 19 | abbrev table. Normally both are used. | 19 | abbrev table. Normally both are used. |
| 20 | 20 | ||
| 21 | An abbrev table is represented as an obarray containing a symbol for | 21 | An abbrev table is represented as an obarray containing a symbol for |
| 22 | each abbreviation. The symbol's name is the abbreviation. Its value is | 22 | each abbreviation. The symbol's name is the abbreviation; its value is |
| 23 | the expansion; its function definition is the hook function to do the | 23 | the expansion; its function definition is the hook function to do the |
| 24 | expansion (if any); its property list cell contains the use count, the | 24 | expansion (@pxref{Defining Abbrevs}); its property list cell contains |
| 25 | number of times the abbreviation has been expanded. Because these | 25 | the use count, the number of times the abbreviation has been expanded. |
| 26 | symbols are not interned in the usual obarray, they will never appear as | 26 | Because these symbols are not interned in the usual obarray, they will |
| 27 | the result of reading a Lisp expression; in fact, normally they are | 27 | never appear as the result of reading a Lisp expression; in fact, |
| 28 | never used except by the code that handles abbrevs. Therefore, it is | 28 | normally they are never used except by the code that handles abbrevs. |
| 29 | safe to use them in an extremely nonstandard way. @xref{Creating | 29 | Therefore, it is safe to use them in an extremely nonstandard way. |
| 30 | Symbols}. | 30 | @xref{Creating Symbols}. |
| 31 | 31 | ||
| 32 | For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev | 32 | For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev |
| 33 | Mode, emacs, The GNU Emacs Manual}. | 33 | Mode, emacs, The GNU Emacs Manual}. |
| @@ -58,7 +58,7 @@ This variable automatically becomes local when set in any fashion. | |||
| 58 | @end defvar | 58 | @end defvar |
| 59 | 59 | ||
| 60 | @defvar default-abbrev-mode | 60 | @defvar default-abbrev-mode |
| 61 | This is the value @code{abbrev-mode} for buffers that do not override it. | 61 | This is the value of @code{abbrev-mode} for buffers that do not override it. |
| 62 | This is the same as @code{(default-value 'abbrev-mode)}. | 62 | This is the same as @code{(default-value 'abbrev-mode)}. |
| 63 | @end defvar | 63 | @end defvar |
| 64 | 64 | ||
| @@ -97,7 +97,7 @@ abbrev table. The value is always @code{nil}. | |||
| 97 | 97 | ||
| 98 | If @var{human} is non-@code{nil}, the description is human-oriented. | 98 | If @var{human} is non-@code{nil}, the description is human-oriented. |
| 99 | Otherwise the description is a Lisp expression---a call to | 99 | Otherwise the description is a Lisp expression---a call to |
| 100 | @code{define-abbrev-table} which would define @var{name} exactly as it | 100 | @code{define-abbrev-table} that would define @var{name} exactly as it |
| 101 | is currently defined. | 101 | is currently defined. |
| 102 | @end defun | 102 | @end defun |
| 103 | 103 | ||
| @@ -111,13 +111,14 @@ is currently defined. | |||
| 111 | user. | 111 | user. |
| 112 | 112 | ||
| 113 | @defun add-abbrev table type arg | 113 | @defun add-abbrev table type arg |
| 114 | This function adds an abbreviation to abbrev table @var{table}. The | 114 | This function adds an abbreviation to abbrev table @var{table} based on |
| 115 | argument @var{type} is a string describing in English the kind of abbrev | 115 | information from the user. The argument @var{type} is a string |
| 116 | this will be (typically, @code{"global"} or @code{"mode-specific"}); | 116 | describing in English the kind of abbrev this will be (typically, |
| 117 | this is used in prompting the user. The argument @var{arg} is the | 117 | @code{"global"} or @code{"mode-specific"}); this is used in prompting |
| 118 | number of words in the expansion. | 118 | the user. The argument @var{arg} is the number of words in the |
| 119 | expansion. | ||
| 119 | 120 | ||
| 120 | The return value is the symbol which internally represents the new | 121 | The return value is the symbol that internally represents the new |
| 121 | abbrev, or @code{nil} if the user declines to confirm redefining an | 122 | abbrev, or @code{nil} if the user declines to confirm redefining an |
| 122 | existing abbrev. | 123 | existing abbrev. |
| 123 | @end defun | 124 | @end defun |
| @@ -125,17 +126,17 @@ existing abbrev. | |||
| 125 | @defun define-abbrev table name expansion hook | 126 | @defun define-abbrev table name expansion hook |
| 126 | This function defines an abbrev in @var{table} named @var{name}, to | 127 | This function defines an abbrev in @var{table} named @var{name}, to |
| 127 | expand to @var{expansion}, and call @var{hook}. The return value is an | 128 | expand to @var{expansion}, and call @var{hook}. The return value is an |
| 128 | uninterned symbol which represents the abbrev inside Emacs; its name is | 129 | uninterned symbol that represents the abbrev inside Emacs; its name is |
| 129 | @var{name}. | 130 | @var{name}. |
| 130 | 131 | ||
| 131 | The argument @var{name} should be a string. The argument | 132 | The argument @var{name} should be a string. The argument |
| 132 | @var{expansion} should be a string, or @code{nil}, to undefine the | 133 | @var{expansion} should be a string, or @code{nil} to undefine the |
| 133 | abbrev. | 134 | abbrev. |
| 134 | 135 | ||
| 135 | The argument @var{hook} is a function or @code{nil}. If @var{hook} is | 136 | The argument @var{hook} is a function or @code{nil}. If @var{hook} is |
| 136 | non-@code{nil}, then it is called with no arguments after the abbrev is | 137 | non-@code{nil}, then it is called with no arguments after the abbrev is |
| 137 | replaced with @var{expansion}; point is located at the end of | 138 | replaced with @var{expansion}; point is located at the end of |
| 138 | @var{expansion}. | 139 | @var{expansion} when @var{hook} is called. |
| 139 | 140 | ||
| 140 | The use count of the abbrev is initialized to zero. | 141 | The use count of the abbrev is initialized to zero. |
| 141 | @end defun | 142 | @end defun |
| @@ -144,7 +145,7 @@ The use count of the abbrev is initialized to zero. | |||
| 144 | If this variable is non-@code{nil}, it means that the user plans to use | 145 | If this variable is non-@code{nil}, it means that the user plans to use |
| 145 | global abbrevs only. This tells the commands that define mode-specific | 146 | global abbrevs only. This tells the commands that define mode-specific |
| 146 | abbrevs to define global ones instead. This variable does not alter the | 147 | abbrevs to define global ones instead. This variable does not alter the |
| 147 | functioning of the functions in this section; it is examined by their | 148 | behavior of the functions in this section; it is examined by their |
| 148 | callers. | 149 | callers. |
| 149 | @end defopt | 150 | @end defopt |
| 150 | 151 | ||
| @@ -189,7 +190,7 @@ save your abbrevs. | |||
| 189 | 190 | ||
| 190 | @deffn Command write-abbrev-file filename | 191 | @deffn Command write-abbrev-file filename |
| 191 | Save all abbrev definitions, in all abbrev tables, in the file | 192 | Save all abbrev definitions, in all abbrev tables, in the file |
| 192 | @var{filename}, in the form of a Lisp program which when loaded will | 193 | @var{filename}, in the form of a Lisp program that when loaded will |
| 193 | define the same abbrevs. This function returns @code{nil}. | 194 | define the same abbrevs. This function returns @code{nil}. |
| 194 | @end deffn | 195 | @end deffn |
| 195 | 196 | ||
| @@ -211,6 +212,26 @@ first the current buffer's local abbrev table, and second the global | |||
| 211 | abbrev table. | 212 | abbrev table. |
| 212 | @end defun | 213 | @end defun |
| 213 | 214 | ||
| 215 | @defun abbrev-expansion abbrev &optional table | ||
| 216 | This function returns the string that @var{abbrev} would expand into (as | ||
| 217 | defined by the abbrev tables used for the current buffer). The optional | ||
| 218 | argument @var{table} specifies the abbrev table to use, as in | ||
| 219 | @code{abbrev-symbol}. | ||
| 220 | @end defun | ||
| 221 | |||
| 222 | @deffn Command expand-abbrev | ||
| 223 | This command expands the abbrev before point, if any. | ||
| 224 | If point does not follow an abbrev, this command does nothing. | ||
| 225 | The command returns @code{t} if it did expansion, @code{nil} otherwise. | ||
| 226 | @end deffn | ||
| 227 | |||
| 228 | @deffn Command abbrev-prefix-mark &optional arg | ||
| 229 | Mark current point as the beginning of an abbrev. The next call to | ||
| 230 | @code{expand-abbrev} will use the text from here to point (where it is | ||
| 231 | then) as the abbrev to expand, rather than using the previous word as | ||
| 232 | usual. | ||
| 233 | @end deffn | ||
| 234 | |||
| 214 | @defopt abbrev-all-caps | 235 | @defopt abbrev-all-caps |
| 215 | When this is set non-@code{nil}, an abbrev entered entirely in upper | 236 | When this is set non-@code{nil}, an abbrev entered entirely in upper |
| 216 | case is expanded using all upper case. Otherwise, an abbrev entered | 237 | 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 | |||
| 218 | expansion. | 239 | expansion. |
| 219 | @end defopt | 240 | @end defopt |
| 220 | 241 | ||
| 221 | @defun abbrev-expansion abbrev &optional table | ||
| 222 | This function returns the string that @var{abbrev} would expand into (as | ||
| 223 | defined by the abbrev tables used for the current buffer). The optional | ||
| 224 | argument @var{table} specifies the abbrev table to use; if it is | ||
| 225 | specified, the abbrev is looked up in that table only. | ||
| 226 | @end defun | ||
| 227 | |||
| 228 | @defvar abbrev-start-location | 242 | @defvar abbrev-start-location |
| 229 | This is the buffer position for @code{expand-abbrev} to use as the start | 243 | This is the buffer position for @code{expand-abbrev} to use as the start |
| 230 | of the next abbrev to be expanded. (@code{nil} means use the word | 244 | 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 | |||
| 253 | @end defvar | 267 | @end defvar |
| 254 | 268 | ||
| 255 | @defvar last-abbrev-text | 269 | @defvar last-abbrev-text |
| 256 | This is the exact expansion text of the last abbrev expanded, as | 270 | This is the exact expansion text of the last abbrev expanded, after case |
| 257 | results from case conversion. Its value is | 271 | conversion (if any). Its value is @code{nil} if the abbrev has already |
| 258 | @code{nil} if the abbrev has already been unexpanded. This | 272 | been unexpanded. This contains information left by @code{expand-abbrev} |
| 259 | contains information left by @code{expand-abbrev} for the sake of the | 273 | for the sake of the @code{unexpand-abbrev} command. |
| 260 | @code{unexpand-abbrev} command. | ||
| 261 | @end defvar | 274 | @end defvar |
| 262 | 275 | ||
| 263 | @c Emacs 19 feature | 276 | @c Emacs 19 feature |
| @@ -284,7 +297,7 @@ aborts expansion if it is not confirmed. | |||
| 284 | ;; @r{user entered some other character, this function asks whether} | 297 | ;; @r{user entered some other character, this function asks whether} |
| 285 | ;; @r{expansion should continue.} | 298 | ;; @r{expansion should continue.} |
| 286 | 299 | ||
| 287 | ;; @r{If the user enters the prompt with @kbd{y}, the function returns} | 300 | ;; @r{If the user answers the prompt with @kbd{y}, the function returns} |
| 288 | ;; @r{@code{nil} (because of the @code{not} function), but that is} | 301 | ;; @r{@code{nil} (because of the @code{not} function), but that is} |
| 289 | ;; @r{acceptable; the return value has no effect on expansion.} | 302 | ;; @r{acceptable; the return value has no effect on expansion.} |
| 290 | 303 | ||
| @@ -314,8 +327,8 @@ abbreviation table of the current buffer. | |||
| 314 | @end defvar | 327 | @end defvar |
| 315 | 328 | ||
| 316 | @defvar fundamental-mode-abbrev-table | 329 | @defvar fundamental-mode-abbrev-table |
| 317 | This is the local abbrev table used in Fundamental mode. It is the | 330 | This is the local abbrev table used in Fundamental mode; in other words, |
| 318 | local abbrev table in all buffers in Fundamental mode. | 331 | it is the local abbrev table in all buffers in Fundamental mode. |
| 319 | @end defvar | 332 | @end defvar |
| 320 | 333 | ||
| 321 | @defvar text-mode-abbrev-table | 334 | @defvar text-mode-abbrev-table |
diff --git a/lispref/calendar.texi b/lispref/calendar.texi index 4fc44eac53c..211e675ddec 100644 --- a/lispref/calendar.texi +++ b/lispref/calendar.texi | |||
| @@ -38,13 +38,14 @@ your @file{.emacs} file:@refill | |||
| 38 | @end example | 38 | @end example |
| 39 | 39 | ||
| 40 | @noindent | 40 | @noindent |
| 41 | they display both the calendar and diary windows whenever you start Emacs. | 41 | this displays both the calendar and diary windows whenever you start Emacs. |
| 42 | 42 | ||
| 43 | @vindex view-calendar-holidays-initially | 43 | @vindex view-calendar-holidays-initially |
| 44 | Similarly, if you set the variable | 44 | Similarly, if you set the variable |
| 45 | @code{view-calendar-holidays-initially} to @code{t}, entering the | 45 | @code{view-calendar-holidays-initially} to @code{t}, entering the |
| 46 | calendar automatically displays a list of holidays for the current three | 46 | calendar automatically displays a list of holidays for the current |
| 47 | month period. The holiday list appears in a separate window.@refill | 47 | three-month period. The holiday list appears in a separate |
| 48 | window. | ||
| 48 | 49 | ||
| 49 | @vindex mark-diary-entries-in-calendar | 50 | @vindex mark-diary-entries-in-calendar |
| 50 | You can set the variable @code{mark-diary-entries-in-calendar} to | 51 | 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. | |||
| 118 | @vindex hebrew-holidays | 119 | @vindex hebrew-holidays |
| 119 | @vindex islamic-holidays | 120 | @vindex islamic-holidays |
| 120 | Emacs knows about holidays defined by entries on one of several lists. | 121 | Emacs knows about holidays defined by entries on one of several lists. |
| 121 | You can customize theses lists of holidays to your own needs, adding | 122 | You can customize these lists of holidays to your own needs, adding or |
| 122 | holidays or deleting lists of holidays. The lists of holidays that | 123 | deleting holidays. The lists of holidays that Emacs uses are for |
| 123 | Emacs uses are for general holidays (@code{general-holidays}), local | 124 | general holidays (@code{general-holidays}), local holidays |
| 124 | holidays (@code{local-holidays}), Christian holidays | 125 | (@code{local-holidays}), Christian holidays (@code{christian-holidays}), |
| 125 | (@code{christian-holidays}), Hebrew (Jewish) holidays | 126 | Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Moslem) |
| 126 | (@code{hebrew-holidays}), Islamic (Moslem) holidays | 127 | holidays (@code{islamic-holidays}), and other holidays |
| 127 | (@code{islamic-holidays}), and other holidays (@code{other-holidays}). | 128 | (@code{other-holidays}). |
| 128 | 129 | ||
| 129 | @vindex general-holidays | 130 | @vindex general-holidays |
| 130 | The general holidays are, by default, holidays common throughout the | 131 | The general holidays are, by default, holidays common throughout the |
| @@ -140,7 +141,7 @@ described below. | |||
| 140 | @vindex all-hebrew-calendar-holidays | 141 | @vindex all-hebrew-calendar-holidays |
| 141 | @vindex all-islamic-calendar-holidays | 142 | @vindex all-islamic-calendar-holidays |
| 142 | By default, Emacs does not include all the holidays of the religions | 143 | By default, Emacs does not include all the holidays of the religions |
| 143 | that it knows; only those commonly found in secular calendars. For a | 144 | that it knows, only those commonly found in secular calendars. For a |
| 144 | more extensive collection of religious holidays, you can set any (or | 145 | more extensive collection of religious holidays, you can set any (or |
| 145 | all) of the variables @code{all-christian-calendar-holidays}, | 146 | all) of the variables @code{all-christian-calendar-holidays}, |
| 146 | @code{all-hebrew-calendar-holidays}, or | 147 | @code{all-hebrew-calendar-holidays}, or |
| @@ -161,14 +162,13 @@ holidays. This list, normally empty, is intended for individual use. | |||
| 161 | sometimes a list of holidays). | 162 | sometimes a list of holidays). |
| 162 | 163 | ||
| 163 | Here is a table of the possible kinds of holiday form. Day numbers | 164 | Here is a table of the possible kinds of holiday form. Day numbers |
| 164 | and month numbers count starting from 1, but day-within-week numbers | 165 | and month numbers count starting from 1, but ``dayname'' numbers |
| 165 | count Sunday as 0. The element @var{string} is always the | 166 | count Sunday as 0. The element @var{string} is always the |
| 166 | name of the holiday, as a string. | 167 | name of the holiday, as a string. |
| 167 | 168 | ||
| 168 | @table @code | 169 | @table @code |
| 169 | @item (holiday-fixed @var{month} @var{day} @var{string}) | 170 | @item (holiday-fixed @var{month} @var{day} @var{string}) |
| 170 | A fixed date on the Gregorian calendar; @var{month} and | 171 | A fixed date on the Gregorian calendar. |
| 171 | @var{day} are numbers. | ||
| 172 | 172 | ||
| 173 | @item (holiday-float @var{month} @var{dayname} @var{k} @var{string}) | 173 | @item (holiday-float @var{month} @var{dayname} @var{k} @var{string}) |
| 174 | The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar | 174 | 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 | |||
| 176 | from the end of the month. | 176 | from the end of the month. |
| 177 | 177 | ||
| 178 | @item (holiday-hebrew @var{month} @var{day} @var{string}) | 178 | @item (holiday-hebrew @var{month} @var{day} @var{string}) |
| 179 | A fixed date on the Hebrew calendar; @var{month} and @var{day} are | 179 | A fixed date on the Hebrew calendar. |
| 180 | numbers. | ||
| 181 | 180 | ||
| 182 | @item (holiday-islamic @var{month} @var{day} @var{string}) | 181 | @item (holiday-islamic @var{month} @var{day} @var{string}) |
| 183 | A fixed date on the Islamic calendar; @var{month} and @var{day} are | 182 | A fixed date on the Islamic calendar. |
| 184 | numbers. | ||
| 185 | 183 | ||
| 186 | @item (holiday-julian @var{month} @var{day} @var{string}) | 184 | @item (holiday-julian @var{month} @var{day} @var{string}) |
| 187 | A fixed date on the Julian calendar; @var{month} and @var{day} are | 185 | A fixed date on the Julian calendar. |
| 188 | numbers. | ||
| 189 | 186 | ||
| 190 | @item (holiday-sexp @var{sexp} @var{string}) | 187 | @item (holiday-sexp @var{sexp} @var{string}) |
| 191 | A date calculated by the Lisp expression @var{sexp}. The expression | 188 | A date calculated by the Lisp expression @var{sexp}. The expression |
| 192 | should use the variable @code{year} to compute the date of a holiday, or | 189 | should use the variable @code{year} to compute and return the date of a |
| 193 | @code{nil} if the holiday doesn't happen this year. The value of @var{sexp} | 190 | holiday, or @code{nil} if the holiday doesn't happen this year. The |
| 194 | must represent the date as a list of the form @code{(@var{month} @var{day} | 191 | value of @var{sexp} must represent the date as a list of the form |
| 195 | @var{year})}. | 192 | @code{(@var{month} @var{day} @var{year})}. |
| 193 | |||
| 194 | @item (if @var{condition} @var{holiday-form}) | ||
| 195 | A holiday that happens only if @var{condition} is true. | ||
| 196 | 196 | ||
| 197 | @item (@var{function} @r{[}@var{args}@r{]}) | 197 | @item (@var{function} @r{[}@var{args}@r{]}) |
| 198 | A date calculated by the function @var{function}, called with arguments | 198 | A list of dates calculated by the function @var{function}, called with |
| 199 | @var{args}. | 199 | arguments @var{args}. |
| 200 | @end table | 200 | @end table |
| 201 | 201 | ||
| 202 | For example, suppose you want to add Bastille Day, celebrated in | 202 | For example, suppose you want to add Bastille Day, celebrated in |
| @@ -250,9 +250,9 @@ divisible by 4: | |||
| 250 | @smallexample | 250 | @smallexample |
| 251 | (holiday-sexp (if (= 0 (% year 4)) | 251 | (holiday-sexp (if (= 0 (% year 4)) |
| 252 | (calendar-gregorian-from-absolute | 252 | (calendar-gregorian-from-absolute |
| 253 | (1+ (calendar-dayname-on-or-before | 253 | (1+ (calendar-dayname-on-or-before |
| 254 | 1 (+ 6 (calendar-absolute-from-gregorian | 254 | 1 (+ 6 (calendar-absolute-from-gregorian |
| 255 | (list 11 1 year)))))) | 255 | (list 11 1 year)))))) |
| 256 | "US Presidential Election")) | 256 | "US Presidential Election")) |
| 257 | @end smallexample | 257 | @end smallexample |
| 258 | 258 | ||
| @@ -286,13 +286,13 @@ visible in the calendar window, with descriptive strings, like this: | |||
| 286 | @section Date Display Format | 286 | @section Date Display Format |
| 287 | @vindex calendar-date-display-form | 287 | @vindex calendar-date-display-form |
| 288 | 288 | ||
| 289 | You can customize the manner of displaying dates in the diary, | 289 | You can customize the manner of displaying dates in the diary, in mode |
| 290 | in mode lines, and in messages by setting | 290 | lines, and in messages by setting @code{calendar-date-display-form}. |
| 291 | @code{calendar-date-display-form}. This variable holds a list of | 291 | This variable holds a list of expressions that can involve the variables |
| 292 | expressions that can involve the variables @code{month}, @code{day}, and | 292 | @code{month}, @code{day}, and @code{year}, which are all numbers in |
| 293 | @code{year}, all numbers in string form, and @code{monthname} and | 293 | string form, and @code{monthname} and @code{dayname}, which are both |
| 294 | @code{dayname}, both alphabetic strings. In the American style, the | 294 | alphabetic strings. In the American style, the default value of this |
| 295 | default value of this list is as follows: | 295 | list is as follows: |
| 296 | 296 | ||
| 297 | @smallexample | 297 | @smallexample |
| 298 | ((if dayname (concat dayname ", ")) monthname " " day ", " year) | 298 | ((if dayname (concat dayname ", ")) monthname " " day ", " year) |
| @@ -329,10 +329,10 @@ and either @samp{am} or @samp{pm}. If you prefer the European style, | |||
| 329 | also known in the US as military, in which the hours go from 00 to 23, | 329 | also known in the US as military, in which the hours go from 00 to 23, |
| 330 | you can alter the variable @code{calendar-time-display-form}. This | 330 | you can alter the variable @code{calendar-time-display-form}. This |
| 331 | variable is a list of expressions that can involve the variables | 331 | variable is a list of expressions that can involve the variables |
| 332 | @code{12-hours}, @code{24-hours}, and @code{minutes}, all numbers in | 332 | @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all |
| 333 | string form, and @code{am-pm} and @code{time-zone}, both alphabetic | 333 | numbers in string form, and @code{am-pm} and @code{time-zone}, which are |
| 334 | strings. The default value of @code{calendar-time-display-form} is as | 334 | both alphabetic strings. The default value of |
| 335 | follows: | 335 | @code{calendar-time-display-form} is as follows: |
| 336 | 336 | ||
| 337 | @smallexample | 337 | @smallexample |
| 338 | (12-hours ":" minutes am-pm | 338 | (12-hours ":" minutes am-pm |
| @@ -362,23 +362,24 @@ know which rules to use. | |||
| 362 | where you are; on these systems, Emacs gets the information it needs | 362 | where you are; on these systems, Emacs gets the information it needs |
| 363 | from the system automatically. If some or all of this information is | 363 | from the system automatically. If some or all of this information is |
| 364 | missing, Emacs fills in the gaps with the rules currently used in | 364 | missing, Emacs fills in the gaps with the rules currently used in |
| 365 | Cambridge, Massachusetts, which is the center of GNU's world. If the | 365 | Cambridge, Massachusetts, which is the center of GNU's world. |
| 366 | default choice of rules is not appropriate for your location, you can | 366 | |
| 367 | tell Emacs the rules to use by setting certain variables. | ||
| 368 | 367 | ||
| 369 | @vindex calendar-daylight-savings-starts | 368 | @vindex calendar-daylight-savings-starts |
| 370 | @vindex calendar-daylight-savings-ends | 369 | @vindex calendar-daylight-savings-ends |
| 371 | These variables are @code{calendar-daylight-savings-starts} together | 370 | If the default choice of rules is not appropriate for your location, |
| 372 | with @code{calendar-daylight-savings-ends}. Their values should be Lisp | 371 | you can tell Emacs the rules to use by setting the variables |
| 372 | @code{calendar-daylight-savings-starts} and | ||
| 373 | @code{calendar-daylight-savings-ends}. Their values should be Lisp | ||
| 373 | expressions that refer to the variable @code{year}, and evaluate to the | 374 | expressions that refer to the variable @code{year}, and evaluate to the |
| 374 | Gregorian date on which daylight savings time starts or (respectively) | 375 | Gregorian date on which daylight savings time starts or (respectively) |
| 375 | ends, in the form of a list @code{(@var{month} @var{day} @var{year})}. | 376 | ends, in the form of a list @code{(@var{month} @var{day} @var{year})}. |
| 376 | The values should be @code{nil} if your area does not use daylight | 377 | The values should be @code{nil} if your area does not use daylight |
| 377 | savings time. | 378 | savings time. |
| 378 | 379 | ||
| 379 | Emacs uses these expressions to determine the starting date of | 380 | Emacs uses these expressions to determine the start and end dates of |
| 380 | daylight savings time for the holiday list and for correcting times of | 381 | daylight savings time as holidays and for correcting times of day in the |
| 381 | day in the solar and lunar calculations. | 382 | solar and lunar calculations. |
| 382 | 383 | ||
| 383 | The values for Cambridge, Massachusetts are as follows: | 384 | The values for Cambridge, Massachusetts are as follows: |
| 384 | 385 | ||
| @@ -450,11 +451,11 @@ initial display when @code{view-diary-entries-initially} is @code{t}, as | |||
| 450 | well as the command @kbd{M-x diary}. For example, the default value is | 451 | well as the command @kbd{M-x diary}. For example, the default value is |
| 451 | 1, which says to display only the current day's diary entries. If the | 452 | 1, which says to display only the current day's diary entries. If the |
| 452 | value is 2, both the current day's and the next day's entries are | 453 | value is 2, both the current day's and the next day's entries are |
| 453 | displayed. The value can also be a vector of seven elements: if the | 454 | displayed. The value can also be a vector of seven elements: for |
| 454 | value is @code{[0 2 2 2 2 4 1]} then no diary entries appear on Sunday, | 455 | example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries |
| 455 | the current date's and the next day's diary entries appear Monday | 456 | appear on Sunday, the current date's and the next day's diary entries |
| 456 | through Thursday, Friday through Monday's entries appear on Friday, | 457 | appear Monday through Thursday, Friday through Monday's entries appear |
| 457 | while on Saturday only that day's entries appear. | 458 | on Friday, while on Saturday only that day's entries appear. |
| 458 | 459 | ||
| 459 | @vindex print-diary-entries-hook | 460 | @vindex print-diary-entries-hook |
| 460 | @findex print-diary-entries | 461 | @findex print-diary-entries |
| @@ -591,7 +592,7 @@ Add a diary entry for the Hebrew date corresponding to the selected date | |||
| 591 | @item i h m | 592 | @item i h m |
| 592 | Add a diary entry for the day of the Hebrew month corresponding to the | 593 | Add a diary entry for the day of the Hebrew month corresponding to the |
| 593 | selected date (@code{insert-monthly-hebrew-diary-entry}). This diary | 594 | selected date (@code{insert-monthly-hebrew-diary-entry}). This diary |
| 594 | entry matches any date which has the same Hebrew day-within-month as the | 595 | entry matches any date that has the same Hebrew day-within-month as the |
| 595 | selected date. | 596 | selected date. |
| 596 | @item i h y | 597 | @item i h y |
| 597 | Add a diary entry for the day of the Hebrew year corresponding to the | 598 | 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}). | |||
| 616 | @findex insert-monthly-islamic-diary-entry | 617 | @findex insert-monthly-islamic-diary-entry |
| 617 | @findex insert-yearly-islamic-diary-entry | 618 | @findex insert-yearly-islamic-diary-entry |
| 618 | These commands work much like the corresponding commands for ordinary | 619 | These commands work much like the corresponding commands for ordinary |
| 619 | diary entries: they apply to the date that point is on, in the calendar | 620 | diary entries: they apply to the date that point is on in the calendar |
| 620 | window, and what they do is insert just the date portion of a diary entry | 621 | window, and what they do is insert just the date portion of a diary entry |
| 621 | at the end of your diary file. You must then insert the rest of the | 622 | at the end of your diary file. You must then insert the rest of the |
| 622 | diary entry. | 623 | diary entry. |
| @@ -683,7 +684,7 @@ that apply to all of them. Lines in the diary file of this form: | |||
| 683 | 684 | ||
| 684 | @noindent | 685 | @noindent |
| 685 | includes the diary entries from the file @var{filename} in the fancy | 686 | includes the diary entries from the file @var{filename} in the fancy |
| 686 | diary buffer The include mechanism is recursive, so that included files | 687 | diary buffer. The include mechanism is recursive, so that included files |
| 687 | can include other files, and so on; you must be careful not to have a | 688 | can include other files, and so on; you must be careful not to have a |
| 688 | cycle of inclusions, of course. Here is how to enable the include | 689 | cycle of inclusions, of course. Here is how to enable the include |
| 689 | facility: | 690 | facility: |
| @@ -765,7 +766,7 @@ to find the date being considered; its value is a list (@var{month} | |||
| 765 | @var{day} @var{year}) that refers to the Gregorian calendar. | 766 | @var{day} @var{year}) that refers to the Gregorian calendar. |
| 766 | 767 | ||
| 767 | Suppose you get paid on the 21st of the month if it is a weekday, and | 768 | Suppose you get paid on the 21st of the month if it is a weekday, and |
| 768 | to the Friday before if the 21st is on a weekend. Here is how to write | 769 | on the Friday before if the 21st is on a weekend. Here is how to write |
| 769 | a sexp diary entry that matches those dates: | 770 | a sexp diary entry that matches those dates: |
| 770 | 771 | ||
| 771 | @smallexample | 772 | @smallexample |
| @@ -827,8 +828,8 @@ Hebrew calendar, if you are using the fancy diary display. (With simple | |||
| 827 | diary display, the line @samp{&%%(diary-hebrew-date)} appears in the | 828 | diary display, the line @samp{&%%(diary-hebrew-date)} appears in the |
| 828 | diary for any date, but does nothing particularly useful.) | 829 | diary for any date, but does nothing particularly useful.) |
| 829 | 830 | ||
| 830 | These functions can be used in sexp diary entries based on the Hebrew | 831 | These functions can be used to construct sexp diary entries based on |
| 831 | calendar in certain standard ways: | 832 | the Hebrew calendar in certain standard ways: |
| 832 | 833 | ||
| 833 | @cindex rosh hodesh | 834 | @cindex rosh hodesh |
| 834 | @findex diary-rosh-hodesh | 835 | @findex diary-rosh-hodesh |
| @@ -862,9 +863,8 @@ the European style, the order of the parameters is changed to @var{day}, | |||
| 862 | @node Appt Customizing | 863 | @node Appt Customizing |
| 863 | @section Customizing Appointment Reminders | 864 | @section Customizing Appointment Reminders |
| 864 | 865 | ||
| 865 | You can specify exactly how Emacs reminds you of an appointment and | 866 | You can specify exactly how Emacs reminds you of an appointment, and |
| 866 | how far in advance it begins doing so. Here are the variables that you | 867 | how far in advance it begins doing so, by setting these variables: |
| 867 | can set: | ||
| 868 | 868 | ||
| 869 | @vindex appt-message-warning-time | 869 | @vindex appt-message-warning-time |
| 870 | @vindex appt-audible | 870 | @vindex appt-audible |
| @@ -883,7 +883,7 @@ If this is non-@code{nil}, Emacs rings the | |||
| 883 | terminal bell for appointment reminders. The default is @code{t}. | 883 | terminal bell for appointment reminders. The default is @code{t}. |
| 884 | @item appt-visible | 884 | @item appt-visible |
| 885 | If this is non-@code{nil}, Emacs displays the appointment | 885 | If this is non-@code{nil}, Emacs displays the appointment |
| 886 | message in echo area. The default is @code{t}. | 886 | message in the echo area. The default is @code{t}. |
| 887 | @item appt-display-mode-line | 887 | @item appt-display-mode-line |
| 888 | If this is non-@code{nil}, Emacs displays the number of minutes | 888 | If this is non-@code{nil}, Emacs displays the number of minutes |
| 889 | to the appointment on the mode line. The default is @code{t}. | 889 | to the appointment on the mode line. The default is @code{t}. |