summaryrefslogtreecommitdiff
path: root/doc/lispref/loading.texi
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-05-04 20:37:30 -0400
committerGlenn Morris <rgm@gnu.org>2012-05-04 20:37:30 -0400
commitddff335186c805b3756cff110033fe118f548f17 (patch)
tree91b95a190047e233c13feec4cb82fbe34d2c4c14 /doc/lispref/loading.texi
parent9824f5052394817ac65302d42a7c97841593e19e (diff)
downloademacs-ddff335186c805b3756cff110033fe118f548f17.tar.gz
More small edits for doc/lispref
* control.texi: Where possible, use example rather than smallexample. (Sequencing, Conditionals, Signaling Errors, Handling Errors): Tweak page breaks. * customize.texi: Where possible, use example rather than smallexample. (Common Keywords, Variable Definitions, Applying Customizations) (Custom Themes): Tweak page breaks. * eval.texi, functions.texi, loading.texi, macros.texi: Where possible, use example rather than smallexample. * sequences.texi (Arrays): Tweak page breaks. * symbols.texi: Where possible, use example rather than smallexample. (Symbol Components): Fix typo. (Other Plists): Tweak page break.
Diffstat (limited to 'doc/lispref/loading.texi')
-rw-r--r--doc/lispref/loading.texi52
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 3806ab15b8b..93cc7a4598c 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -251,31 +251,31 @@ for @code{PATH}; directory names are separated by @samp{:} (or
current default directory. Here is an example of how to set
@env{EMACSLOADPATH} variable from @command{sh}:
-@smallexample
+@example
export EMACSLOADPATH
EMACSLOADPATH=/home/foo/.emacs.d/lisp:/opt/emacs/lisp
-@end smallexample
+@end example
@noindent
Here is how to set it from @code{csh}:
-@smallexample
+@example
setenv EMACSLOADPATH /home/foo/.emacs.d/lisp:/opt/emacs/lisp
-@end smallexample
+@end example
If @env{EMACSLOADPATH} is not set (which is usually the case), Emacs
initializes @code{load-path} with the following two directories:
-@smallexample
+@example
"/usr/local/share/emacs/@var{version}/site-lisp"
-@end smallexample
+@end example
@noindent
and
-@smallexample
+@example
"/usr/local/share/emacs/site-lisp"
-@end smallexample
+@end example
@noindent
The first one is for locally installed packages for a particular Emacs
@@ -304,9 +304,9 @@ packages are installed, if any (@pxref{Packaging Basics}).
It is common to add code to one's init file (@pxref{Init File}) to
add one or more directories to @code{load-path}. For example:
-@smallexample
+@example
(push "~/.emacs.d/lisp" load-path)
-@end smallexample
+@end example
Dumping Emacs uses a special value of @code{load-path}. If the
value of @code{load-path} at the end of dumping is unchanged (that is,
@@ -340,9 +340,9 @@ similarly-named file in a directory earlier on @code{load-path}.
For instance, suppose @code{load-path} is set to
-@smallexample
+@example
("/opt/emacs/site-lisp" "/usr/share/emacs/23.3/lisp")
-@end smallexample
+@end example
@noindent
and that both these directories contain a file named @file{foo.el}.
@@ -535,24 +535,24 @@ it is executed while building Emacs.
The following example shows how @code{doctor} is prepared for
autoloading with a magic comment:
-@smallexample
+@example
;;;###autoload
(defun doctor ()
"Switch to *doctor* buffer and start giving psychotherapy."
(interactive)
(switch-to-buffer "*doctor*")
(doctor-mode))
-@end smallexample
+@end example
@noindent
Here's what that produces in @file{loaddefs.el}:
-@smallexample
+@example
(autoload (quote doctor) "doctor" "\
Switch to *doctor* buffer and start giving psychotherapy.
\(fn)" t nil)
-@end smallexample
+@end example
@noindent
@cindex @code{fn} in function's documentation string
@@ -571,11 +571,11 @@ ordinary magic autoload comment would copy the whole definition into
@code{loaddefs.el}. That is not desirable. You can put the desired
@code{autoload} call into @code{loaddefs.el} instead by writing this:
-@smallexample
+@example
;;;###autoload (autoload 'foo "myfile")
(mydefunmacro foo
...)
-@end smallexample
+@end example
You can use a non-default string as the autoload cookie and have the
corresponding autoload calls written into a file whose name is
@@ -680,7 +680,7 @@ file should call @code{provide} at the top level to add the feature to
For example, in @file{idlwave.el}, the definition for
@code{idlwave-complete-filename} includes the following code:
-@smallexample
+@example
(defun idlwave-complete-filename ()
"Use the comint stuff to complete a file name."
(require 'comint)
@@ -688,7 +688,7 @@ file should call @code{provide} at the top level to add the feature to
(comint-completion-addsuffix nil)
...)
(comint-dynamic-complete-filename)))
-@end smallexample
+@end example
@noindent
The expression @code{(require 'comint)} loads the file @file{comint.el}
@@ -703,9 +703,9 @@ after the let exits.)
The @file{comint.el} file contains the following top-level expression:
-@smallexample
+@example
(provide 'comint)
-@end smallexample
+@end example
@noindent
This adds @code{comint} to the global @code{features} list, so that
@@ -726,13 +726,13 @@ ensure that a file of definitions is loaded before it is byte-compiled
by including a @code{provide} followed by a @code{require} for the same
feature, as in the following example.
-@smallexample
+@example
@group
(provide 'my-feature) ; @r{Ignored by byte compiler,}
; @r{evaluated by @code{load}.}
(require 'my-feature) ; @r{Evaluated by byte compiler.}
@end group
-@end smallexample
+@end example
@noindent
The compiler ignores the @code{provide}, then processes the
@@ -762,7 +762,7 @@ package, which might or might not be loaded, or might or might not be
present in a given version. @xref{Network Feature Testing}, for
an example.
-@smallexample
+@example
features
@result{} (bar bish)
@@ -770,7 +770,7 @@ features
@result{} foo
features
@result{} (foo bar bish)
-@end smallexample
+@end example
When a file is loaded to satisfy an autoload, and it stops due to an
error in the evaluation of its contents, any function definitions or