diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/display.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 40 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 1 |
3 files changed, 44 insertions, 1 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index f5c73e55a4f..2ed848adf37 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -2423,7 +2423,9 @@ the values of the @code{:family}, @code{:foundry}, @code{:width}, | |||
| 2423 | The name of a face from which to inherit attributes, or a list of face | 2423 | The name of a face from which to inherit attributes, or a list of face |
| 2424 | names. Attributes from inherited faces are merged into the face like | 2424 | names. Attributes from inherited faces are merged into the face like |
| 2425 | an underlying face would be, with higher priority than underlying | 2425 | an underlying face would be, with higher priority than underlying |
| 2426 | faces (@pxref{Displaying Faces}). If a list of faces is used, | 2426 | faces (@pxref{Displaying Faces}). If the face to inherit from is |
| 2427 | @code{unspecified}, it is treated the same as @code{nil}, since Emacs | ||
| 2428 | never merges @code{:inherit} attributes. If a list of faces is used, | ||
| 2427 | attributes from faces earlier in the list override those from later | 2429 | attributes from faces earlier in the list override those from later |
| 2428 | faces. | 2430 | faces. |
| 2429 | @end table | 2431 | @end table |
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index d925c8c8f65..80dcb488983 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -468,6 +468,10 @@ runs the real definition as if it had been loaded all along. | |||
| 468 | Autoloading can also be triggered by looking up the documentation of | 468 | Autoloading can also be triggered by looking up the documentation of |
| 469 | the function or macro (@pxref{Documentation Basics}). | 469 | the function or macro (@pxref{Documentation Basics}). |
| 470 | 470 | ||
| 471 | @menu | ||
| 472 | * When to Autoload:: When to Use Autoload. | ||
| 473 | @end menu | ||
| 474 | |||
| 471 | There are two ways to set up an autoloaded function: by calling | 475 | There are two ways to set up an autoloaded function: by calling |
| 472 | @code{autoload}, and by writing a ``magic'' comment in the | 476 | @code{autoload}, and by writing a ``magic'' comment in the |
| 473 | source before the real definition. @code{autoload} is the low-level | 477 | source before the real definition. @code{autoload} is the low-level |
| @@ -699,6 +703,42 @@ symbol's new function value. If the value of the optional argument | |||
| 699 | function, only a macro. | 703 | function, only a macro. |
| 700 | @end defun | 704 | @end defun |
| 701 | 705 | ||
| 706 | @node When to Autoload | ||
| 707 | @subsection When to Use Autoload | ||
| 708 | @cindex autoload, when to use | ||
| 709 | |||
| 710 | Do not add an autoload comment unless it is really necessary. | ||
| 711 | Autoloading code means it is always globally visible. Once an item is | ||
| 712 | autoloaded, there is no compatible way to transition back to it not | ||
| 713 | being autoloaded (after people become accustomed to being able to use it | ||
| 714 | without an explicit load). | ||
| 715 | |||
| 716 | @itemize | ||
| 717 | @item | ||
| 718 | The most common items to autoload are the interactive entry points to a | ||
| 719 | library. For example, if @file{python.el} is a library defining a | ||
| 720 | major-mode for editing Python code, autoload the definition of the | ||
| 721 | @code{python-mode} function, so that people can simply use @kbd{M-x | ||
| 722 | python-mode} to load the library. | ||
| 723 | |||
| 724 | @item | ||
| 725 | Variables usually don't need to be autoloaded. An exception is if the | ||
| 726 | variable on its own is generally useful without the whole defining | ||
| 727 | library being loaded. (An example of this might be something like | ||
| 728 | @code{find-exec-terminator}.) | ||
| 729 | |||
| 730 | @item | ||
| 731 | Don't autoload a user option just so that a user can set it. | ||
| 732 | |||
| 733 | @item | ||
| 734 | Never add an autoload @emph{comment} to silence a compiler warning in | ||
| 735 | another file. In the file that produces the warning, use | ||
| 736 | @code{(defvar foo)} to silence an undefined variable warning, and | ||
| 737 | @code{declare-function} (@pxref{Declaring Functions}) to silence an | ||
| 738 | undefined function warning; or require the relevant library; or use an | ||
| 739 | explicit autoload @emph{statement}. | ||
| 740 | @end itemize | ||
| 741 | |||
| 702 | @node Repeated Loading | 742 | @node Repeated Loading |
| 703 | @section Repeated Loading | 743 | @section Repeated Loading |
| 704 | @cindex repeated loading | 744 | @cindex repeated loading |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 7108520e79f..b825b1d790b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -4236,6 +4236,7 @@ A marker represents a buffer position to jump to. | |||
| 4236 | A string is text saved in the register. | 4236 | A string is text saved in the register. |
| 4237 | 4237 | ||
| 4238 | @item a rectangle | 4238 | @item a rectangle |
| 4239 | @cindex rectangle, as contents of a register | ||
| 4239 | A rectangle is represented by a list of strings. | 4240 | A rectangle is represented by a list of strings. |
| 4240 | 4241 | ||
| 4241 | @item @code{(@var{window-configuration} @var{position})} | 4242 | @item @code{(@var{window-configuration} @var{position})} |