aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog45
-rw-r--r--doc/emacs/building.texi16
-rw-r--r--doc/emacs/dired.texi15
-rw-r--r--doc/emacs/emacs.texi6
-rw-r--r--doc/emacs/files.texi26
-rw-r--r--doc/emacs/misc.texi12
-rw-r--r--doc/emacs/trouble.texi5
-rw-r--r--doc/lispref/ChangeLog19
-rw-r--r--doc/lispref/Makefile.in1
-rw-r--r--doc/lispref/advice.texi749
-rw-r--r--doc/lispref/elisp.texi15
-rw-r--r--doc/lispref/functions.texi274
-rw-r--r--doc/lispref/makefile.w32-in1
-rw-r--r--doc/lispref/modes.texi51
-rw-r--r--doc/lispref/strings.texi7
-rw-r--r--doc/lispref/text.texi8
-rw-r--r--doc/man/ChangeLog4
-rw-r--r--doc/man/emacs.17
-rw-r--r--doc/misc/ChangeLog121
-rw-r--r--doc/misc/Makefile.in14
-rw-r--r--doc/misc/autotype.texi2
-rw-r--r--doc/misc/calc.texi4
-rw-r--r--doc/misc/cl.texi9
-rw-r--r--doc/misc/eww.texi254
-rw-r--r--doc/misc/gnus.texi4
-rw-r--r--doc/misc/idlwave.texi2
-rw-r--r--doc/misc/texinfo.tex74
27 files changed, 796 insertions, 949 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 8db5ab808ce..cc5518b4fce 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,32 @@
12014-01-10 Glenn Morris <rgm@gnu.org>
2
3 * emacs.texi (Distrib): Add donate URL. Add anchor.
4
52014-01-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
6
7 * dired.texi (Misc Dired Features): Document `dired-hide-details-mode',
8 `dired-hide-details-hide-symlink-targets', and
9 `dired-hide-details-hide-information-lines'.
10
112014-01-09 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
12
13 * emacs.texi: Add EWW.
14 * misc.texi (EWW): Document EWW.
15
162014-01-09 Glenn Morris <rgm@gnu.org>
17
18 * trouble.texi (Service): Refer to online service directory
19 rather than etc/SERVICE.
20
212014-01-09 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
22
23 * building.texi (Lisp Libraries): Document `load-prefer-newer'.
24
25 * files.texi (File Conveniences): Document `image-next-frame',
26 `image-previous-frame', `image-goto-frame',
27 `image-increase-speed', `image-decrease-speed',
28 `image-reverse-speed', and `image-reset-speed'.
29
12014-01-07 Bastien Guerry <bzg@gnu.org> 302014-01-07 Bastien Guerry <bzg@gnu.org>
2 31
3 * buffers.texi (Buffers): Fix display of @math content by using 32 * buffers.texi (Buffers): Fix display of @math content by using
@@ -5088,10 +5117,6 @@
5088 5117
5089 * maintaining.texi (Tags): Fix last change. 5118 * maintaining.texi (Tags): Fix last change.
5090 5119
50912008-02-02 Michael Albinus <michael.albinus@gmx.de>
5092
5093 * tramp.texi: Use new FSF's Back-Cover Text.
5094
50952008-01-31 Nick Roberts <nickrob@snap.net.nz> 51202008-01-31 Nick Roberts <nickrob@snap.net.nz>
5096 5121
5097 * trouble.texi (Checklist): Direct users to emacs-devel@gnu.org. 5122 * trouble.texi (Checklist): Direct users to emacs-devel@gnu.org.
@@ -5134,8 +5159,6 @@
5134 * search.texi (Query Replace): Make exp of query-replace more 5159 * search.texi (Query Replace): Make exp of query-replace more
5135 self-contained, and clarify. 5160 self-contained, and clarify.
5136 5161
5137 * cc-mode.texi (Getting Started): Change @ref to @pxref.
5138
51392007-12-15 Richard Stallman <rms@gnu.org> 51622007-12-15 Richard Stallman <rms@gnu.org>
5140 5163
5141 * files.texi (Auto Save): Clarify definition of auto-saving. 5164 * files.texi (Auto Save): Clarify definition of auto-saving.
@@ -5687,6 +5710,11 @@
5687 * frames.texi (Secondary Selection): Window clicked does not matter 5710 * frames.texi (Secondary Selection): Window clicked does not matter
5688 when mouse-yank-at-point is non-nil. 5711 when mouse-yank-at-point is non-nil.
5689 5712
57132007-01-27 Eli Zaretskii <eliz@gnu.org>
5714
5715 * msdog.texi (ls in Lisp): Document ls-lisp-format-time-list and
5716 ls-lisp-use-localized-time-format.
5717
56902007-01-16 Glenn Morris <rgm@gnu.org> 57182007-01-16 Glenn Morris <rgm@gnu.org>
5691 5719
5692 * abbrevs.texi (Editing Abbrevs): Describe how to disable a 5720 * abbrevs.texi (Editing Abbrevs): Describe how to disable a
@@ -6014,6 +6042,11 @@
6014 Change "Library Public License" to "Lesser Public License" 6042 Change "Library Public License" to "Lesser Public License"
6015 throughout. Use "yyyy" to represent year. 6043 throughout. Use "yyyy" to represent year.
6016 6044
60452006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6046
6047 * misc.texi (Interactive Shell): EMACS is now set
6048 to Emacs's absolute file name, not to "t".
6049
60172006-09-12 Reiner Steib <Reiner.Steib@gmx.de> 60502006-09-12 Reiner Steib <Reiner.Steib@gmx.de>
6018 6051
6019 * files.texi (Visiting): Add index entry "open file". 6052 * files.texi (Visiting): Add index entry "open file".
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index fdb38bfd4d1..392c298fa70 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1348,6 +1348,7 @@ not from an existing Emacs buffer.
1348 1348
1349@findex load 1349@findex load
1350@findex load-library 1350@findex load-library
1351@vindex load-prefer-newer
1351@cindex load path for Emacs Lisp 1352@cindex load path for Emacs Lisp
1352 If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path} 1353 If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path}
1353(defined below), you can load it by typing @kbd{M-x load-library}, 1354(defined below), you can load it by typing @kbd{M-x load-library},
@@ -1356,15 +1357,18 @@ command prompts for a @dfn{library name} rather than a file name; it
1356searches through each directory in the Emacs Lisp load path, trying to 1357searches through each directory in the Emacs Lisp load path, trying to
1357find a file matching that library name. If the library name is 1358find a file matching that library name. If the library name is
1358@samp{@var{foo}}, it tries looking for files named 1359@samp{@var{foo}}, it tries looking for files named
1359@file{@var{foo}.elc}, @file{@var{foo}.el}, and lastly just 1360@file{@var{foo}.elc}, @file{@var{foo}.el}, and @file{@var{foo}}. The
1360@file{@var{foo}}; the first one found is loaded. This command prefers 1361default behaviour is to load the first file found. This command
1361@file{.elc} files over @file{.el} files because compiled files load 1362prefers @file{.elc} files over @file{.el} files because compiled files
1362and run faster. If it finds that @file{@var{lib}.el} is newer than 1363load and run faster. If it finds that @file{@var{lib}.el} is newer
1363@file{@var{lib}.elc}, it issues a warning, in case someone made 1364than @file{@var{lib}.elc}, it issues a warning, in case someone made
1364changes to the @file{.el} file and forgot to recompile it, but loads 1365changes to the @file{.el} file and forgot to recompile it, but loads
1365the @file{.elc} file anyway. (Due to this behavior, you can save 1366the @file{.elc} file anyway. (Due to this behavior, you can save
1366unfinished edits to Emacs Lisp source files, and not recompile until 1367unfinished edits to Emacs Lisp source files, and not recompile until
1367your changes are ready for use.) 1368your changes are ready for use.) If you set the option
1369@code{load-prefer-newer} to a non-@code{nil} value, however, then
1370rather than the procedure described above, Emacs loads whichever
1371version of the file is newest.
1368 1372
1369 Emacs Lisp programs usually load Emacs Lisp files using the 1373 Emacs Lisp programs usually load Emacs Lisp files using the
1370@code{load} function. This is similar to @code{load-library}, but is 1374@code{load} function. This is similar to @code{load-library}, but is
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index b9ae5ed0879..b7de1bdf3aa 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1440,3 +1440,18 @@ it onto a Dired buffer; this either moves, copies, or creates a link
1440to the file in that directory. Precisely which action is taken is 1440to the file in that directory. Precisely which action is taken is
1441determined by the originating program. Dragging files out of a Dired 1441determined by the originating program. Dragging files out of a Dired
1442buffer is currently not supported. 1442buffer is currently not supported.
1443
1444@kindex ( @r{(Dired)}
1445@c )
1446@findex dired-hide-details-mode
1447@vindex dired-hide-details-hide-symlink-targets
1448@vindex dired-hide-details-hide-information-lines
1449@cindex Hide details in Dired.
1450 The command @kbd{(} (@code{dired-hide-details-mode}) toggles whether
1451details, such as ownership or file permissions, are hidden. If the
1452variable @code{dired-hide-details-hide-symlink-targets} is
1453non-@code{nil} then targets of symbolic links are hidden as well. A
1454non-@code{nil} value for the variable
1455@code{dired-hide-details-hide-information-lines} means that all lines
1456other than the header and lines containing files and directories are
1457hidden.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 691c8bd8ff5..ca5520198f8 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -190,6 +190,7 @@ Advanced Features
190* Rmail:: Reading mail in Emacs. 190* Rmail:: Reading mail in Emacs.
191* Gnus:: A flexible mail and news reader. 191* Gnus:: A flexible mail and news reader.
192* Document View:: Viewing PDF, PS and DVI files. 192* Document View:: Viewing PDF, PS and DVI files.
193* EWW:: A web browser in Emacs.
193* Shell:: Executing shell commands from Emacs. 194* Shell:: Executing shell commands from Emacs.
194* Emacs Server:: Using Emacs as an editing server. 195* Emacs Server:: Using Emacs as an editing server.
195* Printing:: Printing hardcopies of buffers or regions. 196* Printing:: Printing hardcopies of buffers or regions.
@@ -1338,9 +1339,12 @@ If you find GNU Emacs useful, please @strong{send a donation} to the
1338Free Software Foundation to support our work. Donations to the Free 1339Free Software Foundation to support our work. Donations to the Free
1339Software Foundation are tax deductible in the US@. If you use GNU Emacs 1340Software Foundation are tax deductible in the US@. If you use GNU Emacs
1340at your workplace, please suggest that the company make a donation. 1341at your workplace, please suggest that the company make a donation.
1341For more information on how you can help, see 1342To donate, see @url{https://my.fsf.org/donate/}.
1343For other ways in which you can help, see
1342@url{http://www.gnu.org/help/help.html}. 1344@url{http://www.gnu.org/help/help.html}.
1343 1345
1346@c The command view-order-manuals uses this anchor.
1347@anchor{Printed Books}
1344We also sell hardcopy versions of this manual and @cite{An 1348We also sell hardcopy versions of this manual and @cite{An
1345Introduction to Programming in Emacs Lisp}, by Robert J. Chassell. 1349Introduction to Programming in Emacs Lisp}, by Robert J. Chassell.
1346You can visit our online store at @url{http://shop.fsf.org/}. 1350You can visit our online store at @url{http://shop.fsf.org/}.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 78a820b4efc..449ad9f2aa1 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1944,12 +1944,9 @@ point. Partial Completion mode offers other features extending
1944 1944
1945@findex image-mode 1945@findex image-mode
1946@findex image-toggle-display 1946@findex image-toggle-display
1947@findex image-toggle-animation
1948@findex image-next-file 1947@findex image-next-file
1949@findex image-previous-file 1948@findex image-previous-file
1950@cindex images, viewing 1949@cindex images, viewing
1951@cindex image animation
1952@cindex animated images
1953 Visiting image files automatically selects Image mode. In this 1950 Visiting image files automatically selects Image mode. In this
1954major mode, you can type @kbd{C-c C-c} (@code{image-toggle-display}) 1951major mode, you can type @kbd{C-c C-c} (@code{image-toggle-display})
1955to toggle between displaying the file as an image in the Emacs buffer, 1952to toggle between displaying the file as an image in the Emacs buffer,
@@ -1962,10 +1959,29 @@ displayed. You can press @kbd{n} (@code{image-next-file}) and @kbd{p}
1962(@code{image-previous-file}) to visit the next image file and the 1959(@code{image-previous-file}) to visit the next image file and the
1963previous image file in the same directory, respectively. 1960previous image file in the same directory, respectively.
1964 1961
1965If the image can be animated, the command @kbd{RET} 1962@findex image-toggle-animation
1963@findex image-next-frame
1964@findex image-previous-frame
1965@findex image-goto-frame
1966@findex image-increase-speed
1967@findex image-decrease-speed
1968@findex image-reset-speed
1969@findex image-reverse-speed
1970@vindex image-animate-loop
1971@cindex image animation
1972@cindex animated images
1973 If the image can be animated, the command @kbd{RET}
1966(@code{image-toggle-animation}) starts or stops the animation. 1974(@code{image-toggle-animation}) starts or stops the animation.
1967Animation plays once, unless the option @code{image-animate-loop} is 1975Animation plays once, unless the option @code{image-animate-loop} is
1968non-@code{nil}. 1976non-@code{nil}. With @kbd{f} (@code{image-next-frame}) and @kbd{b}
1977(@code{image-previous-frame}) you can step through the individual
1978frames. Both commands accept a numeric prefix to step through several
1979frames at once. You can go to a specific frame with @kbd{F}
1980(@code{image-goto-frame}). The speed of the animation can be
1981increased by pressing @kbd{a +} (@code{image-increase-speed}) and
1982decreased by pressing @kbd{a -} (@code{image-decrease-speed}). With
1983@kbd{a r} (@code{image-reverse-speed}) the speed is reversed. You can
1984reset the speed with @kbd{a 0} (@code{image-reset-speed}).
1969 1985
1970@cindex ImageMagick support 1986@cindex ImageMagick support
1971@vindex imagemagick-enabled-types 1987@vindex imagemagick-enabled-types
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 8cdeab98677..aed854e1a3f 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -439,6 +439,18 @@ associated with the current buffer, type @kbd{K}
439(@code{doc-view-kill-proc-and-buffer}) kills the converter process and 439(@code{doc-view-kill-proc-and-buffer}) kills the converter process and
440the DocView buffer. 440the DocView buffer.
441 441
442@node EWW
443@section Web Browsing with EWW
444
445@findex eww
446@findex eww-open-file
447 @dfn{EWW}, the Emacs Web Wowser, is a web browser package for Emacs.
448It allows browsing URLs within an Emacs buffer. The command @kbd{M-x
449eww} can be used to open a URL or search the web. A file can be
450opened using the command @kbd{M-x eww-open-file}. EWW can be used as
451web browser for @code{browse-url}, see @ref{Browse-URL}. For full
452details, see @ref{Top, EWW,, eww, The Emacs Web Wowser Manual}.
453
442@node Shell 454@node Shell
443@section Running Shell Commands from Emacs 455@section Running Shell Commands from Emacs
444@cindex subshell 456@cindex subshell
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 137f2738b5b..eeb810fccb7 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -1198,9 +1198,8 @@ mailing list and newsgroup interconnect, so it does not matter which
1198one you use.) 1198one you use.)
1199 1199
1200@item 1200@item
1201Look in the service directory for someone who might help you for a fee. 1201Look in the @uref{http://www.fsf.org/resources/service/, service
1202The service directory is found in the file named @file{etc/SERVICE} in the 1202directory} for someone who might help you for a fee.
1203Emacs distribution.
1204@end itemize 1203@end itemize
1205 1204
1206@ifnottex 1205@ifnottex
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index f6343606b94..4044e965ae7 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,20 @@
12014-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * functions.texi (Advising Functions): New section.
4 * modes.texi (Running Hooks): Don't document with-wrapper-hook and
5 run-hook-wrapped any more.
6 (Hooks): Link to the new Advising Functions node.
7 * elisp.texi (Top): Don't include advice.texi.
8 * advice.texi: Remove.
9 * makefile.w32-in (srcs):
10 * Makefile.in (srcs): Adjust accordingly.
11
122014-01-09 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
13
14 * text.texi (Parsing HTML/XML): Document `shr-insert-document'.
15
16 * strings.texi (Text Comparison): Document `string-suffix-p'.
17
12014-01-07 Glenn Morris <rgm@gnu.org> 182014-01-07 Glenn Morris <rgm@gnu.org>
2 19
3 * files.texi (File Attributes): Fix superscipt typo. 20 * files.texi (File Attributes): Fix superscipt typo.
@@ -9378,7 +9395,7 @@
9378 9395
9379 * variables.texi (Variable Aliases): Simplify. 9396 * variables.texi (Variable Aliases): Simplify.
9380 9397
9381 * anti.texi, backups.texi, compile.texi, customization.texi: 9398 * anti.texi, backups.texi, compile.texi, customize.texi:
9382 * debugging.texi, display.texi, edebug.texi, errors.texi, frames.texi: 9399 * debugging.texi, display.texi, edebug.texi, errors.texi, frames.texi:
9383 * functions.texi, help.texi, keymaps.texi, modes.texi, nonascii.texi: 9400 * functions.texi, help.texi, keymaps.texi, modes.texi, nonascii.texi:
9384 * os.texi, processes.texi, searching.texi, strings.texi, text.texi: 9401 * os.texi, processes.texi, searching.texi, strings.texi, text.texi:
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 6f3320d029c..bb8d4f82884 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -76,7 +76,6 @@ srcs = \
76 $(srcdir)/elisp.texi \ 76 $(srcdir)/elisp.texi \
77 $(emacsdir)/emacsver.texi \ 77 $(emacsdir)/emacsver.texi \
78 $(srcdir)/abbrevs.texi \ 78 $(srcdir)/abbrevs.texi \
79 $(srcdir)/advice.texi \
80 $(srcdir)/anti.texi \ 79 $(srcdir)/anti.texi \
81 $(srcdir)/backups.texi \ 80 $(srcdir)/backups.texi \
82 $(srcdir)/buffers.texi \ 81 $(srcdir)/buffers.texi \
diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi
deleted file mode 100644
index c55f93d445f..00000000000
--- a/doc/lispref/advice.texi
+++ /dev/null
@@ -1,749 +0,0 @@
1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1998-1999, 2001-2014 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions.
5@node Advising Functions
6@chapter Advising Emacs Lisp Functions
7@cindex advising functions
8
9@cindex piece of advice
10 The @dfn{advice} feature lets you add to the existing definition of
11a function, by @dfn{advising the function}. A function can have
12multiple @dfn{pieces of advice}, each of which can be separately
13defined, and separately enabled or disabled (@pxref{Activation of
14Advice}). Each piece of advice can alter almost anything about the
15function, including its argument list, what the function does when it
16runs, and the value it returns.
17
18 Advice can be useful for altering the behavior of an existing
19function without having to redefine the whole function. However, it
20can be a source of bugs, since existing callers to the function may
21assume the old behavior, and work incorrectly when the behavior is
22changed by advice. Advice can also cause confusion in debugging, if
23the person doing the debugging does not notice or remember that the
24function has been modified by advice.
25
26 For these reasons, advice should be reserved for the cases where you
27cannot modify a function's behavior in any other way. If it is
28possible to do the same thing via a hook, that is preferable
29(@pxref{Hooks}). If you simply want to change what a particular key
30does, it may be better to write a new command, and remap the old
31command's key bindings to the new one (@pxref{Remapping Commands}).
32In particular, Emacs's own source files should not put advice on
33functions in Emacs. (There are currently a few exceptions to this
34convention, but we aim to correct them.)
35
36 Macros can also be advised, in much the same way as functions.
37However, special forms (@pxref{Special Forms}) cannot be advised.
38
39 It is possible to advise a primitive (@pxref{What Is a Function}),
40but one should typically @emph{not} do so, for two reasons. Firstly,
41some primitives are used by the advice mechanism, and advising them
42could cause an infinite recursion. Secondly, many primitives are
43called directly from C, and such calls ignore advice; hence, one ends
44up in a confusing situation where some calls (occurring from Lisp
45code) obey the advice and other calls (from C code) do not.
46
47@menu
48* Simple Advice:: A simple example to explain the basics of advice.
49* Defining Advice:: Detailed description of @code{defadvice}.
50* Around-Advice:: Wrapping advice around a function's definition.
51* Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}.
52* Activation of Advice:: Advice doesn't do anything until you activate it.
53* Enabling Advice:: You can enable or disable each piece of advice.
54* Preactivation:: Preactivation is a way of speeding up the
55 loading of compiled advice.
56* Argument Access in Advice:: How advice can access the function's arguments.
57* Combined Definition:: How advice is implemented.
58@end menu
59
60@node Simple Advice
61@section A Simple Advice Example
62
63 The command @code{next-line} moves point down vertically one or more
64lines; it is the standard binding of @kbd{C-n}. When used on the last
65line of the buffer, this command inserts a newline to create a line to
66move to if @code{next-line-add-newlines} is non-@code{nil} (its default
67is @code{nil}.)
68
69 Suppose you wanted to add a similar feature to @code{previous-line},
70which would insert a new line at the beginning of the buffer for the
71command to move to (when @code{next-line-add-newlines} is
72non-@code{nil}). How could you do this?
73
74 You could do it by redefining the whole function, but that is not
75modular. The advice feature provides a cleaner alternative: you can
76effectively add your code to the existing function definition, without
77actually changing or even seeing that definition. Here is how to do
78this:
79
80@example
81(defadvice previous-line (before next-line-at-end
82 (&optional arg try-vscroll))
83 "Insert an empty line when moving up from the top line."
84 (if (and next-line-add-newlines (= arg 1)
85 (save-excursion (beginning-of-line) (bobp)))
86 (progn
87 (beginning-of-line)
88 (newline))))
89@end example
90
91 This expression defines a @dfn{piece of advice} for the function
92@code{previous-line}. This piece of advice is named
93@code{next-line-at-end}, and the symbol @code{before} says that it is
94@dfn{before-advice} which should run before the regular definition of
95@code{previous-line}. @code{(&optional arg try-vscroll)} specifies
96how the advice code can refer to the function's arguments.
97
98 When this piece of advice runs, it creates an additional line, in the
99situation where that is appropriate, but does not move point to that
100line. This is the correct way to write the advice, because the normal
101definition will run afterward and will move back to the newly inserted
102line.
103
104 Defining the advice doesn't immediately change the function
105@code{previous-line}. That happens when you @dfn{activate} the advice,
106like this:
107
108@example
109(ad-activate 'previous-line)
110@end example
111
112@noindent
113This is what actually begins to use the advice that has been defined so
114far for the function @code{previous-line}. Henceforth, whenever that
115function is run, whether invoked by the user with @kbd{C-p} or
116@kbd{M-x}, or called from Lisp, it runs the advice first, and its
117regular definition second.
118
119 This example illustrates before-advice, which is one @dfn{class} of
120advice: it runs before the function's base definition. There are two
121other advice classes: @dfn{after-advice}, which runs after the base
122definition, and @dfn{around-advice}, which lets you specify an
123expression to wrap around the invocation of the base definition.
124
125@node Defining Advice
126@section Defining Advice
127@cindex defining advice
128@cindex advice, defining
129
130 To define a piece of advice, use the macro @code{defadvice}. A call
131to @code{defadvice} has the following syntax, which is based on the
132syntax of @code{defun} and @code{defmacro}, but adds more:
133
134@findex defadvice
135@example
136(defadvice @var{function} (@var{class} @var{name}
137 @r{[}@var{position}@r{]} @r{[}@var{arglist}@r{]}
138 @var{flags}...)
139 @r{[}@var{documentation-string}@r{]}
140 @r{[}@var{interactive-form}@r{]}
141 @var{body-forms}...)
142@end example
143
144@noindent
145Here, @var{function} is the name of the function (or macro) to be
146advised. From now on, we will write just ``function'' when describing
147the entity being advised, but this always includes macros.
148
149 In place of the argument list in an ordinary definition, an advice
150definition calls for several different pieces of information.
151
152@cindex class of advice
153@cindex before-advice
154@cindex after-advice
155@cindex around-advice
156@var{class} specifies the @dfn{class} of the advice---one of @code{before},
157@code{after}, or @code{around}. Before-advice runs before the function
158itself; after-advice runs after the function itself; around-advice is
159wrapped around the execution of the function itself. After-advice and
160around-advice can override the return value by setting
161@code{ad-return-value}.
162
163@defvar ad-return-value
164While advice is executing, after the function's original definition has
165been executed, this variable holds its return value, which will
166ultimately be returned to the caller after finishing all the advice.
167After-advice and around-advice can arrange to return some other value
168by storing it in this variable.
169@end defvar
170
171The argument @var{name} is the name of the advice, a non-@code{nil}
172symbol. The advice name uniquely identifies one piece of advice, within all
173the pieces of advice in a particular class for a particular
174@var{function}. The name allows you to refer to the piece of
175advice---to redefine it, or to enable or disable it.
176
177The optional @var{position} specifies where, in the current list of
178advice of the specified @var{class}, this new advice should be placed.
179It should be either @code{first}, @code{last} or a number that specifies
180a zero-based position (@code{first} is equivalent to 0). If no position
181is specified, the default is @code{first}. Position values outside the
182range of existing positions in this class are mapped to the beginning or
183the end of the range, whichever is closer. The @var{position} value is
184ignored when redefining an existing piece of advice.
185
186The optional @var{arglist} can be used to define the argument list for
187the sake of advice. This becomes the argument list of the combined
188definition that is generated in order to run the advice (@pxref{Combined
189Definition}). Therefore, the advice expressions can use the argument
190variables in this list to access argument values.
191
192The argument list used in advice need not be the same as the argument
193list used in the original function, but must be compatible with it, so
194that it can handle the ways the function is actually called. If two
195pieces of advice for a function both specify an argument list, they must
196specify the same argument list.
197
198@xref{Argument Access in Advice}, for more information about argument
199lists and advice, and a more flexible way for advice to access the
200arguments.
201
202The remaining elements, @var{flags}, are symbols that specify further
203information about how to use this piece of advice. Here are the valid
204symbols and their meanings:
205
206@table @code
207@item activate
208Activate the advice for @var{function} now. Changes in a function's
209advice always take effect the next time you activate advice for the
210function; this flag says to do so, for @var{function}, immediately after
211defining this piece of advice.
212
213@cindex forward advice
214This flag has no immediate effect if @var{function} itself is not defined yet (a
215situation known as @dfn{forward advice}), because it is impossible to
216activate an undefined function's advice. However, defining
217@var{function} will automatically activate its advice.
218
219@item protect
220Protect this piece of advice against non-local exits and errors in
221preceding code and advice. Protecting advice places it as a cleanup in
222an @code{unwind-protect} form, so that it will execute even if the
223previous code gets an error or uses @code{throw}. @xref{Cleanups}.
224
225@item compile
226Compile the combined definition that is used to run the advice. This
227flag is ignored unless @code{activate} is also specified.
228@xref{Combined Definition}.
229
230@item disable
231Initially disable this piece of advice, so that it will not be used
232unless subsequently explicitly enabled. @xref{Enabling Advice}.
233
234@item preactivate
235Activate advice for @var{function} when this @code{defadvice} is
236compiled or macroexpanded. This generates a compiled advised definition
237according to the current advice state, which will be used during
238activation if appropriate. @xref{Preactivation}.
239
240This is useful only if this @code{defadvice} is byte-compiled.
241@end table
242
243The optional @var{documentation-string} serves to document this piece of
244advice. When advice is active for @var{function}, the documentation for
245@var{function} (as returned by @code{documentation}) combines the
246documentation strings of all the advice for @var{function} with the
247documentation string of its original function definition.
248
249The optional @var{interactive-form} form can be supplied to change the
250interactive behavior of the original function. If more than one piece
251of advice has an @var{interactive-form}, then the first one (the one
252with the smallest position) found among all the advice takes precedence.
253
254The possibly empty list of @var{body-forms} specifies the body of the
255advice. The body of an advice can access or change the arguments, the
256return value, the binding environment, and perform any other kind of
257side effect.
258
259@strong{Warning:} When you advise a macro, keep in mind that macros are
260expanded when a program is compiled, not when a compiled program is run.
261All subroutines used by the advice need to be available when the byte
262compiler expands the macro.
263
264@deffn Command ad-unadvise function
265This command deletes all pieces of advice from @var{function}.
266@end deffn
267
268@deffn Command ad-unadvise-all
269This command deletes all pieces of advice from all functions.
270@end deffn
271
272@node Around-Advice
273@section Around-Advice
274
275 Around-advice lets you ``wrap'' a Lisp expression ``around'' the
276original function definition. You specify where the original function
277definition should go by means of the special symbol @code{ad-do-it}.
278Where this symbol occurs inside the around-advice body, it is replaced
279with a @code{progn} containing the forms of the surrounded code. Here
280is an example:
281
282@example
283(defadvice foo (around foo-around)
284 "Ignore case in `foo'."
285 (let ((case-fold-search t))
286 ad-do-it))
287@end example
288
289@noindent
290Its effect is to make sure that case is ignored in
291searches when the original definition of @code{foo} is run.
292
293@defvar ad-do-it
294This is not really a variable, rather a place-holder that looks like a
295variable. You use it in around-advice to specify the place to run the
296function's original definition and other ``earlier'' around-advice.
297@end defvar
298
299If the around-advice does not use @code{ad-do-it}, then it does not run
300the original function definition. This provides a way to override the
301original definition completely. (It also overrides lower-positioned
302pieces of around-advice).
303
304If the around-advice uses @code{ad-do-it} more than once, the original
305definition is run at each place. In this way, around-advice can execute
306the original definition (and lower-positioned pieces of around-advice)
307several times. Another way to do that is by using @code{ad-do-it}
308inside of a loop.
309
310@node Computed Advice
311@section Computed Advice
312
313The macro @code{defadvice} resembles @code{defun} in that the code for
314the advice, and all other information about it, are explicitly stated in
315the source code. You can also create advice whose details are computed,
316using the function @code{ad-add-advice}.
317
318@defun ad-add-advice function advice class position
319Calling @code{ad-add-advice} adds @var{advice} as a piece of advice to
320@var{function} in class @var{class}. The argument @var{advice} has
321this form:
322
323@example
324(@var{name} @var{protected} @var{enabled} @var{definition})
325@end example
326
327@noindent
328Here, @var{protected} and @var{enabled} are flags; if @var{protected}
329is non-@code{nil}, the advice is protected against non-local exits
330(@pxref{Defining Advice}), and if @var{enabled} is @code{nil} the
331advice is initially disabled (@pxref{Enabling Advice}).
332@var{definition} should have the form
333
334@example
335(advice . @var{lambda})
336@end example
337
338@noindent
339where @var{lambda} is a lambda expression; this lambda expression is
340called in order to perform the advice. @xref{Lambda Expressions}.
341
342If the @var{function} argument to @code{ad-add-advice} already has one
343or more pieces of advice in the specified @var{class}, then
344@var{position} specifies where in the list to put the new piece of
345advice. The value of @var{position} can either be @code{first},
346@code{last}, or a number (counting from 0 at the beginning of the
347list). Numbers outside the range are mapped to the beginning or the
348end of the range, whichever is closer. The @var{position} value is
349ignored when redefining an existing piece of advice.
350
351If @var{function} already has a piece of @var{advice} with the same
352name, then the position argument is ignored and the old advice is
353replaced with the new one.
354@end defun
355
356@node Activation of Advice
357@section Activation of Advice
358@cindex activating advice
359@cindex advice, activating
360
361By default, advice does not take effect when you define it---only when
362you @dfn{activate} advice for the function. However, the advice will
363be activated automatically if you define or redefine the function
364later. You can request the activation of advice for a function when
365you define the advice, by specifying the @code{activate} flag in the
366@code{defadvice}; or you can activate the advice separately by calling
367the function @code{ad-activate} or one of the other activation
368commands listed below.
369
370Separating the activation of advice from the act of defining it permits
371you to add several pieces of advice to one function efficiently, without
372redefining the function over and over as each advice is added. More
373importantly, it permits defining advice for a function before that
374function is actually defined.
375
376When a function's advice is first activated, the function's original
377definition is saved, and all enabled pieces of advice for that function
378are combined with the original definition to make a new definition.
379(Pieces of advice that are currently disabled are not used; see
380@ref{Enabling Advice}.) This definition is installed, and optionally
381byte-compiled as well, depending on conditions described below.
382
383In all of the commands to activate advice, if @var{compile} is
384@code{t} (or anything but @code{nil} or a negative number), the
385command also compiles the combined definition which implements the
386advice. If it is @code{nil} or a negative number, what happens
387depends on @code{ad-default-compilation-action} as described below.
388
389@deffn Command ad-activate function &optional compile
390This command activates all the advice defined for @var{function}.
391@end deffn
392
393 Activating advice does nothing if @var{function}'s advice is already
394active. But if there is new advice, added since the previous time you
395activated advice for @var{function}, it activates the new advice.
396
397@deffn Command ad-deactivate function
398This command deactivates the advice for @var{function}.
399@cindex deactivating advice
400@c @cindex advice, deactivating "advice, activating" is just above
401@end deffn
402
403@deffn Command ad-update function &optional compile
404This command activates the advice for @var{function}
405if its advice is already activated. This is useful
406if you change the advice.
407@end deffn
408
409@deffn Command ad-activate-all &optional compile
410This command activates the advice for all functions.
411@end deffn
412
413@deffn Command ad-deactivate-all
414This command deactivates the advice for all functions.
415@end deffn
416
417@deffn Command ad-update-all &optional compile
418This command activates the advice for all functions
419whose advice is already activated. This is useful
420if you change the advice of some functions.
421@end deffn
422
423@deffn Command ad-activate-regexp regexp &optional compile
424This command activates all pieces of advice whose names match
425@var{regexp}. More precisely, it activates all advice for any function
426which has at least one piece of advice that matches @var{regexp}.
427@end deffn
428
429@deffn Command ad-deactivate-regexp regexp
430This command deactivates all pieces of advice whose names match
431@var{regexp}. More precisely, it deactivates all advice for any
432function which has at least one piece of advice that matches
433@var{regexp}.
434@end deffn
435
436@deffn Command ad-update-regexp regexp &optional compile
437This command activates pieces of advice whose names match @var{regexp},
438but only those for functions whose advice is already activated.
439@cindex reactivating advice
440
441Reactivating a function's advice is useful for putting into effect all
442the changes that have been made in its advice (including enabling and
443disabling specific pieces of advice; @pxref{Enabling Advice}) since the
444last time it was activated.
445@end deffn
446
447@deffn Command ad-start-advice
448Turn on automatic advice activation when a function is defined or
449redefined. This is the default mode.
450@end deffn
451
452@deffn Command ad-stop-advice
453Turn off automatic advice activation when a function is defined or
454redefined.
455@end deffn
456
457@defopt ad-default-compilation-action
458This variable controls whether to compile the combined definition
459that results from activating advice for a function.
460
461A value of @code{always} specifies to compile unconditionally.
462A value of @code{never} specifies never compile the advice.
463
464A value of @code{maybe} specifies to compile if the byte compiler is
465already loaded. A value of @code{like-original} specifies to compile
466the advice if the original definition of the advised function is
467compiled or a built-in function.
468
469This variable takes effect only if the @var{compile} argument of
470@code{ad-activate} (or any of the above functions) did not force
471compilation.
472@end defopt
473
474 If the advised definition was constructed during ``preactivation''
475(@pxref{Preactivation}), then that definition must already be compiled,
476because it was constructed during byte-compilation of the file that
477contained the @code{defadvice} with the @code{preactivate} flag.
478
479@node Enabling Advice
480@section Enabling and Disabling Advice
481@cindex enabling advice
482@cindex advice, enabling and disabling
483@cindex disabling advice
484
485 Each piece of advice has a flag that says whether it is enabled or
486not. By enabling or disabling a piece of advice, you can turn it on
487and off without having to undefine and redefine it. For example, here is
488how to disable a particular piece of advice named @code{my-advice} for
489the function @code{foo}:
490
491@example
492(ad-disable-advice 'foo 'before 'my-advice)
493@end example
494
495 This function by itself only changes the enable flag for a piece of
496advice. To make the change take effect in the advised definition, you
497must activate the advice for @code{foo} again:
498
499@example
500(ad-activate 'foo)
501@end example
502
503@deffn Command ad-disable-advice function class name
504This command disables the piece of advice named @var{name} in class
505@var{class} on @var{function}.
506@end deffn
507
508@deffn Command ad-enable-advice function class name
509This command enables the piece of advice named @var{name} in class
510@var{class} on @var{function}.
511@end deffn
512
513 You can also disable many pieces of advice at once, for various
514functions, using a regular expression. As always, the changes take real
515effect only when you next reactivate advice for the functions in
516question.
517
518@deffn Command ad-disable-regexp regexp
519This command disables all pieces of advice whose names match
520@var{regexp}, in all classes, on all functions.
521@end deffn
522
523@deffn Command ad-enable-regexp regexp
524This command enables all pieces of advice whose names match
525@var{regexp}, in all classes, on all functions.
526@end deffn
527
528@node Preactivation
529@section Preactivation
530@cindex preactivating advice
531@cindex advice, preactivating
532
533 Constructing a combined definition to execute advice is moderately
534expensive. When a library advises many functions, this can make loading
535the library slow. In that case, you can use @dfn{preactivation} to
536construct suitable combined definitions in advance.
537
538 To use preactivation, specify the @code{preactivate} flag when you
539define the advice with @code{defadvice}. This @code{defadvice} call
540creates a combined definition which embodies this piece of advice
541(whether enabled or not) plus any other currently enabled advice for the
542same function, and the function's own definition. If the
543@code{defadvice} is compiled, that compiles the combined definition
544also.
545
546 When the function's advice is subsequently activated, if the enabled
547advice for the function matches what was used to make this combined
548definition, then the existing combined definition is used, thus avoiding
549the need to construct one. Thus, preactivation never causes wrong
550results---but it may fail to do any good, if the enabled advice at the
551time of activation doesn't match what was used for preactivation.
552
553 Here are some symptoms that can indicate that a preactivation did not
554work properly, because of a mismatch.
555
556@itemize @bullet
557@item
558Activation of the advised
559function takes longer than usual.
560@item
561The byte compiler gets
562loaded while an advised function gets activated.
563@item
564@code{byte-compile} is included in the value of @code{features} even
565though you did not ever explicitly use the byte compiler.
566@end itemize
567
568Compiled preactivated advice works properly even if the function itself
569is not defined until later; however, the function needs to be defined
570when you @emph{compile} the preactivated advice.
571
572There is no elegant way to find out why preactivated advice is not being
573used. What you can do is to trace the function
574@code{ad-cache-id-verification-code} (with the function
575@code{trace-function-background}) before the advised function's advice
576is activated. After activation, check the value returned by
577@code{ad-cache-id-verification-code} for that function: @code{verified}
578means that the preactivated advice was used, while other values give
579some information about why they were considered inappropriate.
580
581 @strong{Warning:} There is one known case that can make preactivation
582fail, in that a preconstructed combined definition is used even though
583it fails to match the current state of advice. This can happen when two
584packages define different pieces of advice with the same name, in the
585same class, for the same function. But you should avoid that anyway.
586
587@node Argument Access in Advice
588@section Argument Access in Advice
589
590 The simplest way to access the arguments of an advised function in the
591body of a piece of advice is to use the same names that the function
592definition uses. To do this, you need to know the names of the argument
593variables of the original function.
594
595 While this simple method is sufficient in many cases, it has a
596disadvantage: it is not robust, because it hard-codes the argument names
597into the advice. If the definition of the original function changes,
598the advice might break.
599
600 Another method is to specify an argument list in the advice itself.
601This avoids the need to know the original function definition's argument
602names, but it has a limitation: all the advice on any particular
603function must use the same argument list, because the argument list
604actually used for all the advice comes from the first piece of advice
605for that function.
606
607 A more robust method is to use macros that are translated into the
608proper access forms at activation time, i.e., when constructing the
609advised definition. Access macros access actual arguments by their
610(zero-based) position, regardless of how these actual arguments get
611distributed onto the argument variables of a function. This is robust
612because in Emacs Lisp the meaning of an argument is strictly
613determined by its position in the argument list.
614
615@defmac ad-get-arg position
616This returns the actual argument that was supplied at @var{position}.
617@end defmac
618
619@defmac ad-get-args position
620This returns the list of actual arguments supplied starting at
621@var{position}.
622@end defmac
623
624@defmac ad-set-arg position value
625This sets the value of the actual argument at @var{position} to
626@var{value}
627@end defmac
628
629@defmac ad-set-args position value-list
630This sets the list of actual arguments starting at @var{position} to
631@var{value-list}.
632@end defmac
633
634 Now an example. Suppose the function @code{foo} is defined as
635
636@example
637(defun foo (x y &optional z &rest r) ...)
638@end example
639
640@noindent
641and is then called with
642
643@example
644(foo 0 1 2 3 4 5 6)
645@end example
646
647@noindent
648which means that @var{x} is 0, @var{y} is 1, @var{z} is 2 and @var{r} is
649@code{(3 4 5 6)} within the body of @code{foo}. Here is what
650@code{ad-get-arg} and @code{ad-get-args} return in this case:
651
652@example
653(ad-get-arg 0) @result{} 0
654(ad-get-arg 1) @result{} 1
655(ad-get-arg 2) @result{} 2
656(ad-get-arg 3) @result{} 3
657(ad-get-args 2) @result{} (2 3 4 5 6)
658(ad-get-args 4) @result{} (4 5 6)
659@end example
660
661 Setting arguments also makes sense in this example:
662
663@example
664(ad-set-arg 5 "five")
665@end example
666
667@noindent
668has the effect of changing the sixth argument to @code{"five"}. If this
669happens in advice executed before the body of @code{foo} is run, then
670@var{r} will be @code{(3 4 "five" 6)} within that body.
671
672 Here is an example of setting a tail of the argument list:
673
674@example
675(ad-set-args 0 '(5 4 3 2 1 0))
676@end example
677
678@noindent
679If this happens in advice executed before the body of @code{foo} is run,
680then within that body, @var{x} will be 5, @var{y} will be 4, @var{z}
681will be 3, and @var{r} will be @code{(2 1 0)} inside the body of
682@code{foo}.
683
684 These argument constructs are not really implemented as Lisp macros.
685Instead they are implemented specially by the advice mechanism.
686
687@node Combined Definition
688@section The Combined Definition
689
690 Suppose that a function has @var{n} pieces of before-advice
691(numbered from 0 through @var{n}@minus{}1), @var{m} pieces of
692around-advice and @var{k} pieces of after-advice. Assuming no piece
693of advice is protected, the combined definition produced to implement
694the advice for a function looks like this:
695
696@example
697(lambda @var{arglist}
698 @r{[} @r{[}@var{advised-docstring}@r{]} @r{[}(interactive ...)@r{]} @r{]}
699 (let (ad-return-value)
700 @r{before-0-body-form}...
701 ....
702 @r{before-@var{n}@minus{}1-body-form}...
703 @r{around-0-body-form}...
704 @r{around-1-body-form}...
705 ....
706 @r{around-@var{m}@minus{}1-body-form}...
707 (setq ad-return-value
708 @r{apply original definition to @var{arglist}})
709 @r{end-of-around-@var{m}@minus{}1-body-form}...
710 ....
711 @r{end-of-around-1-body-form}...
712 @r{end-of-around-0-body-form}...
713 @r{after-0-body-form}...
714 ....
715 @r{after-@var{k}@minus{}1-body-form}...
716 ad-return-value))
717@end example
718
719Macros are redefined as macros, which means adding @code{macro} to
720the beginning of the combined definition.
721
722The interactive form is present if the original function or some piece
723of advice specifies one. When an interactive primitive function is
724advised, advice uses a special method: it calls the primitive with
725@code{call-interactively} so that it will read its own arguments.
726In this case, the advice cannot access the arguments.
727
728The body forms of the various advice in each class are assembled
729according to their specified order. The forms of around-advice @var{l}
730are included in one of the forms of around-advice @var{l} @minus{} 1.
731
732The innermost part of the around advice onion is
733
734@display
735apply original definition to @var{arglist}
736@end display
737
738@noindent
739whose form depends on the type of the original function. The variable
740@code{ad-return-value} is set to whatever this returns. The variable is
741visible to all pieces of advice, which can access and modify it before
742it is actually returned from the advised function.
743
744The semantic structure of advised functions that contain protected
745pieces of advice is the same. The only difference is that
746@code{unwind-protect} forms ensure that the protected advice gets
747executed even if some previous piece of advice had an error or a
748non-local exit. If any around-advice is protected, then the whole
749around-advice onion is protected as a result.
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 9681c3c42a3..0b2154cdb5e 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -194,7 +194,6 @@ To view this manual in other formats, click
194 194
195* Loading:: Reading files of Lisp code into Lisp. 195* Loading:: Reading files of Lisp code into Lisp.
196* Byte Compilation:: Compilation makes programs run faster. 196* Byte Compilation:: Compilation makes programs run faster.
197* Advising Functions:: Adding to the definition of a function.
198* Debugging:: Tools and tips for debugging Lisp programs. 197* Debugging:: Tools and tips for debugging Lisp programs.
199 198
200* Read and Print:: Converting Lisp objects to text and back. 199* Read and Print:: Converting Lisp objects to text and back.
@@ -614,19 +613,6 @@ Byte Compilation
614* Byte-Code Objects:: The data type used for byte-compiled functions. 613* Byte-Code Objects:: The data type used for byte-compiled functions.
615* Disassembly:: Disassembling byte-code; how to read byte-code. 614* Disassembly:: Disassembling byte-code; how to read byte-code.
616 615
617Advising Emacs Lisp Functions
618
619* Simple Advice:: A simple example to explain the basics of advice.
620* Defining Advice:: Detailed description of @code{defadvice}.
621* Around-Advice:: Wrapping advice around a function's definition.
622* Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}.
623* Activation of Advice:: Advice doesn't do anything until you activate it.
624* Enabling Advice:: You can enable or disable each piece of advice.
625* Preactivation:: Preactivation is a way of speeding up the
626 loading of compiled advice.
627* Argument Access in Advice:: How advice can access the function's arguments.
628* Combined Definition:: How advice is implemented.
629
630Debugging Lisp Programs 616Debugging Lisp Programs
631 617
632* Debugger:: A debugger for the Emacs Lisp evaluator. 618* Debugger:: A debugger for the Emacs Lisp evaluator.
@@ -1561,7 +1547,6 @@ Object Internals
1561@include customize.texi 1547@include customize.texi
1562@include loading.texi 1548@include loading.texi
1563@include compile.texi 1549@include compile.texi
1564@include advice.texi
1565 1550
1566@c This includes edebug.texi. 1551@c This includes edebug.texi.
1567@include debugging.texi 1552@include debugging.texi
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index d203f1c824f..d86430a5ac0 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -21,6 +21,7 @@ define them.
21* Function Cells:: Accessing or setting the function definition 21* Function Cells:: Accessing or setting the function definition
22 of a symbol. 22 of a symbol.
23* Closures:: Functions that enclose a lexical environment. 23* Closures:: Functions that enclose a lexical environment.
24* Advising Functions:: Adding to the definition of a function.
24* Obsolete Functions:: Declaring functions obsolete. 25* Obsolete Functions:: Declaring functions obsolete.
25* Inline Functions:: Functions that the compiler will expand inline. 26* Inline Functions:: Functions that the compiler will expand inline.
26* Declare Form:: Adding additional information about a function. 27* Declare Form:: Adding additional information about a function.
@@ -1077,12 +1078,10 @@ This function stores @var{definition} in the function cell of
1077this is not checked. The argument @var{symbol} is an ordinary evaluated 1078this is not checked. The argument @var{symbol} is an ordinary evaluated
1078argument. 1079argument.
1079 1080
1080The primary use of this function is as a subroutine by constructs that 1081The primary use of this function is as a subroutine by constructs that define
1081define or alter functions, like @code{defadvice} (@pxref{Advising 1082or alter functions, like @code{defun} or @code{advice-add} (@pxref{Advising
1082Functions}). (If @code{defun} were not a primitive, it could be 1083Functions}). You can also use it to give a symbol a function definition that
1083written as a Lisp macro using @code{fset}.) You can also use it to 1084is not a function, e.g., a keyboard macro (@pxref{Keyboard Macros}):
1084give a symbol a function definition that is not a list, e.g., a
1085keyboard macro (@pxref{Keyboard Macros}):
1086 1085
1087@example 1086@example
1088;; @r{Define a named keyboard macro.} 1087;; @r{Define a named keyboard macro.}
@@ -1133,6 +1132,269 @@ However, the fact that the internal structure of a closure is
1133implementation detail. For this reason, we recommend against directly 1132implementation detail. For this reason, we recommend against directly
1134examining or altering the structure of closure objects. 1133examining or altering the structure of closure objects.
1135 1134
1135@node Advising Functions
1136@section Advising Emacs Lisp Functions
1137@cindex advising functions
1138@cindex piece of advice
1139
1140Any variable or object field which holds a function can be modified with the
1141appropriate setter function, such as @code{set-process-filter}, @code{fset}, or
1142@code{setq}, but those can be too blunt, completely throwing away the
1143previous value.
1144
1145In order to modify such hooks in a more controlled way, Emacs provides the
1146macros @code{add-function} and @code{remove-function}, which let you modify the
1147existing function value by composing it with another function.
1148
1149For example, in order to trace the calls to a process filter, you can use:
1150
1151@example
1152(add-function :before (process-filter proc) #'my-tracing-function)
1153@end example
1154
1155This will cause the process's output to be passed first to
1156@code{my-tracing-function} and then to the original process filter.
1157When you're done with it, you can revert to the untraced behavior with:
1158
1159@example
1160(remove-function (process-filter proc) #'my-tracing-function)
1161@end example
1162
1163The argument @code{:before} specifies how the two functions are composed, since
1164there are many different ways to do it. The added function is also called an
1165@emph{advice}.
1166
1167The function cell of a symbol can be manipulated similarly, but since it can
1168contain other things than a plain function, you have to use @var{advice-add}
1169and @var{advice-remove} instead, which
1170@c use @var{add-function} and @var{remove-function} internally, but
1171know how to handle cases such as when the function cell holds a macro rather
1172than function, or when the function is autoloaded so the advice's activation
1173needs to be postponed.
1174
1175@menu
1176* Advising Primitives:: Primitives to Manipulate Advices
1177* Advising Named Functions:: Advising Named Functions
1178@end menu
1179
1180@node Advising Primitives
1181@subsection Primitives to manipulate advice
1182
1183@defmac add-function where place function &optional props
1184This macro is the handy way to add the advice @var{function} to the function
1185stored in @var{place} (@pxref{Generalized Variables}).
1186
1187@var{where} determines how @var{function} is composed with the
1188existing function. It can be one of the following:
1189
1190@table @code
1191@item :before
1192Call @var{function} before the old function. Both functions receive the
1193same arguments, and the return value of the composition is the return value of
1194the old function. More specifically, the composition of the two functions
1195behaves like:
1196@example
1197(lambda (&rest r) (apply @var{function} r) (apply @var{oldfun} r))
1198@end example
1199This is similar to @code{(add-hook @var{hook} @var{function})}, except that it
1200applies to single-function hooks rather than normal hooks.
1201
1202@item :after
1203Call @var{function} after the old function. Both functions receive the
1204same arguments, and the return value of the composition is the return value of
1205the old function. More specifically, the composition of the two functions
1206behaves like:
1207@example
1208(lambda (&rest r) (prog1 (apply @var{oldfun} r) (apply @var{function} r)))
1209@end example
1210This is similar to @code{(add-hook @var{hook} @var{function} nil 'append)},
1211except that it applies to single-function hooks rather than normal hooks.
1212
1213@item :override
1214This completely replaces the old function with the new one. The old function
1215can of course be recovered if you later call @code{remove-function}.
1216
1217@item :around
1218Call @var{function} instead of the old function, but provide the old function
1219as an extra argument to @var{function}. This is the most flexible composition.
1220For example, it lets you call the old function with different arguments, or
1221within a let-binding, or you can sometimes delegate the work to the old
1222function and sometimes override it completely. More specifically, the
1223composition of the two functions behaves like:
1224@example
1225(lambda (&rest r) (apply @var{function} @var{oldfun} r))
1226@end example
1227
1228@item :before-while
1229Call @var{function} before the old function and don't call the old
1230function if @var{function} returns @code{nil}. Both functions receive the
1231same arguments, and the return value of the composition is the return value of
1232the old function. More specifically, the composition of the two functions
1233behaves like:
1234@example
1235(lambda (&rest r) (and (apply @var{function} r) (apply @var{oldfun} r)))
1236@end example
1237This is reminiscent of @code{(add-hook @var{hook} @var{function})}, when
1238@var{hook} is run via @code{run-hook-with-args-until-failure}.
1239
1240@item :before-until
1241Call @var{function} before the old function and only call the old function if
1242@var{function} returns @code{nil}. More specifically, the composition of the
1243two functions behaves like:
1244@example
1245(lambda (&rest r) (or (apply @var{function} r) (apply @var{oldfun} r)))
1246@end example
1247This is reminiscent of @code{(add-hook @var{hook} @var{function})}, when
1248@var{hook} is run via @code{run-hook-with-args-until-success}.
1249
1250@item :after-while
1251Call @var{function} after the old function and only if the old function
1252returned non-@code{nil}. Both functions receive the same arguments, and the
1253return value of the composition is the return value of @var{function}.
1254More specifically, the composition of the two functions behaves like:
1255@example
1256(lambda (&rest r) (and (apply @var{oldfun} r) (apply @var{function} r)))
1257@end example
1258This is reminiscent of @code{(add-hook @var{hook} @var{function} nil 'append)},
1259when @var{hook} is run via @code{run-hook-with-args-until-failure}.
1260
1261@item :after-until
1262Call @var{function} after the old function and only if the old function
1263returned @code{nil}. More specifically, the composition of the two functions
1264behaves like:
1265@example
1266(lambda (&rest r) (or (apply @var{oldfun} r) (apply @var{function} r)))
1267@end example
1268This is reminiscent of @code{(add-hook @var{hook} @var{function} nil 'append)},
1269when @var{hook} is run via @code{run-hook-with-args-until-success}.
1270
1271@item :filter-args
1272Call @var{function} first and use the result (which should be a list) as the
1273new arguments to pass to the old function. More specifically, the composition
1274of the two functions behaves like:
1275@example
1276(lambda (&rest r) (apply @var{oldfun} (funcall @var{function} r)))
1277@end example
1278
1279@item :filter-return
1280Call the old function first and pass the result to @var{function}.
1281More specifically, the composition of the two functions behaves like:
1282@example
1283(lambda (&rest r) (funcall @var{function} (apply @var{oldfun} r)))
1284@end example
1285@end table
1286
1287When modifying a variable (whose name will usually end with @code{-function}),
1288you can choose whether @var{function} is used globally or only in the current
1289buffer: if @var{place} is just a symbol, then @var{function} is added to the
1290global value of @var{place}. Whereas if @var{place} is of the form
1291@code{(local @var{symbol})}, where @var{symbol} is an expression which returns
1292the variable name, then @var{function} will only be added in the
1293current buffer.
1294
1295Every function added with @code{add-function} can be accompanied by an
1296association list of properties @var{props}. Currently only two of those
1297properties have a special meaning:
1298
1299@table @code
1300@item name
1301This gives a name to the advice, which @code{remove-function} can use to
1302identify which function to remove. Typically used when @var{function} is an
1303anonymous function.
1304
1305@item depth
1306This specifies where to place the advice, in case several advices are present.
1307By default, the depth is 0. A depth of 100 indicates that this advice should
1308be kept as deep as possible, whereas a depth of -100 indicates that it
1309should stay as the outermost advice. When two advices specify the same depth,
1310the most recently added advice will be outermost.
1311@end table
1312@end defmac
1313
1314@defmac remove-function place function
1315This macro removes @var{function} from the function stored in
1316@var{place}. This only works if @var{function} was added to @var{place}
1317using @code{add-function}.
1318
1319@var{function} is compared with functions added to @var{place} using
1320@code{equal}, to try and make it work also with lambda expressions. It is
1321additionally compared also with the @code{name} property of the functions added
1322to @var{place}, which can be more reliable than comparing lambda expressions
1323using @code{equal}.
1324@end defmac
1325
1326@defun advice-function-member-p advice function-def
1327Return non-@code{nil} if @var{advice} is already in @var{function-def}.
1328Like for @code{remove-function} above, instead of @var{advice} being the actual
1329function, it can also be the @code{name} of the piece of advice.
1330@end defun
1331
1332@defun advice-function-mapc f function-def
1333Call the function @var{f} for every advice that was added to
1334@var{function-def}. @var{f} is called with two arguments: the advice function
1335and its properties.
1336@end defun
1337
1338@node Advising Named Functions
1339@subsection Advising Named Functions
1340
1341A common use of advice is for named functions and macros.
1342Since @var{add-function} does not know how to deal with macros and autoloaded
1343functions, Emacs provides a separate set of functions to manipulate pieces of
1344advice applied to named functions.
1345
1346 Advice can be useful for altering the behavior of an existing
1347function without having to redefine the whole function. However, it
1348can be a source of bugs, since existing callers to the function may
1349assume the old behavior, and work incorrectly when the behavior is
1350changed by advice. Advice can also cause confusion in debugging, if
1351the person doing the debugging does not notice or remember that the
1352function has been modified by advice.
1353
1354 For these reasons, advice should be reserved for the cases where you
1355cannot modify a function's behavior in any other way. If it is
1356possible to do the same thing via a hook, that is preferable
1357(@pxref{Hooks}). If you simply want to change what a particular key
1358does, it may be better to write a new command, and remap the old
1359command's key bindings to the new one (@pxref{Remapping Commands}).
1360In particular, Emacs's own source files should not put advice on
1361functions in Emacs. (There are currently a few exceptions to this
1362convention, but we aim to correct them.)
1363
1364 Macros can also be advised, in much the same way as functions.
1365However, special forms (@pxref{Special Forms}) cannot be advised.
1366
1367 It is possible to advise a primitive (@pxref{What Is a Function}),
1368but one should typically @emph{not} do so, for two reasons. Firstly,
1369some primitives are used by the advice mechanism, and advising them
1370could cause an infinite recursion. Secondly, many primitives are
1371called directly from C, and such calls ignore advice; hence, one ends
1372up in a confusing situation where some calls (occurring from Lisp
1373code) obey the advice and other calls (from C code) do not.
1374
1375@defun advice-add symbol where function &optional props
1376Add the advice @var{function} to the named function @var{symbol}.
1377@var{where} and @var{props} have the same meaning as for @code{add-function}
1378(@pxref{Advising Primitives}).
1379@end defun
1380
1381@defun advice-remove symbol function
1382Remove the advice @var{function} from the named function @var{symbol}.
1383@var{function} can also be the @code{name} of an advice.
1384@end defun
1385
1386@defun advice-member-p function symbol
1387Return non-@code{nil} if the advice @var{function} is already in the named
1388function @var{symbol}. @var{function} can also be the @code{name} of
1389an advice.
1390@end defun
1391
1392@defun advice-mapc function symbol
1393Call @var{function} for every advice that was added to the named function
1394@var{symbol}. @var{function} is called with two arguments: the advice function
1395and its properties.
1396@end defun
1397
1136@node Obsolete Functions 1398@node Obsolete Functions
1137@section Declaring Functions Obsolete 1399@section Declaring Functions Obsolete
1138@cindex obsolete functions 1400@cindex obsolete functions
diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in
index a56edd9f498..01fe14944fd 100644
--- a/doc/lispref/makefile.w32-in
+++ b/doc/lispref/makefile.w32-in
@@ -49,7 +49,6 @@ texinputdir = $(srcdir)\..\..\nt\envadd.bat \
49srcs = \ 49srcs = \
50 $(emacsdir)/emacsver.texi \ 50 $(emacsdir)/emacsver.texi \
51 $(srcdir)/abbrevs.texi \ 51 $(srcdir)/abbrevs.texi \
52 $(srcdir)/advice.texi \
53 $(srcdir)/anti.texi \ 52 $(srcdir)/anti.texi \
54 $(srcdir)/backups.texi \ 53 $(srcdir)/backups.texi \
55 $(srcdir)/buffers.texi \ 54 $(srcdir)/buffers.texi \
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 50bbe2914ee..df0dd1a58e0 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -69,11 +69,13 @@ functions are called with arguments, or their return values are used
69in some way. The hook's documentation says how the functions are 69in some way. The hook's documentation says how the functions are
70called. You can use @code{add-hook} to add a function to an abnormal 70called. You can use @code{add-hook} to add a function to an abnormal
71hook, but you must write the function to follow the hook's calling 71hook, but you must write the function to follow the hook's calling
72convention. 72convention. By convention, abnormal hook names end in @samp{-functions}.
73 73
74 By convention, abnormal hook names end in @samp{-functions}. If the 74@cindex single-function hook
75variable's name ends in @samp{-function}, then its value is just a single 75If the variable's name ends in @samp{-function}, then its value is
76function, not a list of functions. 76just a single function, not a list of functions. @code{add-hook} cannot be
77used to modify such a @emph{single function hook}, and you have to use
78@code{add-function} instead (@pxref{Advising Functions}).
77 79
78@menu 80@menu
79* Running Hooks:: How to run a hook. 81* Running Hooks:: How to run a hook.
@@ -129,47 +131,6 @@ non-@code{nil} value, it returns that value; otherwise it returns
129@code{nil}. 131@code{nil}.
130@end defun 132@end defun
131 133
132@defmac with-wrapper-hook hook args &rest body
133This macro runs the abnormal hook @code{hook} as a series of nested
134``wrapper functions'' around the @var{body} forms. The effect is
135similar to nested @code{around} advices (@pxref{Around-Advice}).
136
137Each hook function should accept an argument list consisting of a function
138@var{fun}, followed by the additional arguments listed in @var{args}.
139The first hook function is passed a function @var{fun} that, if it is
140called with arguments @var{args}, performs @var{body} (i.e., the default
141operation). The @var{fun} passed to each successive hook function is
142constructed from all the preceding hook functions (and @var{body}); if
143this @var{fun} is called with arguments @var{args}, it does what the
144@code{with-wrapper-hook} call would if the preceding hook functions were
145the only ones in @var{hook}.
146
147Each hook function may call its @var{fun} argument as many times as it
148wishes, including never. In that case, such a hook function acts to
149replace the default definition altogether, and any preceding hook
150functions. Of course, a subsequent hook function may do the same thing.
151
152Each hook function definition is used to construct the @var{fun} passed
153to the next hook function in @var{hook}, if any. The last or
154``outermost'' @var{fun} is called once to produce the overall effect.
155
156When might you want to use a wrapper hook? The function
157@code{filter-buffer-substring} illustrates a common case. There is a
158basic functionality, performed by @var{body}---in this case, to extract
159a buffer-substring. Then any number of hook functions can act in
160sequence to modify that string, before returning the final result.
161A wrapper-hook also allows for a hook function to completely replace the
162default definition (by not calling @var{fun}).
163@end defmac
164
165@defun run-hook-wrapped hook wrap-function &rest args
166This function is similar to @code{run-hook-with-args-until-success}.
167Like that function, it runs the functions on the abnormal hook
168@code{hook}, stopping at the first one that returns non-@code{nil}.
169Instead of calling the hook functions directly, though, it actually
170calls @code{wrap-function} with arguments @code{fun} and @code{args}.
171@end defun
172
173@node Setting Hooks 134@node Setting Hooks
174@subsection Setting Hooks 135@subsection Setting Hooks
175 136
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 61e44fbafac..5c814b22b2d 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -521,6 +521,13 @@ the optional argument @var{ignore-case} is non-@code{nil}, the
521comparison ignores case differences. 521comparison ignores case differences.
522@end defun 522@end defun
523 523
524@defun string-suffix-p suffix string &optional ignore-case
525This function returns non-@code{nil} if @var{suffix} is a suffix of
526@var{string}; i.e., if @var{string} ends with @var{suffix}. If the
527optional argument @var{ignore-case} is non-@code{nil}, the comparison
528ignores case differences.
529@end defun
530
524@defun compare-strings string1 start1 end1 string2 start2 end2 &optional ignore-case 531@defun compare-strings string1 start1 end1 string2 start2 end2 &optional ignore-case
525This function compares a specified part of @var{string1} with a 532This function compares a specified part of @var{string1} with a
526specified part of @var{string2}. The specified part of @var{string1} 533specified part of @var{string2}. The specified part of @var{string1}
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 7a20b6684d3..60cda8068bb 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4284,6 +4284,14 @@ A call to @code{libxml-parse-html-region} returns this:
4284@end example 4284@end example
4285@end defun 4285@end defun
4286 4286
4287@cindex rendering html
4288@defun shr-insert-document dom
4289This function renders the parsed HTML in @var{dom} into the current
4290buffer. The argument @var{dom} should be a list as generated by
4291@code{libxml-parse-html-region}. This function is, e.g., used by
4292@ref{Top, EWW,, eww, The Emacs Web Wowser Manual}.
4293@end defun
4294
4287@cindex parsing xml 4295@cindex parsing xml
4288@defun libxml-parse-xml-region start end &optional base-url 4296@defun libxml-parse-xml-region start end &optional base-url
4289This function is the same as @code{libxml-parse-html-region}, except 4297This function is the same as @code{libxml-parse-html-region}, except
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog
index 6a299469bdb..37f765db00f 100644
--- a/doc/man/ChangeLog
+++ b/doc/man/ChangeLog
@@ -1,3 +1,7 @@
12014-01-09 Glenn Morris <rgm@gnu.org>
2
3 * emacs.1: Refer to online service directory rather than etc/SERVICE.
4
12013-08-31 Ulrich Müller <ulm@gentoo.org> 52013-08-31 Ulrich Müller <ulm@gentoo.org>
2 6
3 * emacs.1: Update manual links. 7 * emacs.1: Update manual links.
diff --git a/doc/man/emacs.1 b/doc/man/emacs.1
index 3078c29e25a..bd568a2e9da 100644
--- a/doc/man/emacs.1
+++ b/doc/man/emacs.1
@@ -576,9 +576,6 @@ strings for the Lisp primitives and preloaded Lisp functions
576of GNU Emacs. 576of GNU Emacs.
577They are stored here to reduce the size of Emacs proper. 577They are stored here to reduce the size of Emacs proper.
578 578
579/usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering
580various services to assist users of GNU Emacs, including education,
581troubleshooting, porting and customization.
582. 579.
583. 580.
584.SH BUGS 581.SH BUGS
@@ -597,8 +594,8 @@ easily reproduced.
597Do not expect a personal answer to a bug report. 594Do not expect a personal answer to a bug report.
598The purpose of reporting bugs is to get them fixed for everyone 595The purpose of reporting bugs is to get them fixed for everyone
599in the next release, if possible. 596in the next release, if possible.
600For personal assistance, look in the SERVICE file (see above) for 597For personal assistance, consult the service directory at
601a list of people who offer it. 598<http://www.fsf.org/resources/service/> for a list of people who offer it.
602 599
603Please do not send anything but bug reports to this mailing list. 600Please do not send anything but bug reports to this mailing list.
604For more information about Emacs mailing lists, see the 601For more information about Emacs mailing lists, see the
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 46fb672e28a..722d11c70f2 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,12 @@
12014-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * cl.texi (Function Bindings): Fix incorrect description of cl-let.
4
52014-01-09 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
6
7 * Makefile.in: Add eww.texi.
8 * eww.texi: New file.
9
12014-01-07 Glenn Morris <rgm@gnu.org> 102014-01-07 Glenn Morris <rgm@gnu.org>
2 11
3 * efaq.texi (Problems with very large files): Fix superscript typo. 12 * efaq.texi (Problems with very large files): Fix superscript typo.
@@ -13,8 +22,8 @@
13 (Advanced configuration) 22 (Advanced configuration)
14 (Header arguments in Org mode properties): Spelling fixes. 23 (Header arguments in Org mode properties): Spelling fixes.
15 (Special blocks): Add #+BEGIN_ABSTRACT as another example. 24 (Special blocks): Add #+BEGIN_ABSTRACT as another example.
16 (@LaTeX{} specific attributes): New index entries. Use 25 (@LaTeX{} specific attributes): New index entries.
17 #+BEGIN_ABSTRACT in the example. 26 Use #+BEGIN_ABSTRACT in the example.
18 27
192013-01-07 Nicolas Goaziou <n.goaziou@gmail.com> 282013-01-07 Nicolas Goaziou <n.goaziou@gmail.com>
20 29
@@ -75,7 +84,7 @@
75 84
762014-01-02 Aidan Gauland <aidalgol@amuri.net> 852014-01-02 Aidan Gauland <aidalgol@amuri.net>
77 86
78 * eshell.texi (Command Basics): Removed `Command basics' chapter. 87 * eshell.texi (Command Basics): Remove `Command basics' chapter.
79 88
802014-01-02 Aidan Gauland <aidalgol@amuri.net> 892014-01-02 Aidan Gauland <aidalgol@amuri.net>
81 90
@@ -195,8 +204,8 @@
195 * org.texi (Orgstruct mode): Fix suggested setting of 204 * org.texi (Orgstruct mode): Fix suggested setting of
196 `orgstruct-heading-prefix-regexp'. 205 `orgstruct-heading-prefix-regexp'.
197 206
198 * org.texi (Export settings): Document 207 * org.texi (Export settings):
199 `org-export-allow-bind-keywords'. 208 Document `org-export-allow-bind-keywords'.
200 209
201 * org.texi (History and Acknowledgments): Small rephrasing. 210 * org.texi (History and Acknowledgments): Small rephrasing.
202 211
@@ -204,8 +213,8 @@
204 in a year datetree. 213 in a year datetree.
205 214
206 * org.texi (Beamer export, @LaTeX{} and PDF export) 215 * org.texi (Beamer export, @LaTeX{} and PDF export)
207 (Header and sectioning, @LaTeX{} specific attributes): Enhance 216 (Header and sectioning, @LaTeX{} specific attributes):
208 style. 217 Enhance style.
209 218
210 * org.texi (Agenda commands): Add a footnote about dragging agenda 219 * org.texi (Agenda commands): Add a footnote about dragging agenda
211 lines: it does not persist and it does not change the .org files. 220 lines: it does not persist and it does not change the .org files.
@@ -224,15 +233,15 @@
224 233
225 * org.texi (Other built-in back-ends): New section. 234 * org.texi (Other built-in back-ends): New section.
226 235
227 * org.texi (Editing source code): Document 236 * org.texi (Editing source code):
228 `org-edit-src-auto-save-idle-delay' and 237 Document `org-edit-src-auto-save-idle-delay' and
229 `org-edit-src-turn-on-auto-save'. 238 `org-edit-src-turn-on-auto-save'.
230 239
231 * org.texi (External links): Document contributed link types 240 * org.texi (External links): Document contributed link types
232 separately. 241 separately.
233 242
234 * org.texi (Closing items): Document 243 * org.texi (Closing items):
235 `org-closed-keep-when-no-todo'. 244 Document `org-closed-keep-when-no-todo'.
236 245
237 * org.texi (Export back-ends): Rename from "Export formats". 246 * org.texi (Export back-ends): Rename from "Export formats".
238 (The Export Dispatcher): Remove reference to 247 (The Export Dispatcher): Remove reference to
@@ -268,8 +277,8 @@
268 (Agenda commands): Move details about filtering commands to 277 (Agenda commands): Move details about filtering commands to
269 the new section, only include a summary here. 278 the new section, only include a summary here.
270 (Customizing tables in ODT export) 279 (Customizing tables in ODT export)
271 (System-wide header arguments, Conflicts, Dynamic blocks): Use 280 (System-wide header arguments, Conflicts, Dynamic blocks):
272 spaces for indentation. 281 Use spaces for indentation.
273 282
274 * org.texi (Emphasis and monospace): Mention `org-emphasis-alist'. 283 * org.texi (Emphasis and monospace): Mention `org-emphasis-alist'.
275 284
@@ -326,8 +335,8 @@
326 (In-buffer settings): Update to reflect changes from the new 335 (In-buffer settings): Update to reflect changes from the new
327 export engine. 336 export engine.
328 337
329 * org.texi (Matching tags and properties): More examples. Explain 338 * org.texi (Matching tags and properties): More examples.
330 group tags expansion as regular expressions. 339 Explain group tags expansion as regular expressions.
331 340
332 * org.texi (Tag groups): New section. 341 * org.texi (Tag groups): New section.
333 342
@@ -352,8 +361,8 @@
352 361
353 * org.texi (Org syntax): New section. 362 * org.texi (Org syntax): New section.
354 363
355 * org.texi (Orgstruct mode): Document 364 * org.texi (Orgstruct mode):
356 `orgstruct-heading-prefix-regexp'. 365 Document `orgstruct-heading-prefix-regexp'.
357 366
358 * org.texi (Speeding up your agendas): New section. 367 * org.texi (Speeding up your agendas): New section.
359 368
@@ -377,8 +386,8 @@
377 * org.texi: Update the list contributions. 386 * org.texi: Update the list contributions.
378 387
379 * org.texi (Agenda commands): Exporting the agenda to an .org file 388 * org.texi (Agenda commands): Exporting the agenda to an .org file
380 will not copy the subtrees and the inherited tags. Document 389 will not copy the subtrees and the inherited tags.
381 `org-agenda-filter-by-regexp'. 390 Document `org-agenda-filter-by-regexp'.
382 391
383 * org.texi (Publishing action, Complex example): Fix names of 392 * org.texi (Publishing action, Complex example): Fix names of
384 publishing functions. 393 publishing functions.
@@ -392,8 +401,8 @@
392 * org.texi (Capture): Mention that org-remember.el is not 401 * org.texi (Capture): Mention that org-remember.el is not
393 supported anymore. 402 supported anymore.
394 403
395 * org.texi (Top, Exporting, Beamer class export): Delete 404 * org.texi (Top, Exporting, Beamer class export):
396 references to the TaskJuggler export. 405 Delete references to the TaskJuggler export.
397 (History and Acknowledgments): Mention that the TaskJuggler has 406 (History and Acknowledgments): Mention that the TaskJuggler has
398 been rewritten by Nicolas and now lives in the contrib/ directory 407 been rewritten by Nicolas and now lives in the contrib/ directory
399 of Org's distribution. Mention that Jambunathan rewrote the HTML 408 of Org's distribution. Mention that Jambunathan rewrote the HTML
@@ -410,16 +419,16 @@
410 (@LaTeX{} and PDF export, Header and sectioning) 419 (@LaTeX{} and PDF export, Header and sectioning)
411 (Publishing options): Fix LaTeX options names. 420 (Publishing options): Fix LaTeX options names.
412 421
413 * org.texi (Export options, CSS support, In-buffer settings): Fix 422 * org.texi (Export options, CSS support, In-buffer settings):
414 references to HTML_LINK_* and HTML_STYLE keywords. 423 Fix references to HTML_LINK_* and HTML_STYLE keywords.
415 424
416 * org.texi (Export options, In-buffer settings): Fix references to 425 * org.texi (Export options, In-buffer settings): Fix references to
417 #+SELECT_TAGS and #+EXCLUDE_TAGS and remove reference to #+XSLT. 426 #+SELECT_TAGS and #+EXCLUDE_TAGS and remove reference to #+XSLT.
418 427
419 * org.texi (Top, Markup, Initial text, Images and tables) 428 * org.texi (Top, Markup, Initial text, Images and tables)
420 (@LaTeX{} fragments, @LaTeX{} fragments, Exporting) 429 (@LaTeX{} fragments, @LaTeX{} fragments, Exporting)
421 (Export options, JavaScript support, Beamer class export): Remove 430 (Export options, JavaScript support, Beamer class export):
422 references to the DocBook export, which has been deleted. 431 Remove references to the DocBook export, which has been deleted.
423 (History and Acknowledgments): Mention that DocBook has been 432 (History and Acknowledgments): Mention that DocBook has been
424 deleted, suggest to use the Texinfo exporter instead, then to 433 deleted, suggest to use the Texinfo exporter instead, then to
425 convert the .texi to DocBook with makeinfo. 434 convert the .texi to DocBook with makeinfo.
@@ -428,8 +437,8 @@
428 * org.texi (Deadlines and scheduling): Add a variable to the 437 * org.texi (Deadlines and scheduling): Add a variable to the
429 index. Add documentation about delays for scheduled tasks. 438 index. Add documentation about delays for scheduled tasks.
430 439
431 * org.texi (Emphasis and monospace): Mention 440 * org.texi (Emphasis and monospace):
432 `org-fontify-emphasized-text' and 441 Mention `org-fontify-emphasized-text' and
433 `org-emphasis-regexp-components'. 442 `org-emphasis-regexp-components'.
434 443
435 * org.texi (References): Small enhancement. 444 * org.texi (References): Small enhancement.
@@ -486,7 +495,7 @@
486 495
487 * org.texi (Extracting source code): Mention the prefix argument 496 * org.texi (Extracting source code): Mention the prefix argument
488 to org-babel-tangle. 497 to org-babel-tangle.
489 (noweb): Removed erroneous negative. 498 (noweb): Remove erroneous negative.
490 (Specific header arguments): Document new header arguments. 499 (Specific header arguments): Document new header arguments.
491 Documentation for new tangle-mode header argument. 500 Documentation for new tangle-mode header argument.
492 (Top): Documentation for new tangle-mode header argument. 501 (Top): Documentation for new tangle-mode header argument.
@@ -590,8 +599,8 @@
590 * org.texi (Header and sectioning): Add a footnote about the 599 * org.texi (Header and sectioning): Add a footnote about the
591 different between LATEX_HEADER_EXTRA and LATEX_HEADER. 600 different between LATEX_HEADER_EXTRA and LATEX_HEADER.
592 601
593 * org.texi (The Export Dispatcher): Document 602 * org.texi (The Export Dispatcher):
594 `org-export-in-background'. 603 Document `org-export-in-background'.
595 604
596 * org.texi (Footnotes): Export back-ends do not use 605 * org.texi (Footnotes): Export back-ends do not use
597 `org-footnote-normalize' anymore. 606 `org-footnote-normalize' anymore.
@@ -613,19 +622,19 @@
613 * org.texi (Include files): Remove reference to :prefix1 622 * org.texi (Include files): Remove reference to :prefix1
614 and :prefix. Give more details for :minlevel. 623 and :prefix. Give more details for :minlevel.
615 624
616 * org.texi (Macro replacement): Fix macro name. Update 625 * org.texi (Macro replacement): Fix macro name.
617 documentation about possible locations and escaping mechanism. 626 Update documentation about possible locations and escaping mechanism.
618 627
619 * org.texi (Table of contents): Update documentation. Document 628 * org.texi (Table of contents): Update documentation.
620 lists of listings and lists of tables. Add documentation for 629 Document lists of listings and lists of tables. Add documentation for
621 optional title and #+TOC: keyword. 630 optional title and #+TOC: keyword.
622 631
6232013-11-12 Rick Frankel <rick@rickster.com> 6322013-11-12 Rick Frankel <rick@rickster.com>
624 633
625 * org.texi (results): Add Format section, broken out of Type 634 * org.texi (results): Add Format section, broken out of Type
626 section to match code. 635 section to match code.
627 (hlines, colnames): Remove incorrect Emacs Lisp exception. Note 636 (hlines, colnames): Remove incorrect Emacs Lisp exception.
628 that the actual default handling (at least for python and 637 Note that the actual default handling (at least for python and
629 emacs-lisp) does not seem to match the description. 638 emacs-lisp) does not seem to match the description.
630 639
6312013-11-12 Sacha Chua <sacha@sachachua.com> (tiny change) 6402013-11-12 Sacha Chua <sacha@sachachua.com> (tiny change)
@@ -635,8 +644,8 @@
635 644
6362013-11-12 Yasushi Shoji <yashi@atmark-techno.com> 6452013-11-12 Yasushi Shoji <yashi@atmark-techno.com>
637 646
638 * org.texi (Resolving idle time): Document 647 * org.texi (Resolving idle time):
639 `org-clock-x11idle-program-name'. 648 Document `org-clock-x11idle-program-name'.
640 649
6412013-10-24 Michael Albinus <michael.albinus@gmx.de> 6502013-10-24 Michael Albinus <michael.albinus@gmx.de>
642 651
@@ -655,7 +664,7 @@
655 664
6562013-10-17 Jay Belanger <jay.p.belanger@gmail.com> 6652013-10-17 Jay Belanger <jay.p.belanger@gmail.com>
657 666
658 * calc.el (Data Type Formats): Don't specify the size at 667 * calc.texi (Data Type Formats): Don't specify the size at
659 which integers begin to be represented by lists. 668 which integers begin to be represented by lists.
660 669
6612013-10-14 Xue Fuqiao <xfq.free@gmail.com> 6702013-10-14 Xue Fuqiao <xfq.free@gmail.com>
@@ -877,8 +886,8 @@
877 886
8782013-07-29 Michael Albinus <michael.albinus@gmx.de> 8872013-07-29 Michael Albinus <michael.albinus@gmx.de>
879 888
880 * tramp.texi (Frequently Asked Questions): Mention 889 * tramp.texi (Frequently Asked Questions):
881 `tramp-use-ssh-controlmaster-options'. 890 Mention `tramp-use-ssh-controlmaster-options'.
882 891
8832013-07-26 Tassilo Horn <tsdh@gnu.org> 8922013-07-26 Tassilo Horn <tsdh@gnu.org>
884 893
@@ -922,8 +931,8 @@
9222013-07-08 Tassilo Horn <tsdh@gnu.org> 9312013-07-08 Tassilo Horn <tsdh@gnu.org>
923 932
924 * gnus.texi (lines): Correct description of 933 * gnus.texi (lines): Correct description of
925 `gnus-registry-track-extra's default value. Mention 934 `gnus-registry-track-extra's default value.
926 `gnus-registry-remove-extra-data'. 935 Mention `gnus-registry-remove-extra-data'.
927 936
9282013-07-06 Lars Ingebrigtsen <larsi@gnus.org> 9372013-07-06 Lars Ingebrigtsen <larsi@gnus.org>
929 938
@@ -6284,6 +6293,12 @@
6284 6293
6285 * org.texi: Massive changes, in many parts of the file. 6294 * org.texi: Massive changes, in many parts of the file.
6286 6295
62962008-04-27 Jason Riedy <jason@acm.org>
6297
6298 * org.texi (A LaTeX example): Note that fmt may be a
6299 one-argument function, and efmt may be a two-argument function.
6300 (Radio tables): Document multiple destinations.
6301
62872008-04-13 Reiner Steib <Reiner.Steib@gmx.de> 63022008-04-13 Reiner Steib <Reiner.Steib@gmx.de>
6288 6303
6289 * gnus.texi (Oort Gnus): Add message-fill-column. 6304 * gnus.texi (Oort Gnus): Add message-fill-column.
@@ -6516,6 +6531,10 @@
6516 6531
6517 * tramp.texi (Remote processes): Add `shell-command'. 6532 * tramp.texi (Remote processes): Add `shell-command'.
6518 6533
65342008-02-02 Michael Albinus <michael.albinus@gmx.de>
6535
6536 * tramp.texi: Use new FSF's Back-Cover Text.
6537
65192008-01-28 Michael Sperber <sperber@deinprogramm.de> 65382008-01-28 Michael Sperber <sperber@deinprogramm.de>
6520 6539
6521 * gnus.texi (Mail Source Specifiers): Document `group' specifier. 6540 * gnus.texi (Mail Source Specifiers): Document `group' specifier.
@@ -6616,7 +6635,7 @@
6616 6635
66172007-12-29 Jay Belanger <jay.p.belanger@gmail.com> 66362007-12-29 Jay Belanger <jay.p.belanger@gmail.com>
6618 6637
6619 * calc.tex (Yacas Language, Maxima Language, Giac Language): 6638 * calc.texi (Yacas Language, Maxima Language, Giac Language):
6620 New sections. 6639 New sections.
6621 6640
66222007-12-29 Reiner Steib <Reiner.Steib@gmx.de> 66412007-12-29 Reiner Steib <Reiner.Steib@gmx.de>
@@ -6634,6 +6653,10 @@
6634 6653
6635 * trampver.texi: Update release number. 6654 * trampver.texi: Update release number.
6636 6655
66562007-12-22 Richard Stallman <rms@gnu.org>
6657
6658 * cc-mode.texi (Getting Started): Change @ref to @pxref.
6659
66372007-12-22 Michael Albinus <michael.albinus@gmx.de> 66602007-12-22 Michael Albinus <michael.albinus@gmx.de>
6638 6661
6639 * dbus.texi (Type Conversion): Correct input parameters mapping. 6662 * dbus.texi (Type Conversion): Correct input parameters mapping.
@@ -7895,11 +7918,6 @@
7895 * gnus.texi (Batching Agents): Fix example. Reported by Tassilo Horn 7918 * gnus.texi (Batching Agents): Fix example. Reported by Tassilo Horn
7896 <tassilo@member.fsf.org>. 7919 <tassilo@member.fsf.org>.
7897 7920
78982007-01-27 Eli Zaretskii <eliz@gnu.org>
7899
7900 * msdog.texi (ls in Lisp): Document ls-lisp-format-time-list and
7901 ls-lisp-use-localized-time-format.
7902
79032007-01-20 Markus Triska <markus.triska@gmx.at> 79212007-01-20 Markus Triska <markus.triska@gmx.at>
7904 7922
7905 * flymake.texi (Flymake mode): find-file-hook instead of ...-hooks. 7923 * flymake.texi (Flymake mode): find-file-hook instead of ...-hooks.
@@ -8195,7 +8213,6 @@
8195 * faq.texi (Escape sequences in shell output): EMACS is now set 8213 * faq.texi (Escape sequences in shell output): EMACS is now set
8196 to Emacs's absolute file name, not to "t". 8214 to Emacs's absolute file name, not to "t".
8197 (^M in the shell buffer): Likewise. 8215 (^M in the shell buffer): Likewise.
8198 * misc.texi (Interactive Shell): Likewise.
8199 8216
82002006-09-11 Reiner Steib <Reiner.Steib@gmx.de> 82172006-09-11 Reiner Steib <Reiner.Steib@gmx.de>
8201 8218
@@ -8213,6 +8230,10 @@
8213 8230
8214 * smtpmail.texi (Authentication): Mention SSL. 8231 * smtpmail.texi (Authentication): Mention SSL.
8215 8232
82332006-09-03 Diane Murray <disumu@x3y2z1.net>
8234
8235 * erc.texi (Getting Started, Connecting): Change erc-select to erc.
8236
82162006-09-01 Eli Zaretskii <eliz@gnu.org> 82372006-09-01 Eli Zaretskii <eliz@gnu.org>
8217 8238
8218 * rcirc.texi (Internet Relay Chat, Useful IRC commands): 8239 * rcirc.texi (Internet Relay Chat, Useful IRC commands):
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 8b8d8a606c9..b3318ddd183 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -65,7 +65,7 @@ DOCMISC_W32 = @DOCMISC_W32@
65## Info files to build and install on all platforms. 65## Info files to build and install on all platforms.
66INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \ 66INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
67 dbus dired-x ebrowse ede ediff edt eieio \ 67 dbus dired-x ebrowse ede ediff edt eieio \
68 emacs-mime epa erc ert eshell eudc efaq \ 68 emacs-mime epa erc ert eshell eudc efaq eww \
69 flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \ 69 flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \
70 mairix-el message mh-e newsticker nxml-mode octave-mode \ 70 mairix-el message mh-e newsticker nxml-mode octave-mode \
71 org pcl-cvs pgg rcirc remember reftex sasl \ 71 org pcl-cvs pgg rcirc remember reftex sasl \
@@ -410,6 +410,18 @@ eudc.pdf: $(eudc_deps)
410eudc.html: $(eudc_deps) 410eudc.html: $(eudc_deps)
411 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eudc.texi 411 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eudc.texi
412 412
413eww_deps = ${srcdir}/eww.texi $(emacsdir)/emacsver.texi ${gfdl}
414eww : $(buildinfodir)/eww$(INFO_EXT)
415$(buildinfodir)/eww$(INFO_EXT): $(eww_deps)
416 $(mkinfodir)
417 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eww.texi
418eww.dvi: $(eww_deps)
419 $(ENVADD) $(TEXI2DVI) ${srcdir}/eww.texi
420eww.pdf: $(eww_deps)
421 $(ENVADD) $(TEXI2PDF) ${srcdir}/eww.texi
422eww.html: $(eww_deps)
423 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eww.texi
424
413flymake_deps = ${srcdir}/flymake.texi ${gfdl} 425flymake_deps = ${srcdir}/flymake.texi ${gfdl}
414flymake : $(buildinfodir)/flymake$(INFO_EXT) 426flymake : $(buildinfodir)/flymake$(INFO_EXT)
415$(buildinfodir)/flymake$(INFO_EXT): $(flymake_deps) 427$(buildinfodir)/flymake$(INFO_EXT): $(flymake_deps)
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi
index aacf4fad83e..7ca860486c2 100644
--- a/doc/misc/autotype.texi
+++ b/doc/misc/autotype.texi
@@ -302,7 +302,7 @@ of the same name as the command and can thus be overridden from your
302 Various characters usually appear in pairs. When, for example, you insert 302 Various characters usually appear in pairs. When, for example, you insert
303an open parenthesis, no matter whether you are programming or writing prose, 303an open parenthesis, no matter whether you are programming or writing prose,
304you will surely enter a closing one later. By entering both at the same time 304you will surely enter a closing one later. By entering both at the same time
305and leaving the cursor inbetween, Emacs can guarantee you that such 305and leaving the cursor in between, Emacs can guarantee you that such
306parentheses are always balanced. And if you have a non-qwerty keyboard, where 306parentheses are always balanced. And if you have a non-qwerty keyboard, where
307typing some of the stranger programming language symbols makes you bend your 307typing some of the stranger programming language symbols makes you bend your
308fingers backwards, this can be quite relieving too. 308fingers backwards, this can be quite relieving too.
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 10c863a9513..1700aee9dc1 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -28053,8 +28053,8 @@ radiation related to the cesium-133 atom. The only SI unit that is not
28053based on a fundamental physical process (although there are efforts to 28053based on a fundamental physical process (although there are efforts to
28054change this) is the kilogram, which was originally defined as the mass 28054change this) is the kilogram, which was originally defined as the mass
28055of one liter of water, but is now defined as the mass of the 28055of one liter of water, but is now defined as the mass of the
28056International Prototype Kilogram (IPK), a cylinder of platinum-iridium 28056international prototype of the kilogram (IPK), a cylinder of platinum-iridium
28057kept at the Bureau International des Poids et Mesures in S@`evres, 28057kept at the Bureau international des poids et mesures in S@`evres,
28058France. (There are several copies of the IPK throughout the world.) 28058France. (There are several copies of the IPK throughout the world.)
28059The British imperial units, once defined in terms of physical objects, 28059The British imperial units, once defined in terms of physical objects,
28060were redefined in 1963 in terms of SI units. The US customary units, 28060were redefined in 1963 in terms of SI units. The US customary units,
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 08f9610e594..0490cf639ac 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -1282,13 +1282,8 @@ cells of symbols rather than on the value cells. Each @var{binding}
1282must be a list of the form @samp{(@var{name} @var{arglist} 1282must be a list of the form @samp{(@var{name} @var{arglist}
1283@var{forms}@dots{})}, which defines a function exactly as if 1283@var{forms}@dots{})}, which defines a function exactly as if
1284it were a @code{cl-defun} form. The function @var{name} is defined 1284it were a @code{cl-defun} form. The function @var{name} is defined
1285accordingly for the duration of the body of the @code{cl-flet}; then 1285accordingly but only within the body of the @code{cl-flet}, hiding any external
1286the old function definition, or lack thereof, is restored. 1286definition if applicable.
1287
1288You can use @code{cl-flet} to disable or modify the behavior of
1289functions (including Emacs primitives) in a temporary, localized fashion.
1290(Compare this with the idea of advising functions.
1291@xref{Advising Functions,,,elisp,GNU Emacs Lisp Reference Manual}.)
1292 1287
1293The bindings are lexical in scope. This means that all references to 1288The bindings are lexical in scope. This means that all references to
1294the named functions must appear physically within the body of the 1289the named functions must appear physically within the body of the
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
new file mode 100644
index 00000000000..b84de7509da
--- /dev/null
+++ b/doc/misc/eww.texi
@@ -0,0 +1,254 @@
1\input texinfo @c -*-texinfo-*-
2@c %**start of header
3@setfilename ../../info/eww
4@settitle Emacs Web Wowser
5@documentencoding UTF-8
6@c @include emacsver.texi
7@c %**end of header
8
9@copying
10This file documents the GNU Emacs Web Wowser (EWW) package.
11
12Copyright @copyright{} 2014 Free Software Foundation, Inc.
13
14@quotation
15Permission is granted to copy, distribute and/or modify this document
16under the terms of the GNU Free Documentation License, Version 1.3 or
17any later version published by the Free Software Foundation; with no
18Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
19and with the Back-Cover Texts as in (a) below. A copy of the license
20is included in the section entitled ``GNU Free Documentation License.''
21
22(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
23modify this GNU manual.''
24@end quotation
25@end copying
26
27@dircategory Emacs misc features
28@direntry
29* EWW: (eww). Emacs Web Wowser
30@end direntry
31
32@finalout
33
34@titlepage
35@title Emacs Web Wowser (EWW)
36@subtitle A web browser for GNU Emacs.
37
38@page
39@vskip 0pt plus 1filll
40@insertcopying
41@end titlepage
42
43@contents
44
45@ifnottex
46@node Top
47@top EWW
48
49@insertcopying
50@end ifnottex
51
52@menu
53* Overview::
54* Basics::
55* Advanced::
56
57Appendices
58* History and Acknowledgments::
59* GNU Free Documentation License:: The license for this documentation.
60
61Indices
62* Key Index::
63* Variable Index::
64* Lisp Function Index::
65* Concept Index::
66@end menu
67
68@node Overview
69@chapter Overview
70@dfn{EWW}, the Emacs Web Wowser, is a web browser for GNU Emacs. It
71can load, parse, and display various web pages using @dfn{shr.el}.
72However a GNU Emacs with @code{libxml2} support is required.
73
74@node Basics
75@chapter Basic Usage
76
77@findex eww
78@findex eww-open-file
79@vindex eww-search-prefix
80@cindex eww
81@cindex Web Browsing
82 You can open a URL or search the web with the command @kbd{M-x eww}.
83If the input doesn't look like a URL or domain name the web will be
84searched via @code{eww-search-prefix}. The default search engine is
85@url{https://duckduckgo.com, DuckDuckGo}. If you want to open a file
86either prefix the path with @code{file://} or use the command @kbd{M-x
87eww-open-file}.
88
89@findex eww-quit
90@findex eww-reload
91@findex eww-copy-page-url
92@kindex q
93@kindex w
94@kindex g
95 If loading the URL was successful the buffer @code{*eww*} is opened
96and the web page is rendered in it. You can leave EWW by pressing
97@kbd{q} or exit the browser by calling @kbd{eww-quit}. To reload the
98web page hit @kbd{g} (@code{eww-reload}). Pressing @kbd{w}
99(@code{eww-copy-page-url}) will copy the current URL to the kill ring.
100
101@findex eww-download
102@vindex eww-download-path
103@kindex d
104@cindex Download
105 A URL under the point can be downloaded with @kbd{d}
106(@code{eww-download}). The file will be written to the directory
107specified in @code{eww-download-path} (Default: @file{~/Downloads/}).
108
109@findex eww-back-url
110@findex eww-forward-url
111@findex eww-list-histories
112@kindex r
113@kindex l
114@kindex H
115@cindex History
116 EWW remembers the URLs you have visited to allow you to go back and
117forth between them. By pressing @kbd{l} (@code{eww-back-url}) you go
118to the previous URL. You can go forward again with @kbd{r}
119(@code{eww-forward-url}). If you want an overview of your browsing
120history press @kbd{H} (@code{eww-list-histories}) to open the history
121buffer @code{*eww history*}. The history is lost when EWW is quit.
122If you want to remember websites you can use bookmarks.
123
124@findex eww-add-bookmark
125@findex eww-list-bookmarks
126@kindex b
127@kindex B
128@cindex Bookmarks
129 EWW allows you to @dfn{bookmark} URLs. Simply hit @kbd{b}
130(@code{eww-add-bookmark}) to store a bookmark for the current website.
131You can view stored bookmarks with @kbd{B}
132(@code{eww-list-bookmarks}). This will open the bookmark buffer
133@code{*eww bookmarks*}.
134
135@findex eww-browse-with-external-browser
136@vindex shr-external-browser
137@vindex eww-use-external-browser-for-content-type
138@kindex &
139@cindex External Browser
140 Although EWW and shr.el do their best to render webpages in GNU
141Emacs some websites use features which can not be properly represented
142or are not implemented (E.g., JavaScript). If you have trouble
143viewing a website with EWW then hit @kbd{&}
144(@code{eww-browse-with-external-browser}) inside the EWW buffer to
145open the website in the external browser specified by
146@code{shr-external-browser}. Some content types, such as video or
147audio content, do not make sense to display in GNU Emacs at all. You
148can tell EWW to open specific content automatically in an external
149browser by customizing
150@code{eww-use-external-browser-for-content-type}.
151
152@node Advanced
153@chapter Advanced
154
155@findex eww-view-source
156@kindex v
157@cindex Viewing Source
158 You can view the source of a website with @kbd{v}
159(@code{eww-view-source}). This will open a new buffer
160@code{*eww-source*} and insert the source. The buffer will be set to
161@code{html-mode} if available.
162
163@findex url-cookie-list
164@kindex C
165@cindex Cookies
166 EWW handles cookies through the @ref{Top, url package, ,url}.
167You can list existing cookies with @kbd{C} (@code{url-cookie-list}).
168For details about the Cookie handling @xref{Cookies,,,url}.
169
170@vindex eww-header-line-format
171@cindex Header
172 The header line of the EWW buffer can be changed by customizing
173@code{eww-header-line-format}. The format replaces @code{%t} with the
174title of the website and @code{%u} with the URL.
175
176@c @vindex shr-bullet
177@c @vindex shr-hr-line
178@c @vindex eww-form-checkbox-selected-symbol
179@c @vindex eww-form-checkbox-symbol
180@c EWW and the rendering engine shr.el use ASCII characters to
181@c represent some graphical elements, such as bullet points
182@c (@code{shr-bullet}), check boxes
183@c (@code{eww-form-checkbox-selected-symbol} and
184@c @code{eww-form-checkbox-symbol}), and horizontal rules
185@c @code{shr-hr-line}). Depending on your fonts these characters can be
186@c replaced by Unicode glyphs to achieve better looking results.
187
188@vindex shr-max-image-proportion
189@vindex shr-blocked-images
190@cindex Image Display
191 Loading random images from the web can be problematic due to their
192size or content. By customizing @code{shr-max-image-proportion} you
193can set the maximal image proportion in relation to the window they
194are displayed in. E.g., 0.7 means an image is allowed to take up 70%
195of the width and height. If Emacs supports image scaling (ImageMagick
196support required) then larger images are scaled down. You can block
197specific images completely by customizing @code{shr-blocked-images}.
198
199@node History and Acknowledgments
200@appendix History and Acknowledgments
201
202EWW was originally written by Lars Ingebrigtsen, known for his work on
203Gnus. He started writing an Emacs HTML rendering library,
204@code{shr.el}, to read blogs in Gnus. He eventually added a web
205browser front end and HTML form support. Which resulted in EWW, the
206Emacs Web Wowser. EWW was announced on 16 June 2013:
207@url{http://lars.ingebrigtsen.no/2013/06/16/eww/}.
208
209EWW was then moved from the Gnus repository to GNU Emacs and several
210developers started contributing to it as well. A list of contributors
211at the time of writing this manual:
212
213@itemize @bullet
214@item Daniel Hackney
215@item Eli Zaretskii
216@item Glenn Morris
217@item Ivan Kanis
218@item Juri Linkov
219@item Katsumi Yamaoka
220@item Kenjiro NAKAYAMA
221@item Lars Magne Ingebrigtsen
222@item Leo Liu
223@item Paul Eggert
224@item Rüdiger Sonderfeld
225@item Stefan Monnier
226@item Ted Zlatanov
227@end itemize
228
229@node GNU Free Documentation License
230@chapter GNU Free Documentation License
231@include doclicense.texi
232
233@node Key Index
234@unnumbered Key Index
235
236@printindex ky
237
238@node Variable Index
239@unnumbered Variable Index
240
241@printindex vr
242
243@node Lisp Function Index
244@unnumbered Function Index
245
246@printindex fn
247
248@node Concept Index
249@unnumbered Concept Index
250
251@printindex cp
252
253
254@bye
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 376d2a0ad26..6ad0c26f9ac 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -10229,8 +10229,8 @@ summary buffer, point will just move to this article.
10229If given a positive numerical prefix, fetch that many articles back into 10229If given a positive numerical prefix, fetch that many articles back into
10230the ancestry. If given a negative numerical prefix, fetch just that 10230the ancestry. If given a negative numerical prefix, fetch just that
10231ancestor. So if you say @kbd{3 ^}, Gnus will fetch the parent, the 10231ancestor. So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10232grandparent and the grandgrandparent of the current article. If you say 10232grandparent and the great-grandparent of the current article. If you say
10233@kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current 10233@kbd{-3 ^}, Gnus will only fetch the great-grandparent of the current
10234article. 10234article.
10235 10235
10236@item A R (Summary) 10236@item A R (Summary)
diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi
index a6940781ca7..c4719dcd039 100644
--- a/doc/misc/idlwave.texi
+++ b/doc/misc/idlwave.texi
@@ -591,7 +591,7 @@ slightly from the margin and use only 3 spaces as indentation between
591 591
592Restart Emacs, and re-indent the program we developed in the first part 592Restart Emacs, and re-indent the program we developed in the first part
593of this tutorial with @kbd{C-c h} and @kbd{C-M-\}. You may want to keep 593of this tutorial with @kbd{C-c h} and @kbd{C-M-\}. You may want to keep
594these lines in @file{.emacs}, with values adjusted to your likings. If 594these lines in @file{.emacs}, with values adjusted to your liking. If
595you want to get more information about any of these variables, type, 595you want to get more information about any of these variables, type,
596e.g., @kbd{C-h v idlwave-main-block-indent @key{RET}}. To find which 596e.g., @kbd{C-h v idlwave-main-block-indent @key{RET}}. To find which
597variables can be customized, look for items marked @samp{User Option:} 597variables can be customized, look for items marked @samp{User Option:}
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index bfd765dd211..d92fb8a55e0 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2013-09-11.11} 6\def\texinfoversion{2014-01-06.16}
7% 7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1138,10 +1138,12 @@ output) for that.)}
1138 1138
1139\ifpdf 1139\ifpdf
1140 % 1140 %
1141 % Color manipulation macros based on pdfcolor.tex, 1141 % Color manipulation macros using ideas from pdfcolor.tex,
1142 % except using rgb instead of cmyk; the latter is said to render as a 1142 % except using rgb instead of cmyk; the latter is said to render as a
1143 % very dark gray on-screen and a very dark halftone in print, instead 1143 % very dark gray on-screen and a very dark halftone in print, instead
1144 % of actual black. 1144 % of actual black. The dark red here is dark enough to print on paper as
1145 % nearly black, but still distinguishable for online viewing. We use
1146 % black by default, though.
1145 \def\rgbDarkRed{0.50 0.09 0.12} 1147 \def\rgbDarkRed{0.50 0.09 0.12}
1146 \def\rgbBlack{0 0 0} 1148 \def\rgbBlack{0 0 0}
1147 % 1149 %
@@ -1251,10 +1253,9 @@ output) for that.)}
1251 % used to mark target names; must be expandable. 1253 % used to mark target names; must be expandable.
1252 \def\pdfmkpgn#1{#1} 1254 \def\pdfmkpgn#1{#1}
1253 % 1255 %
1254 % by default, use a color that is dark enough to print on paper as 1256 % by default, use black for everything.
1255 % nearly black, but still distinguishable for online viewing. 1257 \def\urlcolor{\rgbBlack}
1256 \def\urlcolor{\rgbDarkRed} 1258 \def\linkcolor{\rgbBlack}
1257 \def\linkcolor{\rgbDarkRed}
1258 \def\endlink{\setcolor{\maincolor}\pdfendlink} 1259 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1259 % 1260 %
1260 % Adding outlines to PDF; macros for calculating structure of outlines 1261 % Adding outlines to PDF; macros for calculating structure of outlines
@@ -2574,37 +2575,21 @@ end
2574\let\file=\code 2575\let\file=\code
2575\let\option=\code 2576\let\option=\code
2576 2577
2577% @uref (abbreviation for `urlref') takes an optional (comma-separated) 2578% @uref (abbreviation for `urlref') aka @url takes an optional
2578% second argument specifying the text to display and an optional third 2579% (comma-separated) second argument specifying the text to display and
2579% arg as text to display instead of (rather than in addition to) the url 2580% an optional third arg as text to display instead of (rather than in
2580% itself. First (mandatory) arg is the url. 2581% addition to) the url itself. First (mandatory) arg is the url.
2581% (This \urefnobreak definition isn't used now, leaving it for a while 2582
2582% for comparison.) 2583% TeX-only option to allow changing PDF output to show only the second
2583\def\urefnobreak#1{\dourefnobreak #1,,,\finish} 2584% arg (if given), and not the url (which is then just the link target).
2584\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup 2585\newif\ifurefurlonlylink
2585 \unsepspaces
2586 \pdfurl{#1}%
2587 \setbox0 = \hbox{\ignorespaces #3}%
2588 \ifdim\wd0 > 0pt
2589 \unhbox0 % third arg given, show only that
2590 \else
2591 \setbox0 = \hbox{\ignorespaces #2}%
2592 \ifdim\wd0 > 0pt
2593 \ifpdf
2594 \unhbox0 % PDF: 2nd arg given, show only it
2595 \else
2596 \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
2597 \fi
2598 \else
2599 \code{#1}% only url given, so show it
2600 \fi
2601 \fi
2602 \endlink
2603\endgroup}
2604 2586
2605% This \urefbreak definition is the active one. 2587% The main macro is \urefbreak, which allows breaking at expected
2588% places within the url. (There used to be another version, which
2589% didn't support automatic breaking.)
2606\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} 2590\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
2607\let\uref=\urefbreak 2591\let\uref=\urefbreak
2592%
2608\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} 2593\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
2609\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example 2594\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
2610 \unsepspaces 2595 \unsepspaces
@@ -2613,12 +2598,19 @@ end
2613 \ifdim\wd0 > 0pt 2598 \ifdim\wd0 > 0pt
2614 \unhbox0 % third arg given, show only that 2599 \unhbox0 % third arg given, show only that
2615 \else 2600 \else
2616 \setbox0 = \hbox{\ignorespaces #2}% 2601 \setbox0 = \hbox{\ignorespaces #2}% look for second arg
2617 \ifdim\wd0 > 0pt 2602 \ifdim\wd0 > 0pt
2618 \ifpdf 2603 \ifpdf
2619 \unhbox0 % PDF: 2nd arg given, show only it 2604 \ifurefurlonlylink
2605 % PDF plus option to not display url, show just arg
2606 \unhbox0
2607 \else
2608 % PDF, normally display both arg and url for consistency,
2609 % visibility, if the pdf is eventually used to print, etc.
2610 \unhbox0\ (\urefcode{#1})%
2611 \fi
2620 \else 2612 \else
2621 \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url 2613 \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
2622 \fi 2614 \fi
2623 \else 2615 \else
2624 \urefcode{#1}% only url given, so show it 2616 \urefcode{#1}% only url given, so show it
@@ -3691,7 +3683,7 @@ end
3691 \parskip=\smallskipamount 3683 \parskip=\smallskipamount
3692 \ifdim\parskip=0pt \parskip=2pt \fi 3684 \ifdim\parskip=0pt \parskip=2pt \fi
3693 % 3685 %
3694 % Try typesetting the item mark that if the document erroneously says 3686 % Try typesetting the item mark so that if the document erroneously says
3695 % something like @itemize @samp (intending @table), there's an error 3687 % something like @itemize @samp (intending @table), there's an error
3696 % right away at the @itemize. It's not the best error message in the 3688 % right away at the @itemize. It's not the best error message in the
3697 % world, but it's better than leaving it to the @item. This means if 3689 % world, but it's better than leaving it to the @item. This means if
@@ -8342,8 +8334,8 @@ end
8342% 8334%
8343% Auto-number footnotes. Otherwise like plain. 8335% Auto-number footnotes. Otherwise like plain.
8344\gdef\footnote{% 8336\gdef\footnote{%
8345 \let\indent=\ptexindent 8337 %\let\indent=\ptexindent
8346 \let\noindent=\ptexnoindent 8338 %\let\noindent=\ptexnoindent
8347 \global\advance\footnoteno by \@ne 8339 \global\advance\footnoteno by \@ne
8348 \edef\thisfootno{$^{\the\footnoteno}$}% 8340 \edef\thisfootno{$^{\the\footnoteno}$}%
8349 % 8341 %