diff options
| author | Chong Yidong | 2012-03-17 19:11:08 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-03-17 19:11:08 +0800 |
| commit | 986bd52a31d3ef5a9cc35ecfb8463d758d1e5e6c (patch) | |
| tree | 6ec0f817f4d5ef35f771c5b03bd5e11d5ce4a942 | |
| parent | f761251a434c75e6eec2e70ac6839cf07ec32414 (diff) | |
| download | emacs-986bd52a31d3ef5a9cc35ecfb8463d758d1e5e6c.tar.gz emacs-986bd52a31d3ef5a9cc35ecfb8463d758d1e5e6c.zip | |
Misc manual updates.
* doc/emacs/package.texi (Package Installation): Document use of
package-initialize in init file.
* doc/lispref/os.texi (Startup Summary): Mention package loading.
(Init File): Don't refer to .emacs in section title. Copyedits.
(Terminal-Specific): Give a realistic example.
(Command-Line Arguments): Reference Entering Emacs instead of
repeating the spiel about not restarting Emacs.
(Time of Day): Discuss time representation at beginning of node.
(Sound Output): Copyedits.
* doc/lispref/package.texi (Packaging Basics): Document package-initialize.
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/package.texi | 45 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 189 | ||||
| -rw-r--r-- | doc/lispref/package.texi | 41 |
5 files changed, 165 insertions, 127 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 2d03bae1a1b..f5ccba1005f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-03-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * package.texi (Package Installation): Document use of | ||
| 4 | package-initialize in init file. | ||
| 5 | |||
| 1 | 2012-03-16 Glenn Morris <rgm@gnu.org> | 6 | 2012-03-16 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * help.texi (Language Help): | 8 | * help.texi (Language Help): |
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 7e2aa20d52e..91b25cfa00e 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi | |||
| @@ -157,25 +157,38 @@ directory name of the package archive. You can alter this list if you | |||
| 157 | wish to use third party package archives---but do so at your own risk, | 157 | wish to use third party package archives---but do so at your own risk, |
| 158 | and use only third parties that you think you can trust! | 158 | and use only third parties that you think you can trust! |
| 159 | 159 | ||
| 160 | Once a package is downloaded and installed, it takes effect in the | 160 | Once a package is downloaded and installed, it is @dfn{loaded} into |
| 161 | current Emacs session. What ``taking effect'' means depends on the | 161 | the current Emacs session. Loading a package is not quite the same as |
| 162 | package; most packages just make some new commands available, while | 162 | loading a Lisp library (@pxref{Lisp Libraries}); its effect varies |
| 163 | others have more wide-ranging effects on the Emacs session. For such | 163 | from package to package. Most packages just make some new commands |
| 164 | information, consult the package's help buffer. | 164 | available, while others have more wide-ranging effects on the Emacs |
| 165 | 165 | session. For such information, consult the package's help buffer. | |
| 166 | By default, Emacs also automatically loads all installed packages | 166 | |
| 167 | (causing them to ``take effect'') in subsequent Emacs sessions. This | 167 | By default, Emacs also automatically loads all installed packages in |
| 168 | happens at startup, after processing the init file (@pxref{Init | 168 | subsequent Emacs sessions. This happens at startup, after processing |
| 169 | File}). As an exception, Emacs does not load packages at startup if | 169 | the init file (@pxref{Init File}). As an exception, Emacs does not |
| 170 | invoked with the @samp{-q} or @samp{--no-init-file} options | 170 | load packages at startup if invoked with the @samp{-q} or |
| 171 | (@pxref{Initial Options}). | 171 | @samp{--no-init-file} options (@pxref{Initial Options}). |
| 172 | 172 | ||
| 173 | @vindex package-enable-at-startup | 173 | @vindex package-enable-at-startup |
| 174 | @findex package-initialize | ||
| 175 | To disable automatic package loading, change the variable | 174 | To disable automatic package loading, change the variable |
| 176 | @code{package-enable-at-startup} to @code{nil}. If you do this, you | 175 | @code{package-enable-at-startup} to @code{nil}. |
| 177 | can use the command @kbd{M-x package-initialize} to load your | 176 | |
| 178 | packages. | 177 | @findex package-initialize |
| 178 | The reason automatic package loading occurs after loading the init | ||
| 179 | file is that user options only receive their customized values after | ||
| 180 | loading the init file, including user options which affect the | ||
| 181 | packaging system. In some circumstances, you may want to load | ||
| 182 | packages explicitly in your init file (usually because some other code | ||
| 183 | in your init file depends on a package). In that case, your init file | ||
| 184 | should call the function @code{package-initialize}. It is up to you | ||
| 185 | to ensure that relevant user options, such as @code{package-load-list} | ||
| 186 | (see below), are set up prior to the @code{package-initialize} call. | ||
| 187 | You should also set @code{package-enable-at-startup} to @code{nil}, to | ||
| 188 | avoid loading the packages again after processing the init file. | ||
| 189 | Alternatively, you may choose to completely inhibit package loading at | ||
| 190 | startup, and invoke the command @kbd{M-x package-initialize} to load | ||
| 191 | your packages manually. | ||
| 179 | 192 | ||
| 180 | @vindex package-load-list | 193 | @vindex package-load-list |
| 181 | For finer control over package loading, you can use the variable | 194 | For finer control over package loading, you can use the variable |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b1138e8363d..64b17ad420d 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-03-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * os.texi (Startup Summary): Mention package loading. | ||
| 4 | (Init File): Don't refer to .emacs in section title. Copyedits. | ||
| 5 | (Terminal-Specific): Give a realistic example. | ||
| 6 | (Command-Line Arguments): Reference Entering Emacs instead of | ||
| 7 | repeating the spiel about not restarting Emacs. | ||
| 8 | (Time of Day): Discuss time representation at beginning of node. | ||
| 9 | (Sound Output): Copyedits. | ||
| 10 | |||
| 11 | * package.texi (Packaging Basics): Document package-initialize. | ||
| 12 | |||
| 1 | 2012-03-17 Eli Zaretskii <eliz@gnu.org> | 13 | 2012-03-17 Eli Zaretskii <eliz@gnu.org> |
| 2 | 14 | ||
| 3 | * frames.texi (Initial Parameters): Add an index entry for | 15 | * frames.texi (Initial Parameters): Add an index entry for |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index f7df5f4bf87..8b158e602fd 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -127,6 +127,11 @@ It loads your abbrevs from the file specified by | |||
| 127 | (@pxref{Abbrev Files, abbrev-file-name}). This is not done if the | 127 | (@pxref{Abbrev Files, abbrev-file-name}). This is not done if the |
| 128 | option @samp{--batch} was specified. | 128 | option @samp{--batch} was specified. |
| 129 | 129 | ||
| 130 | @item | ||
| 131 | If @code{package-enable-at-startup} is non-@code{nil}, it calls the | ||
| 132 | function @code{package-initialize} to activate any optional Emacs Lisp | ||
| 133 | package that has been installed. @xref{Packaging Basics}. | ||
| 134 | |||
| 130 | @vindex after-init-time | 135 | @vindex after-init-time |
| 131 | @item | 136 | @item |
| 132 | It sets the variable @code{after-init-time} to the value of | 137 | It sets the variable @code{after-init-time} to the value of |
| @@ -242,9 +247,10 @@ is @code{nil}, the @samp{*scratch*} buffer is empty. | |||
| 242 | @end defopt | 247 | @end defopt |
| 243 | 248 | ||
| 244 | @node Init File | 249 | @node Init File |
| 245 | @subsection The Init File, @file{.emacs} | 250 | @subsection The Init File |
| 246 | @cindex init file | 251 | @cindex init file |
| 247 | @cindex @file{.emacs} | 252 | @cindex @file{.emacs} |
| 253 | @cindex @file{init.el} | ||
| 248 | 254 | ||
| 249 | When you start Emacs, it normally attempts to load your @dfn{init | 255 | When you start Emacs, it normally attempts to load your @dfn{init |
| 250 | file}. This is either a file named @file{.emacs} or @file{.emacs.el} | 256 | file}. This is either a file named @file{.emacs} or @file{.emacs.el} |
| @@ -267,13 +273,13 @@ file. If those environment variables are absent, though, Emacs uses | |||
| 267 | your user-id to find your home directory. | 273 | your user-id to find your home directory. |
| 268 | 274 | ||
| 269 | @cindex default init file | 275 | @cindex default init file |
| 270 | A site may have a @dfn{default init file}, which is the library | 276 | An Emacs installation may have a @dfn{default init file}, which is a |
| 271 | named @file{default.el}. Emacs finds the @file{default.el} file | 277 | Lisp library named @file{default.el}. Emacs finds this file through |
| 272 | through the standard search path for libraries (@pxref{How Programs Do | 278 | the standard search path for libraries (@pxref{How Programs Do |
| 273 | Loading}). The Emacs distribution does not come with this file; sites | 279 | Loading}). The Emacs distribution does not come with this file; it is |
| 274 | may provide one for local customizations. If the default init file | 280 | intended for local customizations. If the default init file exists, |
| 275 | exists, it is loaded whenever you start Emacs, except in batch mode or | 281 | it is loaded whenever you start Emacs, except in batch mode or if |
| 276 | if @samp{-q} (or @samp{-Q}) is specified. But your own personal init | 282 | @samp{-q} (or @samp{-Q}) is specified. But your own personal init |
| 277 | file, if any, is loaded first; if it sets @code{inhibit-default-init} | 283 | file, if any, is loaded first; if it sets @code{inhibit-default-init} |
| 278 | to a non-@code{nil} value, then Emacs does not subsequently load the | 284 | to a non-@code{nil} value, then Emacs does not subsequently load the |
| 279 | @file{default.el} file. | 285 | @file{default.el} file. |
| @@ -343,23 +349,22 @@ in the normal manner, by searching the @code{load-path} directories, and | |||
| 343 | trying the @samp{.elc} and @samp{.el} suffixes. | 349 | trying the @samp{.elc} and @samp{.el} suffixes. |
| 344 | 350 | ||
| 345 | @cindex Termcap | 351 | @cindex Termcap |
| 346 | The usual function of a terminal-specific library is to enable | 352 | The usual role of a terminal-specific library is to enable special |
| 347 | special keys to send sequences that Emacs can recognize. It may also | 353 | keys to send sequences that Emacs can recognize. It may also need to |
| 348 | need to set or add to @code{input-decode-map} if the Termcap or | 354 | set or add to @code{input-decode-map} if the Termcap or Terminfo entry |
| 349 | Terminfo entry does not specify all the terminal's function keys. | 355 | does not specify all the terminal's function keys. @xref{Terminal |
| 350 | @xref{Terminal Input}. | 356 | Input}. |
| 351 | 357 | ||
| 352 | When the name of the terminal type contains a hyphen, and no library | 358 | When the name of the terminal type contains a hyphen, and no library |
| 353 | is found whose name is identical to the terminal's name, Emacs strips | 359 | is found whose name is identical to the terminal's name, Emacs strips |
| 354 | from the terminal's name the last hyphen and everything that follows | 360 | from the terminal's name the last hyphen and everything that follows |
| 355 | it, and tries again. This process is repeated until Emacs finds a | 361 | it, and tries again. This process is repeated until Emacs finds a |
| 356 | matching library or until there are no more hyphens in the name (the | 362 | matching library, or until there are no more hyphens in the name |
| 357 | latter means the terminal doesn't have any library specific to it). | 363 | (i.g.@: there is no terminal-specific library). For example, if the |
| 358 | Thus, for example, if there are no @samp{aaa-48} and @samp{aaa-30} | 364 | terminal name is @samp{xterm-256color} and there is no |
| 359 | libraries, Emacs will try the same library @file{term/aaa.el} for | 365 | @file{term/xterm-256color.el} library, Emacs tries to load |
| 360 | terminal types @samp{aaa-48} and @samp{aaa-30-rv}. If necessary, the | 366 | @file{term/xterm.el}. If necessary, the terminal library can evaluate |
| 361 | library can evaluate @code{(getenv "TERM")} to find the full name of | 367 | @code{(getenv "TERM")} to find the full name of the terminal type. |
| 362 | the terminal type.@refill | ||
| 363 | 368 | ||
| 364 | Your init file can prevent the loading of the | 369 | Your init file can prevent the loading of the |
| 365 | terminal-specific library by setting the variable | 370 | terminal-specific library by setting the variable |
| @@ -376,8 +381,8 @@ have their own libraries. @xref{Hooks}. | |||
| 376 | 381 | ||
| 377 | @defvar term-file-prefix | 382 | @defvar term-file-prefix |
| 378 | @cindex @code{TERM} environment variable | 383 | @cindex @code{TERM} environment variable |
| 379 | If the @code{term-file-prefix} variable is non-@code{nil}, Emacs loads | 384 | If the value of this variable is non-@code{nil}, Emacs loads a |
| 380 | a terminal-specific initialization file as follows: | 385 | terminal-specific initialization file as follows: |
| 381 | 386 | ||
| 382 | @example | 387 | @example |
| 383 | (load (concat term-file-prefix (getenv "TERM"))) | 388 | (load (concat term-file-prefix (getenv "TERM"))) |
| @@ -409,29 +414,14 @@ feature. | |||
| 409 | @subsection Command-Line Arguments | 414 | @subsection Command-Line Arguments |
| 410 | @cindex command-line arguments | 415 | @cindex command-line arguments |
| 411 | 416 | ||
| 412 | You can use command-line arguments to request various actions when you | 417 | You can use command-line arguments to request various actions when |
| 413 | start Emacs. Since you do not need to start Emacs more than once per | 418 | you start Emacs. Command-line arguments should not be commonly used, |
| 414 | day, and will often leave your Emacs session running longer than that, | 419 | since the recommended way of using Emacs is to start it just once, |
| 415 | command-line arguments are hardly ever used. As a practical matter, it | 420 | after logging in, and do all editing in the same Emacs session |
| 416 | is best to avoid making the habit of using them, since this habit would | 421 | (@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}); nonetheless, |
| 417 | encourage you to kill and restart Emacs unnecessarily often. These | 422 | they can be useful when invoking Emacs from session scripts or |
| 418 | options exist for two reasons: to be compatible with other editors (for | 423 | debugging Emacs itself. This section describes how Emacs processes |
| 419 | invocation by other programs) and to enable shell scripts to run | 424 | command-line arguments. |
| 420 | specific Lisp programs. | ||
| 421 | |||
| 422 | This section describes how Emacs processes command-line arguments, | ||
| 423 | and how you can customize them. | ||
| 424 | |||
| 425 | @ignore | ||
| 426 | (Note that some other editors require you to start afresh each time | ||
| 427 | you want to edit a file. With this kind of editor, you will probably | ||
| 428 | specify the file as a command-line argument. The recommended way to | ||
| 429 | use GNU Emacs is to start it only once, just after you log in, and do | ||
| 430 | all your editing in the same Emacs process. Each time you want to edit | ||
| 431 | a different file, you visit it with the existing Emacs, which eventually | ||
| 432 | comes to have many files in it ready for editing. Usually you do not | ||
| 433 | kill the Emacs until you are about to log out.) | ||
| 434 | @end ignore | ||
| 435 | 425 | ||
| 436 | @defun command-line | 426 | @defun command-line |
| 437 | This function parses the command line that Emacs was called with, | 427 | This function parses the command line that Emacs was called with, |
| @@ -525,9 +515,7 @@ as a file name to visit. | |||
| 525 | 515 | ||
| 526 | There are two ways to get out of Emacs: you can kill the Emacs job, | 516 | There are two ways to get out of Emacs: you can kill the Emacs job, |
| 527 | which exits permanently, or you can suspend it, which permits you to | 517 | which exits permanently, or you can suspend it, which permits you to |
| 528 | reenter the Emacs process later. As a practical matter, you seldom kill | 518 | reenter the Emacs process later. |
| 529 | Emacs---only when you are about to log out. Suspending is much more | ||
| 530 | common. | ||
| 531 | 519 | ||
| 532 | @menu | 520 | @menu |
| 533 | * Killing Emacs:: Exiting Emacs irreversibly. | 521 | * Killing Emacs:: Exiting Emacs irreversibly. |
| @@ -1105,24 +1093,47 @@ The value may be a floating point number. | |||
| 1105 | @node Time of Day | 1093 | @node Time of Day |
| 1106 | @section Time of Day | 1094 | @section Time of Day |
| 1107 | 1095 | ||
| 1108 | This section explains how to determine the current time and the time | 1096 | This section explains how to determine the current time and time |
| 1109 | zone. | 1097 | zone. |
| 1110 | 1098 | ||
| 1099 | @cindex epoch | ||
| 1100 | Most of these functions represent time as a list of either three | ||
| 1101 | integers, @code{(@var{sec-high} @var{sec-low} @var{microsec})}, or of | ||
| 1102 | two integers, @code{(@var{sec-high} @var{sec-low})}. The integers | ||
| 1103 | @var{sec-high} and @var{sec-low} give the high and low bits of an | ||
| 1104 | integer number of seconds. This integer number, | ||
| 1105 | @ifnottex | ||
| 1106 | @var{high} * 2**16 + @var{low}, | ||
| 1107 | @end ifnottex | ||
| 1108 | @tex | ||
| 1109 | $high*2^{16}+low$, | ||
| 1110 | @end tex | ||
| 1111 | is the number of seconds from the @dfn{epoch} (0:00 January 1, 1970 | ||
| 1112 | UTC) to the specified time. The third list element @var{microsec}, if | ||
| 1113 | present, gives the number of microseconds from the start of that | ||
| 1114 | second to the specified time. | ||
| 1115 | |||
| 1116 | The return value of @code{current-time} represents time using three | ||
| 1117 | integers, while the timestamps in the return value of | ||
| 1118 | @code{file-attributes} use two integers (@pxref{Definition of | ||
| 1119 | file-attributes}). In function arguments, e.g.@: the @var{time-value} | ||
| 1120 | argument to @code{current-time-string}, both two- and three-integer | ||
| 1121 | lists are accepted. You can convert times from the list | ||
| 1122 | representation into standard human-readable strings using | ||
| 1123 | @code{current-time}, or to other forms using the @code{decode-time} | ||
| 1124 | and @code{format-time-string} functions documented in the following | ||
| 1125 | sections. | ||
| 1126 | |||
| 1111 | @defun current-time-string &optional time-value | 1127 | @defun current-time-string &optional time-value |
| 1112 | This function returns the current time and date as a human-readable | 1128 | This function returns the current time and date as a human-readable |
| 1113 | string. The format of the string is unvarying; the number of characters | 1129 | string. The format of the string is unvarying; the number of |
| 1114 | used for each part is always the same, so you can reliably use | 1130 | characters used for each part is always the same, so you can reliably |
| 1115 | @code{substring} to extract pieces of it. It is wise to count the | 1131 | use @code{substring} to extract pieces of it. You should count |
| 1116 | characters from the beginning of the string rather than from the end, as | 1132 | characters from the beginning of the string rather than from the end, |
| 1117 | additional information may some day be added at the end. | 1133 | as additional information may some day be added at the end. |
| 1118 | 1134 | ||
| 1119 | The argument @var{time-value}, if given, specifies a time to format | 1135 | The argument @var{time-value}, if given, specifies a time to format |
| 1120 | instead of the current time. This argument should have the same form | 1136 | (represented as a list of integers), instead of the current time. |
| 1121 | as the times obtained from @code{current-time} (see below) and from | ||
| 1122 | @code{file-attributes} (@pxref{Definition of file-attributes}). It | ||
| 1123 | should be a list whose first two elements are integers; a third | ||
| 1124 | (microsecond) element, if present, is ignored. @var{time-value} can | ||
| 1125 | also be a cons of two integers, but this usage is obsolete. | ||
| 1126 | 1137 | ||
| 1127 | @example | 1138 | @example |
| 1128 | @group | 1139 | @group |
| @@ -1133,33 +1144,16 @@ also be a cons of two integers, but this usage is obsolete. | |||
| 1133 | @end defun | 1144 | @end defun |
| 1134 | 1145 | ||
| 1135 | @defun current-time | 1146 | @defun current-time |
| 1136 | This function returns the system's time value as a list of three | 1147 | This function returns the current time, represented as a list of three |
| 1137 | integers: @code{(@var{high} @var{low} @var{microsec})}. The integers | 1148 | integers @code{(@var{sec-high} @var{sec-low} @var{microsec})}. On |
| 1138 | @var{high} and @var{low} combine to give the number of seconds since | 1149 | systems with only one-second time resolutions, @var{microsec} is 0. |
| 1139 | 0:00 January 1, 1970 UTC (Coordinated Universal Time), which is | ||
| 1140 | @ifnottex | ||
| 1141 | @var{high} * 2**16 + @var{low}. | ||
| 1142 | @end ifnottex | ||
| 1143 | @tex | ||
| 1144 | $high*2^{16}+low$. | ||
| 1145 | @end tex | ||
| 1146 | |||
| 1147 | The third element, @var{microsec}, gives the microseconds since the | ||
| 1148 | start of the current second (or 0 for systems that return time with | ||
| 1149 | the resolution of only one second). | ||
| 1150 | |||
| 1151 | The first two elements can be compared with file time values such as you | ||
| 1152 | get with the function @code{file-attributes}. | ||
| 1153 | @xref{Definition of file-attributes}. | ||
| 1154 | @end defun | 1150 | @end defun |
| 1155 | 1151 | ||
| 1156 | @defun float-time &optional time-value | 1152 | @defun float-time &optional time-value |
| 1157 | This function returns the current time as a floating-point number of | 1153 | This function returns the current time as a floating-point number of |
| 1158 | seconds since the epoch. The argument @var{time-value}, if given, | 1154 | seconds since the epoch. The optional argument @var{time-value}, if |
| 1159 | specifies a time to convert instead of the current time. The argument | 1155 | given, specifies a time (represented as a list of integers) to convert |
| 1160 | should have the same form as for @code{current-time-string} (see | 1156 | instead of the current time. |
| 1161 | above). Thus, it accepts the output of @code{current-time} and | ||
| 1162 | @code{file-attributes} (@pxref{Definition of file-attributes}). | ||
| 1163 | 1157 | ||
| 1164 | @emph{Warning}: Since the result is floating point, it may not be | 1158 | @emph{Warning}: Since the result is floating point, it may not be |
| 1165 | exact. Do not use this function if precise time stamps are required. | 1159 | exact. Do not use this function if precise time stamps are required. |
| @@ -1180,11 +1174,8 @@ adjustment, then the value is constant through time. | |||
| 1180 | If the operating system doesn't supply all the information necessary to | 1174 | If the operating system doesn't supply all the information necessary to |
| 1181 | compute the value, the unknown elements of the list are @code{nil}. | 1175 | compute the value, the unknown elements of the list are @code{nil}. |
| 1182 | 1176 | ||
| 1183 | The argument @var{time-value}, if given, specifies a time to analyze | 1177 | The argument @var{time-value}, if given, specifies a time (represented |
| 1184 | instead of the current time. The argument should have the same form | 1178 | as a list of integers) to analyze instead of the current time. |
| 1185 | as for @code{current-time-string} (see above). Thus, you can use | ||
| 1186 | times obtained from @code{current-time} (see above) and from | ||
| 1187 | @code{file-attributes}. @xref{Definition of file-attributes}. | ||
| 1188 | @end defun | 1179 | @end defun |
| 1189 | 1180 | ||
| 1190 | The current time zone is determined by the @samp{TZ} environment | 1181 | The current time zone is determined by the @samp{TZ} environment |
| @@ -1196,16 +1187,15 @@ time zone. | |||
| 1196 | @node Time Conversion | 1187 | @node Time Conversion |
| 1197 | @section Time Conversion | 1188 | @section Time Conversion |
| 1198 | 1189 | ||
| 1199 | These functions convert time values (lists of two or three integers) | 1190 | These functions convert time values (lists of two or three integers, |
| 1200 | to calendrical information and vice versa. You can get time values | 1191 | as explained in the previous section) into calendrical information and |
| 1201 | from the functions @code{current-time} (@pxref{Time of Day}) and | 1192 | vice versa. |
| 1202 | @code{file-attributes} (@pxref{Definition of file-attributes}). | ||
| 1203 | 1193 | ||
| 1204 | Many 32-bit operating systems are limited to time values that contain 32 bits | 1194 | Many 32-bit operating systems are limited to time values containing |
| 1205 | of information; these systems typically handle only the times from | 1195 | 32 bits of information; these systems typically handle only the times |
| 1206 | 1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC. However, 64-bit | 1196 | from 1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC. |
| 1207 | and some 32-bit operating systems have larger time values, and can | 1197 | However, 64-bit and some 32-bit operating systems have larger time |
| 1208 | represent times far in the past or future. | 1198 | values, and can represent times far in the past or future. |
| 1209 | 1199 | ||
| 1210 | Time conversion functions always use the Gregorian calendar, even | 1200 | Time conversion functions always use the Gregorian calendar, even |
| 1211 | for dates before the Gregorian calendar was introduced. Year numbers | 1201 | for dates before the Gregorian calendar was introduced. Year numbers |
| @@ -2014,9 +2004,8 @@ See also @code{open-dribble-file} in @ref{Recording Input}. | |||
| 2014 | @cindex sound | 2004 | @cindex sound |
| 2015 | 2005 | ||
| 2016 | To play sound using Emacs, use the function @code{play-sound}. Only | 2006 | To play sound using Emacs, use the function @code{play-sound}. Only |
| 2017 | certain systems are supported; if you call @code{play-sound} on a system | 2007 | certain systems are supported; if you call @code{play-sound} on a |
| 2018 | which cannot really do the job, it gives an error. Emacs version 20 and | 2008 | system which cannot really do the job, it gives an error. |
| 2019 | earlier did not support sound at all. | ||
| 2020 | 2009 | ||
| 2021 | The sound must be stored as a file in RIFF-WAVE format (@samp{.wav}) | 2010 | The sound must be stored as a file in RIFF-WAVE format (@samp{.wav}) |
| 2022 | or Sun Audio format (@samp{.au}). | 2011 | or Sun Audio format (@samp{.au}). |
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index eb3612dc868..b17f13b6b89 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi | |||
| @@ -15,6 +15,8 @@ install, uninstall, and upgrade it. | |||
| 15 | 15 | ||
| 16 | The following sections describe how to create a package, and how to | 16 | The following sections describe how to create a package, and how to |
| 17 | put it in a @dfn{package archive} for others to download. | 17 | put it in a @dfn{package archive} for others to download. |
| 18 | @xref{Packages,,, emacs, The GNU Emacs Manual}, for a description of | ||
| 19 | user-level features of the packaging system. | ||
| 18 | 20 | ||
| 19 | @menu | 21 | @menu |
| 20 | * Packaging Basics:: The basic concepts of Emacs Lisp packages. | 22 | * Packaging Basics:: The basic concepts of Emacs Lisp packages. |
| @@ -91,17 +93,34 @@ definitions are saved to a file named @file{@var{name}-autoloads.el} | |||
| 91 | in the content directory. They are typically used to autoload the | 93 | in the content directory. They are typically used to autoload the |
| 92 | principal user commands defined in the package, but they can also | 94 | principal user commands defined in the package, but they can also |
| 93 | perform other tasks, such as adding an element to | 95 | perform other tasks, such as adding an element to |
| 94 | @code{auto-mode-alist} (@pxref{Auto Major Mode}). During this time, | 96 | @code{auto-mode-alist} (@pxref{Auto Major Mode}). Note that a package |
| 95 | Emacs will also byte-compile the Lisp files. | 97 | typically does @emph{not} autoload every function and variable defined |
| 96 | 98 | within it---only the handful of commands typically called to begin | |
| 97 | After installation, and (by default) each time Emacs is started, the | 99 | using the package. Emacs then byte-compiles every Lisp file in the |
| 98 | installed package is @dfn{activated}. During activation, Emacs adds | 100 | package. |
| 99 | the package's content directory to @code{load-path}, and evaluates the | 101 | |
| 100 | autoload definitions in @file{@var{name}-autoloads.el}. | 102 | After installation, the installed package is @dfn{loaded}: Emacs |
| 101 | 103 | adds the package's content directory to @code{load-path}, and | |
| 102 | Note that a package typically does @emph{not} autoload every | 104 | evaluates the autoload definitions in @file{@var{name}-autoloads.el}. |
| 103 | function and variable defined within it---only the handful of commands | 105 | |
| 104 | typically called to begin using the package. | 106 | Whenever Emacs starts up, it automatically calls the function |
| 107 | @code{package-initialize} to load installed packages. This is done | ||
| 108 | after loading the init file and abbrev file (if any) and before | ||
| 109 | running @code{after-init-hook} (@pxref{Startup Summary}). Automatic | ||
| 110 | package loading is disabled if the user option | ||
| 111 | @code{package-enable-at-startup} is @code{nil}. | ||
| 112 | |||
| 113 | @deffn Command package-initialize &optional no-activate | ||
| 114 | This function initializes Emacs' internal record of which packages are | ||
| 115 | installed, and loads them. The user option @code{package-load-list} | ||
| 116 | specifies which packages to load; by default, all installed packages | ||
| 117 | are loaded. @xref{Package Installation,,, emacs, The GNU Emacs | ||
| 118 | Manual}. | ||
| 119 | |||
| 120 | The optional argument @var{no-activate}, if non-@code{nil}, causes | ||
| 121 | Emacs to update its record of installed packages without actually | ||
| 122 | loading them; it is for internal use only. | ||
| 123 | @end deffn | ||
| 105 | 124 | ||
| 106 | @node Simple Packages | 125 | @node Simple Packages |
| 107 | @section Simple Packages | 126 | @section Simple Packages |