aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMiles Bader2007-12-06 09:51:45 +0000
committerMiles Bader2007-12-06 09:51:45 +0000
commit0bd508417142ff377f34aec8dcec9438d9175c2c (patch)
tree4d60fe09e5cebf7d79766b11e9cda8cc1c9dbb9b /doc
parent98fe991da804a42f53f6a5e84cd5eab18a82e181 (diff)
parent9fb1ba8090da3528de56158a79bd3527d31c7f2f (diff)
downloademacs-0bd508417142ff377f34aec8dcec9438d9175c2c.tar.gz
emacs-0bd508417142ff377f34aec8dcec9438d9175c2c.zip
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog59
-rw-r--r--doc/emacs/calendar.texi10
-rw-r--r--doc/emacs/custom.texi4
-rw-r--r--doc/emacs/files.texi28
-rw-r--r--doc/emacs/frames.texi9
-rw-r--r--doc/emacs/help.texi41
-rw-r--r--doc/emacs/maintaining.texi8
-rw-r--r--doc/emacs/major.texi5
-rw-r--r--doc/emacs/mule.texi23
-rw-r--r--doc/lispref/ChangeLog73
-rw-r--r--doc/lispref/advice.texi6
-rw-r--r--doc/lispref/compile.texi21
-rw-r--r--doc/lispref/customize.texi5
-rw-r--r--doc/lispref/display.texi80
-rw-r--r--doc/lispref/functions.texi83
-rw-r--r--doc/lispref/help.texi12
-rw-r--r--doc/lispref/hooks.texi4
-rw-r--r--doc/lispref/loading.texi2
-rw-r--r--doc/lispref/macros.texi2
-rw-r--r--doc/lispref/objects.texi2
-rw-r--r--doc/lispref/variables.texi2
-rw-r--r--doc/lispref/vol1.texi1
-rw-r--r--doc/lispref/vol2.texi1
-rw-r--r--doc/man/ChangeLog9
-rw-r--r--doc/man/etags.147
-rw-r--r--doc/misc/ChangeLog133
-rw-r--r--doc/misc/Makefile.in16
-rw-r--r--doc/misc/calc.texi7
-rw-r--r--doc/misc/cc-mode.texi6
-rw-r--r--doc/misc/cl.texi63
-rw-r--r--doc/misc/dbus.texi564
-rw-r--r--doc/misc/emacs-mime.texi15
-rw-r--r--doc/misc/flymake.texi9
-rw-r--r--doc/misc/gnus.texi21
-rw-r--r--doc/misc/makefile.w32-in58
-rw-r--r--doc/misc/nxml-mode.texi838
-rw-r--r--doc/misc/remember.texi2
-rw-r--r--doc/misc/tramp.texi66
38 files changed, 2075 insertions, 260 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 3c020fcc5e7..9c4d874e139 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,12 +1,50 @@
12007-11-26 Richard Stallman <rms@gnu.org>
2
3 * help.texi (Help Echo): Cleanups.
4
52007-11-23 Thien-Thi Nguyen <ttn@gnuvola.org>
6
7 * files.texi (Why Version Control?): Fix typo.
8 (VCS Concepts): Fix typos; small tense fix.
9 (Selecting a Fileset): Fix typos; small rewording.
10 (Log Buffer): Likewise.
11 (Old Revisions): Likewise.
12
132007-11-17 Eli Zaretskii <eliz@gnu.org>
14
15 * mule.texi (Communication Coding): Fix wording of last change.
16
172007-11-16 Werner Lemberg <wl@gnu.org>
18
19 * custom.texi (Specifying File Variables), major.texi (Choosing
20 Modes): Mention '\" in man pages.
21
222007-11-16 Kenichi Handa <handa@ni.aist.go.jp>
23
24 * mule.texi (Communication Coding): Document x-select-request-type.
25
26 * frames.texi (Cut/Paste Other App): Mention x-select-request-type.
27
282007-11-15 Francesco Potort,Al(B <pot@gnu.org>
29
30 * maintaining.texi (TEXTAGS): note that you can use "-" for stdout with
31 --output=file.
32
332007-11-13 Martin Rudalics <rudalics@gmx.at>
34
35 * help.texi (Help Summary, Apropos, Misc Help): Fix typos.
36 (Help Echo): Avoid mentioning the term "region" here and
37 consistently use the term "active text".
38
392007-11-11 Glenn Morris <rgm@gnu.org>
40
41 * calendar.texi (Special Diary Entries): Fix Thanksgiving example.
42
12007-11-10 Paul Pogonyshev <pogonyshev@gmx.net> 432007-11-10 Paul Pogonyshev <pogonyshev@gmx.net>
2 44
3 * search.texi (Query Replace): Mention 45 * search.texi (Query Replace): Mention
4 `query-replace-show-replacement'. 46 `query-replace-show-replacement'.
5 47
62007-11-09 Reiner Steib <Reiner.Steib@gmx.de>
7
8 * gnus.texi, gnus-faq.texi, message.texi: Bump version to 5.10.9.
9
102007-11-09 Nick Roberts <nickrob@snap.net.nz> 482007-11-09 Nick Roberts <nickrob@snap.net.nz>
11 49
12 * building.texi (Watch Expressions): Remove obscure sentence. 50 * building.texi (Watch Expressions): Remove obscure sentence.
@@ -20,14 +58,6 @@
20 58
21 * cmdargs.texi (Misc Variables): Remove Sun windows info. 59 * cmdargs.texi (Misc Variables): Remove Sun windows info.
22 60
232007-10-27 Emanuele Giaquinta <e.giaquinta@glauco.it> (tiny change)
24
25 * gnus-faq.texi ([5.12]): Remove reference to discontinued service.
26
272007-10-27 Reiner Steib <Reiner.Steib@gmx.de>
28
29 * gnus.texi (Troubleshooting): Adjust Gnus version number.
30
312007-10-30 Nick Roberts <nickrob@snap.net.nz> 612007-10-30 Nick Roberts <nickrob@snap.net.nz>
32 62
33 * building.texi (Watch Expressions): Describe gdb-delete-out-of-scope. 63 * building.texi (Watch Expressions): Describe gdb-delete-out-of-scope.
@@ -37,11 +67,6 @@
37 * misc.texi (Directory Tracking): Explain a bit more about 67 * misc.texi (Directory Tracking): Explain a bit more about
38 dirtrack-mode. 68 dirtrack-mode.
39 69
402007-10-29 Richard Stallman <rms@gnu.org>
41
42 * widget.texi (Introduction): Delete discussion of implementation
43 internals.
44
452007-10-25 Glenn Morris <rgm@gnu.org> 702007-10-25 Glenn Morris <rgm@gnu.org>
46 71
47 * fortran-xtra.texi (Fortran): F90 mode handles F2003. 72 * fortran-xtra.texi (Fortran): F90 mode handles F2003.
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 6b285094735..bb359a962a3 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -1397,19 +1397,19 @@ nonmarking (with @samp{&}) when possible.
1397specifies a regularly occurring event by offsets specified in days, 1397specifies a regularly occurring event by offsets specified in days,
1398weeks, and months. It is comparable to a crontab entry interpreted by 1398weeks, and months. It is comparable to a crontab entry interpreted by
1399the @code{cron} utility. Here is a nonmarking, floating diary entry 1399the @code{cron} utility. Here is a nonmarking, floating diary entry
1400that applies to the last Thursday in November: 1400that applies to the fourth Thursday in November:
1401 1401
1402@findex diary-float 1402@findex diary-float
1403@example 1403@example
1404&%%(diary-float 11 4 -1) American Thanksgiving 1404&%%(diary-float 11 4 4) American Thanksgiving
1405@end example 1405@end example
1406 1406
1407@noindent 1407@noindent
1408The 11 specifies November (the eleventh month), the 4 specifies Thursday 1408The 11 specifies November (the eleventh month), the 4 specifies Thursday
1409(the fourth day of the week, where Sunday is numbered zero), and the 1409(the fourth day of the week, where Sunday is numbered zero), and the
1410@minus{}1 specifies ``last'' (1 would mean ``first,'' 2 would mean 1410second 4 specifies the fourth Thursday (1 would mean ``first,'' 2 would
1411``second,'' @minus{}2 would mean ``second-to-last,'' and so on). The 1411mean ``second,'' @minus{}2 would mean ``second-to-last,'' and so on).
1412month can be a single month or a list of months. Thus you could change 1412The month can be a single month or a list of months. Thus you could change
1413the 11 above to @samp{'(1 2 3)} and have the entry apply to the last 1413the 11 above to @samp{'(1 2 3)} and have the entry apply to the last
1414Thursday of January, February, and March. If the month is @code{t}, the 1414Thursday of January, February, and March. If the month is @code{t}, the
1415entry applies to all months of the year.@refill 1415entry applies to all months of the year.@refill
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 29d1c902b7c..4bd1ba66df7 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1099,10 +1099,14 @@ particular Lisp file. @xref{Enabling Multibyte}.
1099the first line as well. 1099the first line as well.
1100 1100
1101@cindex shell scripts, and local file variables 1101@cindex shell scripts, and local file variables
1102@cindex man pages, and local file variables
1102 In shell scripts, the first line is used to identify the script 1103 In shell scripts, the first line is used to identify the script
1103interpreter, so you cannot put any local variables there. To 1104interpreter, so you cannot put any local variables there. To
1104accommodate this, Emacs looks for local variable specifications in the 1105accommodate this, Emacs looks for local variable specifications in the
1105@emph{second} line when the first line specifies an interpreter. 1106@emph{second} line when the first line specifies an interpreter.
1107The same is true for man pages which start with the magic string
1108@samp{'\"} to specify a list of troff preprocessors (not all do,
1109however).
1106 1110
1107 A @dfn{local variables list} goes near the end of the file, in the 1111 A @dfn{local variables list} goes near the end of the file, in the
1108last page. (It is often best to put it on a page by itself.) The local 1112last page. (It is often best to put it on a page by itself.) The local
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index dc819bef178..8e2cb879754 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1270,7 +1270,7 @@ you want to use.
1270@subsubsection Understanding the problems it addresses 1270@subsubsection Understanding the problems it addresses
1271 1271
1272 Version control systems provide you with three important capabilities: 1272 Version control systems provide you with three important capabilities:
1273@dfn{reversibility}. @dfn{concurrency}, and @dfn{history}. 1273@dfn{reversibility}, @dfn{concurrency}, and @dfn{history}.
1274 1274
1275 The most basic capability you get from a version-control system is 1275 The most basic capability you get from a version-control system is
1276reversibility, the ability to back up to a saved, known-good state when 1276reversibility, the ability to back up to a saved, known-good state when
@@ -1298,7 +1298,7 @@ git, and Mercurial.
1298@cindex SCCS 1298@cindex SCCS
1299 SCCS was the first version-control system ever built, and was long ago 1299 SCCS was the first version-control system ever built, and was long ago
1300superseded by later and more advanced ones; Emacs supports it only for 1300superseded by later and more advanced ones; Emacs supports it only for
1301backward compatibility and historical reasons. VC compensates for 1301backward compatibility and historical reasons. VC compensates for
1302certain features missing in SCCS (snapshots, for example) by 1302certain features missing in SCCS (snapshots, for example) by
1303implementing them itself, but some other VC features, such as multiple 1303implementing them itself, but some other VC features, such as multiple
1304branches, are not available with SCCS. Since SCCS is non-free you 1304branches, are not available with SCCS. Since SCCS is non-free you
@@ -1439,7 +1439,7 @@ happen when you check in a change to a file that conflicts with a change
1439checked in by someone else after your checkout. Both kinds of conflict 1439checked in by someone else after your checkout. Both kinds of conflict
1440have to be resolved by human judgment and communication. 1440have to be resolved by human judgment and communication.
1441 1441
1442 SCCS always uses locking. RCS is lock-based by default but can be 1442 SCCS always uses locking. RCS is lock-based by default but can be
1443told to operate in a merging style. CVS and Subversion are 1443told to operate in a merging style. CVS and Subversion are
1444merge-based by default but can be told to operate in a locking mode. 1444merge-based by default but can be told to operate in a locking mode.
1445Most later version-control systems, such as GNU Arch, git, and 1445Most later version-control systems, such as GNU Arch, git, and
@@ -1463,7 +1463,7 @@ between them as much as possible.
1463and other operations are @dfn{file-based}; each file has its own 1463and other operations are @dfn{file-based}; each file has its own
1464@dfn{master file} with its own comment and revision history separate 1464@dfn{master file} with its own comment and revision history separate
1465from that of all other files in the system. Later systems, beginning 1465from that of all other files in the system. Later systems, beginning
1466with Subversion, became @dfn{changeset-based}; a checkin under these 1466with Subversion, are @dfn{changeset-based}; a checkin under these
1467may include changes to several files and that change set is treated as 1467may include changes to several files and that change set is treated as
1468a unit by the system. Any comment associated with the change belongs 1468a unit by the system. Any comment associated with the change belongs
1469to no single file, but is attached to the changeset itself. 1469to no single file, but is attached to the changeset itself.
@@ -1489,7 +1489,7 @@ systems and a bit archaic; nowadays those operations are usually called
1489 Early version-control systems were designed around a @dfn{centralized} 1489 Early version-control systems were designed around a @dfn{centralized}
1490model in which each project has only one repository used by all 1490model in which each project has only one repository used by all
1491developers. SCCS, RCS, CVS, and Subversion share this kind of model. 1491developers. SCCS, RCS, CVS, and Subversion share this kind of model.
1492It has two important problems. One is that a single repository is a 1492It has two important problems. One is that a single repository is a
1493single point of failure---if the repository server is down all work 1493single point of failure---if the repository server is down all work
1494stops. The other is that you need to be connected live to the server to 1494stops. The other is that you need to be connected live to the server to
1495do checkins and checkouts; if you're offline, you can't work. 1495do checkins and checkouts; if you're offline, you can't work.
@@ -1622,7 +1622,7 @@ your fileset is the marked files only.
1622If they are not, VC mode will fail when you attempt to execute 1622If they are not, VC mode will fail when you attempt to execute
1623a command on the fileset. 1623a command on the fileset.
1624 1624
1625 In VC, filesets, are, essentially, a way to pass multiple file 1625 VC filesets are, essentially, a way to pass multiple file
1626arguments as a group to underlying version-control commands. For 1626arguments as a group to underlying version-control commands. For
1627example, on Subversion a checkin with more than one file in its 1627example, on Subversion a checkin with more than one file in its
1628fileset will become a joint commit, as though you had typed 1628fileset will become a joint commit, as though you had typed
@@ -1640,7 +1640,7 @@ version-control systems.
1640 1640
1641 Emacs uses the concept of named filesets elsewhere 1641 Emacs uses the concept of named filesets elsewhere
1642(@pxref{Filesets}) to allow you to view and visit files in functional 1642(@pxref{Filesets}) to allow you to view and visit files in functional
1643groups. Unlike those, VC filesets are not named and don't persist 1643groups. Unlike those, VC filesets are not named and don't persist
1644across sessions. 1644across sessions.
1645 1645
1646@node Doing The Right Thing 1646@node Doing The Right Thing
@@ -1803,8 +1803,8 @@ are set around the entire contents of the buffer so that it is easy to
1803kill the contents of the buffer with @kbd{C-w}. 1803kill the contents of the buffer with @kbd{C-w}.
1804 1804
1805@findex log-edit-insert-changelog 1805@findex log-edit-insert-changelog
1806 If you work by writing entries in the @file{ChangeLog} 1806 If you work by first writing entries in the @file{ChangeLog}
1807(@pxref{Change Log}) and then commit the change under revision 1807(@pxref{Change Log}) and afterwards committing the change under revision
1808control, you can generate the Log Edit text from the ChangeLog using 1808control, you can generate the Log Edit text from the ChangeLog using
1809@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for 1809@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for
1810entries for the file(s) concerned in the top entry in the ChangeLog 1810entries for the file(s) concerned in the top entry in the ChangeLog
@@ -1845,7 +1845,7 @@ time to complete the check-in.
1845convenient to specify the same log entry for many of the files. (This 1845convenient to specify the same log entry for many of the files. (This
1846is the normal way to do things on a changeset-oriented system, where 1846is the normal way to do things on a changeset-oriented system, where
1847comments are attached to changesets rather than the history of 1847comments are attached to changesets rather than the history of
1848individual files.) The most convenient way to do this is to mark all the 1848individual files.) The most convenient way to do this is to mark all the
1849files in VC-Dired mode and check in from there; the log buffer will 1849files in VC-Dired mode and check in from there; the log buffer will
1850carry the fileset information with it and do a group commit when you 1850carry the fileset information with it and do a group commit when you
1851confirm it with @kbd{C-c C-c}. 1851confirm it with @kbd{C-c C-c}.
@@ -1952,15 +1952,15 @@ revisions are not, in general, present as files on your disk.)
1952@kindex C-x v g 1952@kindex C-x v g
1953 For some back ends, you can display the file @dfn{annotated} with 1953 For some back ends, you can display the file @dfn{annotated} with
1954per-line revision information and using colors to enhance the visual 1954per-line revision information and using colors to enhance the visual
1955appearance, with the command @kbd{M-x vc-annotate}. It creates a new 1955appearance, with the command @kbd{M-x vc-annotate}. This creates a new
1956buffer (the ``annotate buffer'') displaying the file's text, with each 1956buffer (the ``annotate buffer'') displaying the file's text, with each
1957part colored to show how old it is. Text colored red is new, blue means 1957part colored to show how old it is. Text colored red is new, blue means
1958old, and intermediate colors indicate intermediate ages. By default, 1958old, and intermediate colors indicate intermediate ages. By default,
1959the color is scaled over the full range of ages, such that the oldest 1959the color is scaled over the full range of ages, such that the oldest
1960changes are blue, and the newest changes are red. 1960changes are blue, and the newest changes are red.
1961 1961
1962 When you give a prefix argument to this command, it uses the 1962 When you give a prefix argument to this command, Emacs reads two
1963minibuffer to read two arguments: the ID of which revision to display and 1963arguments using the minibuffer: the ID of which revision to display and
1964annotate (instead of the current file contents), and the time span in 1964annotate (instead of the current file contents), and the time span in
1965days the color range should cover. 1965days the color range should cover.
1966 1966
@@ -2006,7 +2006,7 @@ return to your working revision.
2006@node Secondary VC Commands 2006@node Secondary VC Commands
2007@subsection The Secondary Commands of VC 2007@subsection The Secondary Commands of VC
2008 2008
2009 This section explains the secondary commands of VC; those that you might 2009 This section explains the secondary commands of VC, those that you might
2010use once a day. 2010use once a day.
2011 2011
2012@menu 2012@menu
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index e1207738cfa..23c48b72b41 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -224,9 +224,12 @@ for text in the cut buffer. If neither of those sources provides text
224to yank, the kill ring contents are used. 224to yank, the kill ring contents are used.
225 225
226 The standard coding system for X Window System selections is 226 The standard coding system for X Window System selections is
227@code{compound-text-with-extensions}. To specify another coding 227@code{compound-text-with-extensions}. You may find that the pasted
228system for selections, use @kbd{C-x @key{RET} x} or @kbd{C-x @key{RET} 228text is not what you expected. In such a case, you can specify
229X}. @xref{Communication Coding}. 229another coding system for selections by @kbd{C-x @key{RET} x} or
230@kbd{C-x @key{RET} X}, or can request the different data type by
231modifying the variable @code{x-select-request-type}.
232@xref{Communication Coding}.
230 233
231@node Word and Line Mouse 234@node Word and Line Mouse
232@subsection Mouse Commands for Words and Lines 235@subsection Mouse Commands for Words and Lines
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index fe7c2a85ffa..ee170e0c7da 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -155,10 +155,10 @@ Display information on the character sets, coding systems, and input
155methods used in language environment @var{language-env} 155methods used in language environment @var{language-env}
156(@code{describe-language-environment}). 156(@code{describe-language-environment}).
157@item C-h F @var{function} @key{RET} 157@item C-h F @var{function} @key{RET}
158Enter Info and goes to the node that documents the Emacs function 158Enter Info and go to the node that documents the Emacs function
159@var{function} (@code{Info-goto-emacs-command-node}). 159@var{function} (@code{Info-goto-emacs-command-node}).
160@item C-h K @var{key} 160@item C-h K @var{key}
161Enter Info and goes to the node that documents the key sequence 161Enter Info and go to the node that documents the key sequence
162@var{key} (@code{Info-goto-emacs-key-command-node}). 162@var{key} (@code{Info-goto-emacs-key-command-node}).
163@item C-h S @var{symbol} @key{RET} 163@item C-h S @var{symbol} @key{RET}
164Display the Info documentation on symbol @var{symbol} according to the 164Display the Info documentation on symbol @var{symbol} according to the
@@ -296,8 +296,8 @@ be found by this command.
296Search for user-option variables whose names match @var{pattern}. 296Search for user-option variables whose names match @var{pattern}.
297 297
298@item M-x apropos-value @key{RET} @var{pattern} @key{RET} 298@item M-x apropos-value @key{RET} @var{pattern} @key{RET}
299Search for functions whose definitions @var{pattern}, and variables 299Search for functions whose definitions match @var{pattern}, and
300whose values match @var{pattern}. 300variables whose values match @var{pattern}.
301 301
302@item C-h d @var{pattern} @key{RET} 302@item C-h d @var{pattern} @key{RET}
303Search for functions and variables whose @strong{documentation 303Search for functions and variables whose @strong{documentation
@@ -545,9 +545,9 @@ documentation of @var{function} or @var{key}.
545@findex info-lookup-symbol 545@findex info-lookup-symbol
546 When editing a program, if you have an Info version of the manual 546 When editing a program, if you have an Info version of the manual
547for the programming language, you can use @kbd{C-h S} 547for the programming language, you can use @kbd{C-h S}
548(@code{info-lookup-symbol}) to find symbol (keyword, function or 548(@code{info-lookup-symbol}) to find an entry for a symbol (keyword,
549variable) in the proper manual. The details of how this command works 549function or variable) in the proper manual. The details of how this
550depend on the major mode. 550command works depend on the major mode.
551 551
552@kindex C-h l 552@kindex C-h l
553@findex view-lossage 553@findex view-lossage
@@ -642,24 +642,23 @@ Emacs (@code{describe-no-warranty}).
642 642
643@cindex tooltips 643@cindex tooltips
644@cindex balloon help 644@cindex balloon help
645 When a region of text is ``active,'' so that you can select it with 645 When text on the screen is ``active'', so that it does something
646the mouse or a key like @kbd{RET}, it often has associated help text. 646special in response to mouse clicks or @kbd{RET}, it often has associated
647For instance, most parts of the mode line have help text. On 647help text. For instance, most parts of the mode line have help text. On
648graphical displays, the help text is displayed as a ``tooltip'' 648terminals that support mouse tracking, Emacs displays the help text as a
649(sometimes known as ``balloon help''), when you move the mouse over 649``tooltip'' (sometimes known as ``balloon help'') or in the echo area,
650the active text. @xref{Tooltips}. On some systems, it is shown in 650whenever you leave the mouse stationary over the active text.
651the echo area. On text-only terminals, if Emacs cannot follow the 651@xref{Tooltips}.
652mouse, it cannot show the help text on mouse-over.
653 652
654@kindex C-h . 653@kindex C-h .
655@findex display-local-help 654@findex display-local-help
656@vindex help-at-pt-display-when-idle 655@vindex help-at-pt-display-when-idle
657 You can also access text region help info using the keyboard. The 656 If your terminal doesn't support mouse-tracking, you can display the
658command @kbd{C-h .} (@code{display-local-help}) displays any help text 657help text for active buffer text using the keyboard. @kbd{C-h .}
659associated with the text at point, using the echo area. If you want 658(@code{display-local-help}) displays any help text associated with the
660help text to be displayed automatically whenever it is available at 659character after point, using the echo area. To display help text
661point, set the variable @code{help-at-pt-display-when-idle} to 660automatically whenever it is available on the character after point, set
662@code{t}. 661the variable @code{help-at-pt-display-when-idle} to @code{t}.
663 662
664@ignore 663@ignore
665 arch-tag: 6f33ab62-bc75-4367-8057-fd67cc15c3a1 664 arch-tag: 6f33ab62-bc75-4367-8057-fd67cc15c3a1
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 988d5890b8c..24337cb6f9e 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -367,7 +367,10 @@ etags @var{inputfiles}@dots{}
367 367
368@noindent 368@noindent
369The @code{etags} program reads the specified files, and writes a tags 369The @code{etags} program reads the specified files, and writes a tags
370table named @file{TAGS} in the current working directory. 370table named @file{TAGS} in the current working directory. You can
371optionally specify a different file name for the tags table by using the
372@samp{--output=@var{file}} option; specifying @file{-} as a file name
373prints the tags table to standard output.
371 374
372 If the specified files don't exist, @code{etags} looks for 375 If the specified files don't exist, @code{etags} looks for
373compressed versions of them and uncompresses them to read them. Under 376compressed versions of them and uncompresses them to read them. Under
@@ -406,7 +409,8 @@ well as the files it directly contains.
406directory where the tags file was initially written. This way, you can 409directory where the tags file was initially written. This way, you can
407move an entire directory tree containing both the tags file and the 410move an entire directory tree containing both the tags file and the
408source files, and the tags file will still refer correctly to the source 411source files, and the tags file will still refer correctly to the source
409files. If the tags file is in @file{/dev}, however, the file names are 412files. If the tags file is @file{-} or is in the @file{/dev} directory,
413however, the file names are
410made relative to the current working directory. This is useful, for 414made relative to the current working directory. This is useful, for
411example, when writing the tags to @file{/dev/stdout}. 415example, when writing the tags to @file{/dev/stdout}.
412 416
diff --git a/doc/emacs/major.texi b/doc/emacs/major.texi
index 1cb76ee5fdf..3980c5de003 100644
--- a/doc/emacs/major.texi
+++ b/doc/emacs/major.texi
@@ -174,7 +174,10 @@ interpreter program names and major modes.
174systems) use the @samp{-*-} feature on the first line, because the 174systems) use the @samp{-*-} feature on the first line, because the
175system would get confused when running the interpreter. So Emacs looks 175system would get confused when running the interpreter. So Emacs looks
176for @samp{-*-} on the second line in such files as well as on the 176for @samp{-*-} on the second line in such files as well as on the
177first line. 177first line. The same is true for man pages which start with the magic
178string @samp{'\"} to specify a list of troff preprocessors (not all do,
179however).
180
178 181
179@vindex default-major-mode 182@vindex default-major-mode
180 When you visit a file that does not specify a major mode to use, or 183 When you visit a file that does not specify a major mode to use, or
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 0def4bc5c3e..d7dd364b6d0 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1086,6 +1086,20 @@ you override it by using the command again. The command @kbd{C-x
1086@key{RET} X} (@code{set-next-selection-coding-system}) specifies the 1086@key{RET} X} (@code{set-next-selection-coding-system}) specifies the
1087coding system for the next selection made in Emacs or read by Emacs. 1087coding system for the next selection made in Emacs or read by Emacs.
1088 1088
1089@vindex x-select-request-type
1090 The variable @code{x-select-request-type} specifies the data type to
1091request from the X Window System for receiving text selections from
1092other applications. If the value is @code{nil} (the default), Emacs
1093tries @code{COMPOUND_TEXT} and @code{UTF8_STRING}, in this order, and
1094uses various heuristics to choose the more appropriate of the two
1095results; if none of these succeed, Emacs falls back on @code{STRING}.
1096If the value of @code{x-select-request-type} is one of the symbols
1097@code{COMPOUND_TEXT}, @code{UTF8_STRING}, @code{STRING}, or
1098@code{TEXT}, Emacs uses only that request type. If the value is a
1099list of some of these symbols, Emacs tries only the request types in
1100the list, in order, until one of them succeeds, or until the list is
1101exhausted.
1102
1089@kindex C-x RET p 1103@kindex C-x RET p
1090@findex set-buffer-process-coding-system 1104@findex set-buffer-process-coding-system
1091 The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system}) 1105 The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system})
@@ -1115,6 +1129,15 @@ specified by one of the environment variables @env{LC_ALL},
1115specified above, whose value is nonempty is the one that determines 1129specified above, whose value is nonempty is the one that determines
1116the text representation.) 1130the text representation.)
1117 1131
1132@vindex x-select-request-type
1133 The variable @code{x-select-request-type} specifies a selection data
1134type of selection to request from the X server. The default value is
1135@code{nil}, which means Emacs tries @code{COMPOUND_TEXT} and
1136@code{UTF8_STRING}, and uses whichever result seems more appropriate.
1137You can explicitly specify the data type by setting the variable to
1138one of the symbols @code{COMPOUND_TEXT}, @code{UTF8_STRING},
1139@code{STRING} and @code{TEXT}.
1140
1118@node File Name Coding 1141@node File Name Coding
1119@section Coding Systems for File Names 1142@section Coding Systems for File Names
1120 1143
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 284809bdac1..586f250bd06 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,71 @@
12007-12-04 Richard Stallman <rms@gnu.org>
2
3 * objects.texi (Symbol Type): Fix typo.
4
52007-12-03 Richard Stallman <rms@gnu.org>
6
7 * hooks.texi (Standard Hooks): Add link to Hooks for Loading.
8
92007-12-01 Glenn Morris <rgm@gnu.org>
10
11 * functions.texi (Declaring Functions): Improve previous change.
12
132007-11-30 Glenn Morris <rgm@gnu.org>
14
15 * functions.texi (Declaring Functions): Add optional fourth
16 argument of declare-function, and setting third argument to `t'.
17
182007-11-29 Richard Stallman <rms@gnu.org>
19
20 * customize.texi (Composite Types): Document `group' type.
21
222007-11-29 Glenn Morris <rgm@gnu.org>
23
24 * functions.texi (Declaring Functions): Add findex. Mention
25 `external' files.
26
272007-11-26 Juanma Barranquero <lekktu@gmail.com>
28
29 * functions.texi (Declaring Functions): Fix directive.
30
312007-11-25 Richard Stallman <rms@gnu.org>
32
33 * help.texi (Help Functions): Clean up last change.
34
35 * advice.texi (Preactivation, Activation of Advice): Minor cleanup.
36
37 * loading.texi (Named Features): Minor cleanup.
38
39 * macros.texi (Eval During Expansion): Minor cleanup.
40
41 * variables.texi (Variable Aliases): Minor cleanup.
42
432007-11-24 Richard Stallman <rms@gnu.org>
44
45 * functions.texi (Declaring Functions): Clarify previous change.
46
47 * compile.texi (Compiler Errors): Clarify previous change.
48
492007-11-24 Richard Stallman <rms@gnu.org>
50
51 * display.texi (Refresh Screen, Forcing Redisplay):
52 Clarify the text and move items around.
53
542007-11-24 Glenn Morris <rgm@gnu.org>
55
56 * functions.texi (Declaring Functions): New section.
57 * compile.texi (Compiler Errors): Mention declaring functions,
58 defvar with no initvalue, and byte-compile-warnings.
59
602007-11-15 Martin Rudalics <rudalics@gmx.at>
61
62 * vol1.texi (Top): Remove Frame-Local Variables from Node Listing.
63 * vol2.texi (Top): Remove Frame-Local Variables from Node Listing.
64
652007-11-13 Martin Rudalics <rudalics@gmx.at>
66
67 * help.texi (Help Functions): Document new macro `with-help-window'.
68
12007-11-10 Paul Pogonyshev <pogonyshev@gmx.net> 692007-11-10 Paul Pogonyshev <pogonyshev@gmx.net>
2 70
3 * searching.texi (Replacing Match): Describe new 71 * searching.texi (Replacing Match): Describe new
@@ -1743,7 +1811,7 @@
1743 Explain string and vector representations of key sequences 1811 Explain string and vector representations of key sequences
1744 1812
1745 * keymaps.texi (Changing Key Bindings): 1813 * keymaps.texi (Changing Key Bindings):
1746 * commands.texi (Interactive Codes, Interactive Codes): 1814 * commands.texi (Interactive Codes):
1747 * help.texi (Describing Characters): Refer to it. 1815 * help.texi (Describing Characters): Refer to it.
1748 1816
17492006-05-23 Luc Teirlinck <teirllm@auburn.edu> 18172006-05-23 Luc Teirlinck <teirllm@auburn.edu>
@@ -3500,8 +3568,7 @@
3500 3568
3501 * text.texi (Undo): Document extensible undo entries. 3569 * text.texi (Undo): Document extensible undo entries.
3502 3570
3503 * searching.texi (String Search, Regexp Search, Regexp Search): 3571 * searching.texi (String Search, Regexp Search): Cleanups.
3504 Cleanups.
3505 3572
3506 * nonascii.texi (Character Codes): Minor fix. 3573 * nonascii.texi (Character Codes): Minor fix.
3507 3574
diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi
index 7eb89d7bd41..168135ef794 100644
--- a/doc/lispref/advice.texi
+++ b/doc/lispref/advice.texi
@@ -448,7 +448,7 @@ that results from activating advice for a function.
448A value of @code{always} specifies to compile unconditionally. 448A value of @code{always} specifies to compile unconditionally.
449A value of @code{never} specifies never compile the advice. 449A value of @code{never} specifies never compile the advice.
450 450
451A value of @code{maybe} specifies to compile if the byte-compiler is 451A value of @code{maybe} specifies to compile if the byte compiler is
452already loaded. A value of @code{like-original} specifies to compile 452already loaded. A value of @code{like-original} specifies to compile
453the advice if the original definition of the advised function is 453the advice if the original definition of the advised function is
454compiled or a built-in function. 454compiled or a built-in function.
@@ -545,11 +545,11 @@ work properly, because of a mismatch.
545Activation of the advised 545Activation of the advised
546function takes longer than usual. 546function takes longer than usual.
547@item 547@item
548The byte-compiler gets 548The byte compiler gets
549loaded while an advised function gets activated. 549loaded while an advised function gets activated.
550@item 550@item
551@code{byte-compile} is included in the value of @code{features} even 551@code{byte-compile} is included in the value of @code{features} even
552though you did not ever explicitly use the byte-compiler. 552though you did not ever explicitly use the byte compiler.
553@end itemize 553@end itemize
554 554
555Compiled preactivated advice works properly even if the function itself 555Compiled preactivated advice works properly even if the function itself
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index aeaa9f79eb8..292c52a6dfa 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -505,9 +505,14 @@ The call to @var{func} must be in the @var{then-form} of the
505@code{if}, and @var{func} must appear quoted in the call to 505@code{if}, and @var{func} must appear quoted in the call to
506@code{fboundp}. (This feature operates for @code{cond} as well.) 506@code{fboundp}. (This feature operates for @code{cond} as well.)
507 507
508 Likewise, you can suppress a compiler warning for an unbound variable 508 You can tell the compiler that a function is defined using
509@var{variable} by conditionalizing its use on a @code{boundp} test, 509@code{declare-function} (@pxref{Declaring Functions}). Likewise, you
510like this: 510can tell the compiler that a variable is defined using @code{defvar}
511with no initial value.
512
513 You can suppress the compiler warning for a specific use of an
514undefined variable @var{variable} by conditionalizing its use on a
515@code{boundp} test, like this:
511 516
512@example 517@example
513(if (boundp '@var{variable}) ...@var{variable}...) 518(if (boundp '@var{variable}) ...@var{variable}...)
@@ -518,8 +523,8 @@ The reference to @var{variable} must be in the @var{then-form} of the
518@code{if}, and @var{variable} must appear quoted in the call to 523@code{if}, and @var{variable} must appear quoted in the call to
519@code{boundp}. 524@code{boundp}.
520 525
521 You can suppress any compiler warnings using the construct 526 You can suppress any and all compiler warnings within a certain
522@code{with-no-warnings}: 527expression using the construct @code{with-no-warnings}:
523 528
524@c This is implemented with a defun, but conceptually it is 529@c This is implemented with a defun, but conceptually it is
525@c a special form. 530@c a special form.
@@ -530,9 +535,13 @@ but the compiler does not issue warnings for anything that occurs
530inside @var{body}. 535inside @var{body}.
531 536
532We recommend that you use this construct around the smallest 537We recommend that you use this construct around the smallest
533possible piece of code. 538possible piece of code, to avoid missing possible warnings other than one
539one you intend to suppress.
534@end defspec 540@end defspec
535 541
542 More precise control of warnings is possible by setting the variable
543@code{byte-compile-warnings}.
544
536@node Byte-Code Objects 545@node Byte-Code Objects
537@section Byte-Code Function Objects 546@section Byte-Code Function Objects
538@cindex compiled function 547@cindex compiled function
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 7c723a29f28..b97ce20fc22 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -755,6 +755,11 @@ string, and the third a function.
755In the customization buffer, each element is displayed and edited 755In the customization buffer, each element is displayed and edited
756separately, according to the type specified for it. 756separately, according to the type specified for it.
757 757
758@item (group @var{element-types}@dots{})
759This works like @code{list} except for the formatting
760of text in the Custom buffer. @code{list} labels each
761element value with its tag; @code{group} does not.
762
758@item (vector @var{element-types}@dots{}) 763@item (vector @var{element-types}@dots{})
759Like @code{list} except that the value must be a vector instead of a 764Like @code{list} except that the value must be a vector instead of a
760list. The elements work the same as in @code{list}. 765list. The elements work the same as in @code{list}.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 4c9df9c5ede..165636006d3 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -55,21 +55,10 @@ This function clears and redisplays frame @var{frame}.
55This function clears and redisplays all visible frames. 55This function clears and redisplays all visible frames.
56@end deffn 56@end deffn
57 57
58 This function calls for redisplay of certain windows, the next time 58 In Emacs, processing user input takes priority over redisplay. If
59redisplay is done, but does not clear them first. 59you call these functions when input is available, they don't redisplay
60 60immediately, but the requested redisplay does happen
61@defun force-window-update &optional object 61eventually---after all the input has been processed.
62This function forces some or all windows to be updated on next redisplay.
63If @var{object} is a window, it forces redisplay of that window. If
64@var{object} is a buffer or buffer name, it forces redisplay of all
65windows displaying that buffer. If @var{object} is @code{nil} (or
66omitted), it forces redisplay of all windows.
67@end defun
68
69 Processing user input takes absolute priority over redisplay. If you
70call these functions when input is available, they do nothing
71immediately, but a full redisplay does happen eventually---after all the
72input has been processed.
73 62
74 Normally, suspending and resuming Emacs also refreshes the screen. 63 Normally, suspending and resuming Emacs also refreshes the screen.
75Some terminal emulators record separate contents for display-oriented 64Some terminal emulators record separate contents for display-oriented
@@ -89,11 +78,56 @@ to redraw, @code{nil} means redrawing is needed. The default is @code{nil}.
89@section Forcing Redisplay 78@section Forcing Redisplay
90@cindex forcing redisplay 79@cindex forcing redisplay
91 80
81 Emacs normally tries to redisplay the screen whenever it waits for
82input. With this function you can request an immediate attempt to
83redisplay, in the middle of Lisp code, without actually waiting for
84input.
85
86@defun redisplay &optional force
87This function tries immediately to redisplay, provided there are no
88pending input events. It is equivalent to @code{(sit-for 0)}.
89
90If the optional argument @var{force} is non-@code{nil}, it does all
91pending redisplay work even if input is available, with no
92pre-emption.
93
94The function returns @code{t} if it actually tried to redisplay, and
95@code{nil} otherwise. A value of @code{t} does not mean that
96redisplay proceeded to completion; it could have been pre-empted by
97newly arriving terminal input.
98@end defun
99
100 @code{redisplay} with no argument tries immediately to redisplay,
101but has no effect on the usual rules for what parts of the screen to
102redisplay. By contrast, the following function adds certain windows
103to the pending redisplay work (as if their contents had completely
104changed), but doesn't immediately try to do any redisplay work.
105
106@defun force-window-update &optional object
107This function forces some or all windows to be updated on next
108redisplay. If @var{object} is a window, it requires eventual
109redisplay of that window. If @var{object} is a buffer or buffer name,
110it requires eventual redisplay of all windows displaying that buffer.
111If @var{object} is @code{nil} (or omitted), it requires eventual
112redisplay of all windows.
113@end defun
114
115 @code{force-window-update} does not do a redisplay immediately.
116(Emacs will do that when it waits for input.) Rather, its effect is
117to put more work on the queue to be done by redisplay whenever there
118is a chance.
119
92 Emacs redisplay normally stops if input arrives, and does not happen 120 Emacs redisplay normally stops if input arrives, and does not happen
93at all if input is available before it starts. Most of the time, this 121at all if input is available before it starts. Most of the time, this
94is exactly what you want. However, you can prevent preemption by 122is exactly what you want. However, you can prevent preemption by
95binding @code{redisplay-dont-pause} to a non-@code{nil} value. 123binding @code{redisplay-dont-pause} to a non-@code{nil} value.
96 124
125@defvar redisplay-dont-pause
126If this variable is non-@code{nil}, pending input does not
127prevent or halt redisplay; redisplay occurs, and finishes,
128regardless of whether input is available.
129@end defvar
130
97@defvar redisplay-preemption-period 131@defvar redisplay-preemption-period
98This variable specifies how many seconds Emacs waits between checks 132This variable specifies how many seconds Emacs waits between checks
99for new input during redisplay. (The default is 0.1 seconds.) If 133for new input during redisplay. (The default is 0.1 seconds.) If
@@ -107,22 +141,6 @@ This variable is only obeyed on graphical terminals. For
107text terminals, see @ref{Terminal Output}. 141text terminals, see @ref{Terminal Output}.
108@end defvar 142@end defvar
109 143
110@defvar redisplay-dont-pause
111If this variable is non-@code{nil}, pending input does not
112prevent or halt redisplay; redisplay occurs, and finishes,
113regardless of whether input is available.
114@end defvar
115
116@defun redisplay &optional force
117This function performs an immediate redisplay provided there are no
118pending input events. This is equivalent to @code{(sit-for 0)}.
119
120If the optional argument @var{force} is non-@code{nil}, it forces an
121immediate and complete redisplay even if input is available.
122
123Returns @code{t} if redisplay was performed, or @code{nil} otherwise.
124@end defun
125
126@node Truncation 144@node Truncation
127@section Truncation 145@section Truncation
128@cindex line wrapping 146@cindex line wrapping
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 601644629e5..3767e778cf7 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -23,6 +23,7 @@ define them.
23 of a symbol. 23 of a symbol.
24* Obsolete Functions:: Declaring functions obsolete. 24* Obsolete Functions:: Declaring functions obsolete.
25* Inline Functions:: Defining functions that the compiler will open code. 25* Inline Functions:: Defining functions that the compiler will open code.
26* Declaring Functions:: Telling the compiler that a function is defined.
26* Function Safety:: Determining whether a function is safe to call. 27* Function Safety:: Determining whether a function is safe to call.
27* Related Topics:: Cross-references to specific Lisp primitives 28* Related Topics:: Cross-references to specific Lisp primitives
28 that have a special bearing on how functions work. 29 that have a special bearing on how functions work.
@@ -1222,6 +1223,88 @@ do for macros. (@xref{Argument Evaluation}.)
1222Inline functions can be used and open-coded later on in the same file, 1223Inline functions can be used and open-coded later on in the same file,
1223following the definition, just like macros. 1224following the definition, just like macros.
1224 1225
1226@node Declaring Functions
1227@section Telling the Compiler that a Function is Defined
1228@cindex function declaration
1229@cindex declaring functions
1230@findex declare-function
1231
1232Byte-compiling a file often produces warnings about functions that the
1233compiler doesn't know about (@pxref{Compiler Errors}). Sometimes this
1234indicates a real problem, but usually the functions in question are
1235defined in other files which would be loaded if that code is run. For
1236example, byte-compiling @file{fortran.el} used to warn:
1237
1238@smallexample
1239In end of data:
1240fortran.el:2152:1:Warning: the function `gud-find-c-expr' is not known to be defined.
1241@end smallexample
1242
1243In fact, @code{gud-find-c-expr} is only used in the function that
1244Fortran mode uses for the local value of
1245@code{gud-find-expr-function}, which is a callback from GUD; if it is
1246called, the GUD functions will be loaded. When you know that such a
1247warning does not indicate a real problem, it is good to suppress the
1248warning. That makes new warnings which might mean real problems more
1249visible. You do that with @code{declare-function}.
1250
1251All you need to do is add a @code{declare-function} statement before the
1252first use of the function in question:
1253
1254@smallexample
1255(declare-function gud-find-c-expr "gud.el" nil)
1256@end smallexample
1257
1258This says that @code{gud-find-c-expr} is defined in @file{gud.el} (the
1259@samp{.el} can be omitted). The compiler takes for granted that that file
1260really defines the function, and does not check.
1261
1262 The optional third argument specifies the argument list of
1263@code{gud-find-c-expr}. In this case, it takes no arguments
1264(@code{nil} is different from not specifying a value). In other
1265cases, this might be something like @code{(file &optional overwrite)}.
1266You don't have to specify the argument list, but if you do the
1267byte compiler can check that the calls match the declaration.
1268
1269@defmac declare-function function file &optional arglist fileonly
1270Tell the byte compiler to assume that @var{function} is defined, with
1271arguments @var{arglist}, and that the definition should come from
1272the file @var{file}. @var{fileonly} non-nil means only check that
1273@var{file} exists, not that it actually defines @var{function}.
1274@end defmac
1275
1276 To verify that these functions really are declared where
1277@code{declare-function} says they are, use @code{check-declare-file}
1278to check all @code{declare-function} calls in one source file, or use
1279@code{check-declare-directory} check all the files in and under a
1280certain directory.
1281
1282 These commands find the file that ought to contain a function's
1283definition using @code{locate-library}; if that finds no file, they
1284expand the definition file name relative to the directory of the file
1285that contains the @code{declare-function} call.
1286
1287 You can also say that a function is defined by C code by specifying
1288a file name ending in @samp{.c}. @code{check-declare-file} looks for
1289these files in the C source code directory. This is useful only when
1290you call a function that is defined only on certain systems. Most
1291of the primitive functions of Emacs are always defined so they will
1292never give you a warning.
1293
1294 Sometimes a file will optionally use functions from an external package.
1295If you prefix the filename in the @code{declare-function} statement with
1296@samp{ext:}, then it will be checked if it is found, otherwise skipped
1297without error.
1298
1299 There are some function definitions that @samp{check-declare} does not
1300understand (e.g. @code{defstruct} and some other macros). In such cases,
1301you can pass a non-@code{nil} @var{fileonly} argument to
1302@code{declare-function}, meaning to only check that the file exists, not
1303that it actually defines the function. Note that to do this without
1304having to specify an argument list, you should set the @var{arglist}
1305argument to @code{t} (because @code{nil} means an empty argument list, as
1306opposed to an unspecified one).
1307
1225@node Function Safety 1308@node Function Safety
1226@section Determining whether a Function is Safe to Call 1309@section Determining whether a Function is Safe to Call
1227@cindex function safety 1310@cindex function safety
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 64b6a6ecfa2..1454e5ab95e 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -687,6 +687,18 @@ This macro is used in the command @code{help-for-help} which is the
687binding of @kbd{C-h C-h}. 687binding of @kbd{C-h C-h}.
688@end defmac 688@end defmac
689 689
690@defmac with-help-window buffer-name body@dots{}
691This macro evaluates the @var{body} forms, inserting any output they
692produce into a buffer named @var{buffer-name} like
693@code{with-output-to-temp-buffer} (@pxref{Temporary Displays}). It
694also puts that buffer in Help mode, displays a message telling the
695user how to quit and scroll the help window, and does various other
696things that make a help window work better.
697
698Don't use @code{print-help-return-message} in the body of this macro;
699it would cause bad results.
700@end defmac
701
690@defopt three-step-help 702@defopt three-step-help
691If this variable is non-@code{nil}, commands defined with 703If this variable is non-@code{nil}, commands defined with
692@code{make-help-screen} display their @var{help-line} strings in the 704@code{make-help-screen} display their @var{help-line} strings in the
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index d0bb2de8675..3f7f4b4d8bb 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -31,6 +31,10 @@ these functions are called in a special way (they are passed arguments,
31or their values are used). The variables whose names end in 31or their values are used). The variables whose names end in
32@samp{-function} have single functions as their values. 32@samp{-function} have single functions as their values.
33 33
34A special feature allows you to specify expressions to evaluate if and
35when a file is loaded (@pxref{Hooks for Loading}). That feature is
36not exactly a hook, but does a similar job.
37
34@c We need to xref to where each hook is documented or else document 38@c We need to xref to where each hook is documented or else document
35@c it here. 39@c it here.
36 40
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index cbea262cc45..06f9b6bc016 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -692,7 +692,7 @@ done.
692 When @code{require} is used at top level in a file, it takes effect 692 When @code{require} is used at top level in a file, it takes effect
693when you byte-compile that file (@pxref{Byte Compilation}) as well as 693when you byte-compile that file (@pxref{Byte Compilation}) as well as
694when you load it. This is in case the required package contains macros 694when you load it. This is in case the required package contains macros
695that the byte compiler must know about. It also avoids byte-compiler 695that the byte compiler must know about. It also avoids byte compiler
696warnings for functions and variables defined in the file loaded with 696warnings for functions and variables defined in the file loaded with
697@code{require}. 697@code{require}.
698 698
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index 152b7b652b6..81477bb2eff 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -623,7 +623,7 @@ it. Here is an example:
623 623
624 Another problem with calling @code{eval} in a macro definition is that 624 Another problem with calling @code{eval} in a macro definition is that
625it probably won't do what you intend in a compiled program. The 625it probably won't do what you intend in a compiled program. The
626byte-compiler runs macro definitions while compiling the program, when 626byte compiler runs macro definitions while compiling the program, when
627the program's own computations (which you might have wished to access 627the program's own computations (which you might have wished to access
628with @code{eval}) don't occur and its local variable bindings don't 628with @code{eval}) don't occur and its local variable bindings don't
629exist. 629exist.
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 0da05488858..64c79d63162 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -525,7 +525,7 @@ bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper.
525 525
526 A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The 526 A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The
527symbol name serves as the printed representation of the symbol. In 527symbol name serves as the printed representation of the symbol. In
528ordinary Lisp use, with one single obarray (@pxref{Creating Symbols}, 528ordinary Lisp use, with one single obarray (@pxref{Creating Symbols}),
529a symbol's name is unique---no two symbols have the same name. 529a symbol's name is unique---no two symbols have the same name.
530 530
531 A symbol can serve as a variable, as a function name, or to hold a 531 A symbol can serve as a variable, as a function name, or to hold a
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 0ca217dbe47..aee7d4f8be3 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1701,7 +1701,7 @@ the old name is obsolete and therefore that it may be removed at some
1701stage in the future. 1701stage in the future.
1702 1702
1703@defun make-obsolete-variable obsolete-name current-name &optional when 1703@defun make-obsolete-variable obsolete-name current-name &optional when
1704This function makes the byte-compiler warn that the variable 1704This function makes the byte compiler warn that the variable
1705@var{obsolete-name} is obsolete. If @var{current-name} is a symbol, it is 1705@var{obsolete-name} is obsolete. If @var{current-name} is a symbol, it is
1706the variable's new name; then the warning message says to use 1706the variable's new name; then the warning message says to use
1707@var{current-name} instead of @var{obsolete-name}. If @var{current-name} 1707@var{current-name} instead of @var{obsolete-name}. If @var{current-name}
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index d41b2f076df..5784ed0b19b 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -441,7 +441,6 @@ Variables
441* Setting Variables:: Storing new values in variables. 441* Setting Variables:: Storing new values in variables.
442* Variable Scoping:: How Lisp chooses among local and global values. 442* Variable Scoping:: How Lisp chooses among local and global values.
443* Buffer-Local Variables:: Variable values in effect only in one buffer. 443* Buffer-Local Variables:: Variable values in effect only in one buffer.
444* Frame-Local Variables:: Variable values in effect only in one frame.
445* Future Local Variables:: New kinds of local values we might add some day. 444* Future Local Variables:: New kinds of local values we might add some day.
446* File Local Variables:: Handling local variable lists in files. 445* File Local Variables:: Handling local variable lists in files.
447* Variable Aliases:: Variables that are aliases for other variables. 446* Variable Aliases:: Variables that are aliases for other variables.
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 515973c6281..c27f004e16f 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -440,7 +440,6 @@ Variables
440* Setting Variables:: Storing new values in variables. 440* Setting Variables:: Storing new values in variables.
441* Variable Scoping:: How Lisp chooses among local and global values. 441* Variable Scoping:: How Lisp chooses among local and global values.
442* Buffer-Local Variables:: Variable values in effect only in one buffer. 442* Buffer-Local Variables:: Variable values in effect only in one buffer.
443* Frame-Local Variables:: Variable values in effect only in one frame.
444* Future Local Variables:: New kinds of local values we might add some day. 443* Future Local Variables:: New kinds of local values we might add some day.
445* File Local Variables:: Handling local variable lists in files. 444* File Local Variables:: Handling local variable lists in files.
446* Variable Aliases:: Variables that are aliases for other variables. 445* Variable Aliases:: Variables that are aliases for other variables.
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog
index 24cae258db5..90346a186a7 100644
--- a/doc/man/ChangeLog
+++ b/doc/man/ChangeLog
@@ -1,3 +1,12 @@
12007-11-22 Francesco Potort,Al(B <pot@gnu.org>
2
3 * etags.1: Ctags and Etags now share the same defaults, so remove
4 --defines, --globals, --members, --typedefs, --typedefs-and-c++.
5
62007-11-15 Francesco Potort,Al(B <pot@gnu.org>
7
8 * etags.1: Note that you can use "-" for stdout with -o.
9
12007-09-06 Glenn Morris <rgm@gnu.org> 102007-09-06 Glenn Morris <rgm@gnu.org>
2 11
3 * ctags.1, emacs.1, emacsclient.1, etags.1: Move from etc/ to 12 * ctags.1, emacs.1, emacsclient.1, etags.1: Move from etc/ to
diff --git a/doc/man/etags.1 b/doc/man/etags.1
index 04b67f389f4..897cd0b881a 100644
--- a/doc/man/etags.1
+++ b/doc/man/etags.1
@@ -32,11 +32,10 @@ etags, ctags \- generate tag file for Emacs, vi
32[\|\-\-parse\-stdin=\fIfile\fP\|] 32[\|\-\-parse\-stdin=\fIfile\fP\|]
33.br 33.br
34[\|\-\-append\|] [\|\-\-backward\-search\|] 34[\|\-\-append\|] [\|\-\-backward\-search\|]
35[\|\-\-cxref\|] [\|\-\-defines\|] [\|\-\-forward\-search\|] 35[\|\-\-cxref\|] [\|\-\-no\-defines\|] [\|\-\-forward\-search\|]
36[\|\-\-globals\|] [\|\-\-ignore\-indentation\|] 36[\|\-\-no\-globals\|] [\|\-\-ignore\-indentation\|]
37[\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|] 37[\|\-\-language=\fIlanguage\fP\|] [\|\-\-no\-members\|]
38[\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|] 38[\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|]
39[\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|]
40[\|\-\-update\|] 39[\|\-\-update\|]
41[\|\-\-help\|] [\|\-\-version\|] 40[\|\-\-help\|] [\|\-\-version\|]
42\fIfile\fP .\|.\|. 41\fIfile\fP .\|.\|.
@@ -59,9 +58,9 @@ table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for
59\fBctags\fP) in the current working directory. 58\fBctags\fP) in the current working directory.
60Files specified with relative file names will be recorded in the tag 59Files specified with relative file names will be recorded in the tag
61table with file names relative to the directory where the tag table 60table with file names relative to the directory where the tag table
62resides. If the tag table is in /dev, however, the file names are made 61resides. If the tag table is in /dev or is the standard output,
63relative to the working directory. Files specified with absolute file 62however, the file names are made relative to the working directory.
64names will be recorded 63Files specified with absolute file names will be recorded
65with absolute file names. Files generated from a source file\-\-like 64with absolute file names. Files generated from a source file\-\-like
66a C file generated from a source Cweb file\-\-will be recorded with 65a C file generated from a source Cweb file\-\-will be recorded with
67the name of the source file. 66the name of the source file.
@@ -91,28 +90,14 @@ Only \fBctags\fP accepts this option.
91In C and derived languages, create tags for function declarations, 90In C and derived languages, create tags for function declarations,
92and create tags for extern variables unless \-\-no\-globals is used. 91and create tags for extern variables unless \-\-no\-globals is used.
93.TP 92.TP
94.B \-d, \-\-defines
95Create tag entries for C preprocessor constant definitions
96and enum constants, too. Since this is the default behavior of
97\fBetags\fP, only \fBctags\fP accepts this option.
98.TP
99.B \-D, \-\-no\-defines 93.B \-D, \-\-no\-defines
100Do not create tag entries for C preprocessor constant definitions 94Do not create tag entries for C preprocessor constant definitions
101and enum constants. 95and enum constants.
102This may make the tags file much smaller if many header files are tagged. 96This may make the tags file much smaller if many header files are tagged.
103Since this is the default behavior of \fBctags\fP, only \fBetags\fP
104accepts this option.
105.TP
106.B \-\-globals
107Create tag entries for global variables in C, C++, Objective C, Java,
108and Perl.
109Since this is the default behavior of \fBetags\fP, only \fBctags\fP
110accepts this option.
111.TP 97.TP
112.B \-\-no\-globals 98.B \-\-no\-globals
113Do not tag global variables. Typically this reduces the file size by 99Do not tag global variables. Typically this reduces the file size by
114one fourth. Since this is the default behavior of \fBctags\fP, only 100one fourth.
115\fBetags\fP accepts this option.
116.TP 101.TP
117\fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP 102\fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP
118Include a note in the tag file indicating that, when searching for a 103Include a note in the tag file indicating that, when searching for a
@@ -135,10 +120,10 @@ regexp matching is done in this case (see the \fB\-\-regex\fP option).
135.TP 120.TP
136.B \-\-members 121.B \-\-members
137Create tag entries for variables that are members of structure-like 122Create tag entries for variables that are members of structure-like
138constructs in C++, Objective C, Java. This is the default for etags. 123constructs in C++, Objective C, Java. This is the default.
139.TP 124.TP
140.B \-\-no\-members 125.B \-\-no\-members
141Do not tag member variables. This is the default for ctags. 126Do not tag member variables.
142.TP 127.TP
143.B \-\-packages\-only 128.B \-\-packages\-only
144Only tag packages in Ada files. 129Only tag packages in Ada files.
@@ -149,8 +134,9 @@ May be used (only once) in place of a file name on the command line.
149as belonging to the file \fBFILE\fP. 134as belonging to the file \fBFILE\fP.
150.TP 135.TP
151\fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP 136\fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP
152Explicit name of file for tag table; overrides default \fBTAGS\fP or 137Explicit name of file for tag table; for \fBetags\fP only, a file name
153\fBtags\fP. (But ignored with \fB\-v\fP or \fB\-x\fP.) 138of \- means standard output; overrides default \fBTAGS\fP or \fBtags\fP.
139(But ignored with \fB\-v\fP or \fB\-x\fP.)
154.TP 140.TP
155\fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP 141\fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP
156 142
@@ -241,15 +227,6 @@ reads the regexes contained in the file regex.file.
241Don't do any more regexp matching on the following files. May be 227Don't do any more regexp matching on the following files. May be
242freely intermixed with filenames and the \fB\-\-regex\fP option. 228freely intermixed with filenames and the \fB\-\-regex\fP option.
243.TP 229.TP
244.B \-t, \-\-typedefs
245Record typedefs in C code as tags. Since this is the default behavior
246of \fBetags\fP, only \fBctags\fP accepts this option.
247.TP
248.B \-T, \-\-typedefs\-and\-c++
249Generate tag entries for typedefs, struct, enum, and union tags, and
250C++ member functions. Since this is the default behavior
251of \fBetags\fP, only \fBctags\fP accepts this option.
252.TP
253.B \-u, \-\-update 230.B \-u, \-\-update
254Update tag entries for \fIfiles\fP specified on command line, leaving 231Update tag entries for \fIfiles\fP specified on command line, leaving
255tag entries for other files in place. Currently, this is implemented 232tag entries for other files in place. Currently, this is implemented
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 63f9a6e596f..61fd28a0622 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,9 +1,125 @@
12007-12-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus.texi (Other Files): Add the yenc command.
4
52007-11-30 Reiner Steib <Reiner.Steib@gmx.de>
6
7 * gnus.texi (MIME Commands): Default of gnus-article-loose-mime is t
8 since 2004-08-06.
9
102007-11-28 Katsumi Yamaoka <yamaoka@jpl.org>
11
12 * gnus.texi (Fancy Mail Splitting): Fix description of splitting based
13 on body.
14
152007-11-27 Katsumi Yamaoka <yamaoka@jpl.org>
16
17 * emacs-mime.texi (rfc2047): Mention rfc2047-encoded-word-regexp-loose
18 and rfc2047-allow-irregular-q-encoded-words; fix description of
19 rfc2047-encode-encoded-words.
20
212007-11-24 Reiner Steib <Reiner.Steib@gmx.de>
22
23 * gnus.texi (Fetching Mail): Remove obsoleted `nnmail-spool-file'.
24
252007-12-05 Michael Olson <mwolson@gnu.org>
26
27 * remember.texi (Diary): Remove "require" line for remember-diary.el.
28 Update documentation for `remember-diary-file'.
29
302007-12-04 Michael Albinus <michael.albinus@gmx.de>
31
32 * dbus.texi (Signals): Precise `dbus-register-signal'.
33 (Errors and Events): Rework events part, the internal structure of
34 dbus-event has changed.
35
362007-12-03 Juanma Barranquero <lekktu@gmail.com>
37
38 * makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add dbus.
39 ($(infodir)/dbus, dbus.dvi): New targets.
40
412007-12-03 Michael Albinus <michael.albinus@gmx.de>
42
43 * Makefile.in (INFO_TARGETS, DVI_TARGETS): Apply dbus and dbus.dvi
44 unconditionally.
45
46 * dbus.texi (Synchronous Methods): Show the result of the "lshal"
47 emulation with @print{}.
48
492007-12-02 Richard Stallman <rms@gnu.org>
50
51 * dbus.texi (Overview): Minor cleanup.
52
532007-12-02 Michael Albinus <michael.albinus@gmx.de>
54
55 * Makefile.in (INFO_TARGETS): Add dbus.
56 (DVI_TARGETS): Add dbus.dvi.
57 (dbus, dbus.dvi): New targets.
58
59 * dbus.texi: New file.
60
612007-11-24 Romain Francoise <romain@orebokech.com>
62
63 * nxml-mode.texi: Add description in @direntry.
64 Fix file name to match @setfilename.
65
662007-11-23 Mark A. Hershberger <mah@everybody.org>
67
68 * Makefile.in (INFO_TARGETS, DVI_TARGETS): Add nxml-mode.
69 ($(infodir)/nxml-mode): New rule.
70
71 * makefile.w32-in (INFO_TARGETS, DVI_TARGETS): Add nxml-mode.
72 ($(infodir)/nxml-mode): New rule.
73 (clean): Add nxml-mode*.
74
75 * nxml-mode.texi: New file with nxml manual.
76
772007-11-18 Richard Stallman <rms@gnu.org>
78
79 * flymake.texi (Example -- Configuring a tool called directly):
80 Update example.
81
822007-11-18 Michael Albinus <michael.albinus@gmx.de>
83
84 * tramp.texi (Filename completion): Simplify explanation of
85 double-slash behaviour. Explain directory contents flushing.
86
872007-11-16 Jay Belanger <jay.p.belanger@gmail.com>
88
89 * calc.texi (TeX and LaTeX Language Modes): Put in
90 missing braces.
91
922007-11-15 Richard Stallman <rms@gnu.org>
93
94 * cl.texi (Equality Predicates): Delete `eql'.
95 (Predicates, Naming Conventions, Top): Delete `eql'.
96 (Common Lisp Compatibility): Delete `eql'.
97 (Porting Common Lisp): Delete obsolete backquote info.
98 Minor clarification about character constants.
99 (Sequence Basics): Minor clarification.
100
1012007-11-15 Juanma Barranquero <lekktu@gmail.com>
102
103 * cc-mode.texi (Electric Keys, Custom Macros):
104 * tramp.texi (Filename completion): Fix typos.
105
1062007-11-15 Jay Belanger <jay.p.belanger@gmail.com>
107
108 * calc.texi (Basic commands): Mention the menu.
109
1102007-11-12 Michael Albinus <michael.albinus@gmx.de>
111
112 * tramp.texi (Connection caching): Tramp flushes connection
113 properties when remote operating system has been changed.
114
12007-11-09 Reiner Steib <Reiner.Steib@gmx.de> 1152007-11-09 Reiner Steib <Reiner.Steib@gmx.de>
2 116
3 * gnus-news.texi: Fix spelling. 117 * gnus-news.texi: Fix spelling.
4 `message-insert-formatted-citation-line', not 118 `message-insert-formatted-citation-line', not
5 `message-insert-formated-citation-line'. 119 `message-insert-formated-citation-line'.
6 120
121 * gnus.texi, gnus-faq.texi, message.texi: Bump version to 5.10.9.
122
72007-11-07 Michael Albinus <michael.albinus@gmx.de> 1232007-11-07 Michael Albinus <michael.albinus@gmx.de>
8 124
9 * tramp.texi (Overview): Mention also the PuTTY integration under 125 * tramp.texi (Overview): Mention also the PuTTY integration under
@@ -41,6 +157,11 @@
41 (Keystrokes): Document C-c C-k. 157 (Keystrokes): Document C-c C-k.
42 (Introduction): Fix typographical issue with "---". 158 (Introduction): Fix typographical issue with "---".
43 159
1602007-10-29 Richard Stallman <rms@gnu.org>
161
162 * widget.texi (Introduction): Delete discussion of implementation
163 internals.
164
442007-10-29 Michael Albinus <michael.albinus@gmx.de> 1652007-10-29 Michael Albinus <michael.albinus@gmx.de>
45 166
46 * tramp.texi (Connection caching): Host names must be different 167 * tramp.texi (Connection caching): Host names must be different
@@ -504,6 +625,14 @@
504 625
505 * gnus.texi (Top): Add SASL. 626 * gnus.texi (Top): Add SASL.
506 627
6282007-10-27 Emanuele Giaquinta <e.giaquinta@glauco.it> (tiny change)
629
630 * gnus-faq.texi ([5.12]): Remove reference to discontinued service.
631
6322007-10-27 Reiner Steib <Reiner.Steib@gmx.de>
633
634 * gnus.texi (Troubleshooting): Adjust Gnus version number.
635
5072007-10-27 Jay Belanger <jay.p.belanger@gmail.com> 6362007-10-27 Jay Belanger <jay.p.belanger@gmail.com>
508 637
509 * calc.texi (Formulas, Composition Basics): Lower the 638 * calc.texi (Formulas, Composition Basics): Lower the
@@ -1621,7 +1750,7 @@
1621 (Custom Filling and Breaking, Custom Braces, Syntactic Symbols) 1750 (Custom Filling and Breaking, Custom Braces, Syntactic Symbols)
1622 (Line-Up Functions, Custom Macros): 1751 (Line-Up Functions, Custom Macros):
1623 * ediff.texi (Window and Frame Configuration) 1752 * ediff.texi (Window and Frame Configuration)
1624 (Highlighting Difference Regions, Highlighting Difference Regions): 1753 (Highlighting Difference Regions):
1625 * emacs-mime.texi (Display Customization): 1754 * emacs-mime.texi (Display Customization):
1626 * erc.texi (History): 1755 * erc.texi (History):
1627 * eshell.texi (Known problems): 1756 * eshell.texi (Known problems):
@@ -1629,7 +1758,7 @@
1629 * gnus.texi (NNTP, IMAP, Advanced Scoring Examples) 1758 * gnus.texi (NNTP, IMAP, Advanced Scoring Examples)
1630 (The problem of spam, SpamOracle, Extending the Spam package) 1759 (The problem of spam, SpamOracle, Extending the Spam package)
1631 (Conformity, Terminology): 1760 (Conformity, Terminology):
1632 * idlwave.texi (Routine Info, Routine Info) 1761 * idlwave.texi (Routine Info)
1633 (Class and Keyword Inheritance, Padding Operators) 1762 (Class and Keyword Inheritance, Padding Operators)
1634 (Breakpoints and Stepping, Electric Debug Mode) 1763 (Breakpoints and Stepping, Electric Debug Mode)
1635 (Examining Variables, Troubleshooting): 1764 (Examining Variables, Troubleshooting):
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 93982f419dc..e8ab579c079 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -44,6 +44,7 @@ INFO_TARGETS = \
44 $(infodir)/calc \ 44 $(infodir)/calc \
45 $(infodir)/ccmode \ 45 $(infodir)/ccmode \
46 $(infodir)/cl \ 46 $(infodir)/cl \
47 $(infodir)/dbus \
47 $(infodir)/dired-x \ 48 $(infodir)/dired-x \
48 $(infodir)/ebrowse \ 49 $(infodir)/ebrowse \
49 $(infodir)/ediff \ 50 $(infodir)/ediff \
@@ -60,6 +61,7 @@ INFO_TARGETS = \
60 $(infodir)/message \ 61 $(infodir)/message \
61 $(infodir)/mh-e \ 62 $(infodir)/mh-e \
62 $(infodir)/newsticker \ 63 $(infodir)/newsticker \
64 $(infodir)/nxml-mode \
63 $(infodir)/org \ 65 $(infodir)/org \
64 $(infodir)/pcl-cvs \ 66 $(infodir)/pcl-cvs \
65 $(infodir)/pgg \ 67 $(infodir)/pgg \
@@ -84,6 +86,7 @@ DVI_TARGETS = \
84 calc.dvi \ 86 calc.dvi \
85 cc-mode.dvi \ 87 cc-mode.dvi \
86 cl.dvi \ 88 cl.dvi \
89 dbus.dvi \
87 dired-x.dvi \ 90 dired-x.dvi \
88 ebrowse.dvi \ 91 ebrowse.dvi \
89 ediff.dvi \ 92 ediff.dvi \
@@ -100,6 +103,7 @@ DVI_TARGETS = \
100 message.dvi \ 103 message.dvi \
101 mh-e.dvi \ 104 mh-e.dvi \
102 newsticker.dvi \ 105 newsticker.dvi \
106 nxml-mode.dvi \
103 org.dvi \ 107 org.dvi \
104 pcl-cvs.dvi \ 108 pcl-cvs.dvi \
105 pgg.dvi \ 109 pgg.dvi \
@@ -173,6 +177,12 @@ $(infodir)/cl: cl.texi
173cl.dvi: cl.texi 177cl.dvi: cl.texi
174 $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi 178 $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
175 179
180dbus : $(infodir)/dbus
181$(infodir)/dbus: dbus.texi
182 cd $(srcdir); $(MAKEINFO) dbus.texi
183dbus.dvi: dbus.texi
184 $(ENVADD) $(TEXI2DVI) ${srcdir}/dbus.texi
185
176dired-x : $(infodir)/dired-x 186dired-x : $(infodir)/dired-x
177$(infodir)/dired-x: dired-x.texi 187$(infodir)/dired-x: dired-x.texi
178 cd $(srcdir); $(MAKEINFO) dired-x.texi 188 cd $(srcdir); $(MAKEINFO) dired-x.texi
@@ -278,6 +288,12 @@ $(infodir)/newsticker: newsticker.texi
278newsticker.dvi: newsticker.texi 288newsticker.dvi: newsticker.texi
279 $(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi 289 $(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi
280 290
291nxml-mode : $(infodir)/nxml-mode
292$(infodir)/nxml-mode: nxml-mode.texi
293 cd $(srcdir); $(MAKEINFO) nxml-mode.texi
294nxml-mode.dvi: nxml-mode.texi
295 $(ENVADD) $(TEXI2DVI) ${srcdir}/nxml-mode.texi
296
281org : $(infodir)/org 297org : $(infodir)/org
282$(infodir)/org: org.texi 298$(infodir)/org: org.texi
283 cd $(srcdir); $(MAKEINFO) org.texi 299 cd $(srcdir); $(MAKEINFO) org.texi
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 2441f0c1166..b8a42f3c746 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -9667,6 +9667,11 @@ is like @kbd{M-x} except that it enters the initial string @samp{calc-}
9667for you. For example, the following key sequences are equivalent: 9667for you. For example, the following key sequences are equivalent:
9668@kbd{S}, @kbd{M-x calc-sin @key{RET}}, @kbd{x sin @key{RET}}. 9668@kbd{S}, @kbd{M-x calc-sin @key{RET}}, @kbd{x sin @key{RET}}.
9669 9669
9670Although Calc is designed to be used from the keyboard, some of
9671Calc's more common commands are available from a menu. In the menu, the
9672arguments to the functions are given by referring to their stack level
9673numbers.
9674
9670@cindex Extensions module 9675@cindex Extensions module
9671@cindex @file{calc-ext} module 9676@cindex @file{calc-ext} module
9672The Calculator exists in many parts. When you type @kbd{C-x * c}, the 9677The Calculator exists in many parts. When you type @kbd{C-x * c}, the
@@ -14001,7 +14006,7 @@ mode may display it differently.
14001Formulas are entered and displayed in the appropriate notation; 14006Formulas are entered and displayed in the appropriate notation;
14002@texline @math{\sin(a/b)} 14007@texline @math{\sin(a/b)}
14003@infoline @expr{sin(a/b)} 14008@infoline @expr{sin(a/b)}
14004will appear as @samp{\sin\left( a \over b \right)} in @TeX{} mode and 14009will appear as @samp{\sin\left( @{a \over b@} \right)} in @TeX{} mode and
14005@samp{\sin\left(\frac@{a@}@{b@}\right)} in La@TeX{} mode. 14010@samp{\sin\left(\frac@{a@}@{b@}\right)} in La@TeX{} mode.
14006Math formulas are often enclosed by @samp{$ $} signs in @TeX{} and 14011Math formulas are often enclosed by @samp{$ $} signs in @TeX{} and
14007La@TeX{}; these should be omitted when interfacing with Calc. To Calc, 14012La@TeX{}; these should be omitted when interfacing with Calc. To Calc,
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index f4d65ed07aa..7c9a2ac1f1b 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -1228,7 +1228,7 @@ reindenting the line. This reindentation saves you from having to
1228reindent a line manually after typing, say, a @samp{@}}. A few 1228reindent a line manually after typing, say, a @samp{@}}. A few
1229keywords, such as @code{else}, also trigger electric action. 1229keywords, such as @code{else}, also trigger electric action.
1230 1230
1231You can inhibit the electric behaviour described here by disabling 1231You can inhibit the electric behavior described here by disabling
1232electric minor mode (@pxref{Minor Modes}). 1232electric minor mode (@pxref{Minor Modes}).
1233 1233
1234Common to all these keys is that they only behave electrically when 1234Common to all these keys is that they only behave electrically when
@@ -1281,7 +1281,7 @@ whitespace before it).
1281Additionally, you can configure @ccmode{} so that typing a slash at 1281Additionally, you can configure @ccmode{} so that typing a slash at
1282the start of a line within a block comment will terminate the 1282the start of a line within a block comment will terminate the
1283comment. You don't need to have electric minor mode enabled to get 1283comment. You don't need to have electric minor mode enabled to get
1284this behaviour. @xref{Clean-ups}. 1284this behavior. @xref{Clean-ups}.
1285 1285
1286In AWK mode, @samp{*} and @samp{/} do not delimit comments and are not 1286In AWK mode, @samp{*} and @samp{/} do not delimit comments and are not
1287electric. 1287electric.
@@ -6458,7 +6458,7 @@ functions to this hook, not remove them. @xref{Style Variables}.
6458@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6458@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6459 6459
6460Normally, the lines in a multi-line macro are indented relative to 6460Normally, the lines in a multi-line macro are indented relative to
6461each other as though they were code. You can suppress this behaviour 6461each other as though they were code. You can suppress this behavior
6462by setting the following user option: 6462by setting the following user option:
6463 6463
6464@defopt c-syntactic-indentation-in-macros 6464@defopt c-syntactic-indentation-in-macros
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index c27021cb325..ea485ef84f8 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -62,14 +62,14 @@ does assume a basic familiarity with Emacs Lisp.
62@menu 62@menu
63* Overview:: Installation, usage, etc. 63* Overview:: Installation, usage, etc.
64* Program Structure:: Arglists, `eval-when', `defalias' 64* Program Structure:: Arglists, `eval-when', `defalias'
65* Predicates:: `typep', `eql', and `equalp' 65* Predicates:: `typep' and `equalp'
66* Control Structure:: `setf', `do', `loop', etc. 66* Control Structure:: `setf', `do', `loop', etc.
67* Macros:: Destructuring, `define-compiler-macro' 67* Macros:: Destructuring, `define-compiler-macro'
68* Declarations:: `proclaim', `declare', etc. 68* Declarations:: `proclaim', `declare', etc.
69* Symbols:: Property lists, `gensym' 69* Symbols:: Property lists, `gensym'
70* Numbers:: Predicates, functions, random numbers 70* Numbers:: Predicates, functions, random numbers
71* Sequences:: Mapping, functions, searching, sorting 71* Sequences:: Mapping, functions, searching, sorting
72* Lists:: `cadr', `sublis', `member*', `assoc*', etc. 72* Lists:: `caddr', `sublis', `member*', `assoc*', etc.
73* Structures:: `defstruct' 73* Structures:: `defstruct'
74* Assertions:: `check-type', `assert', `ignore-errors'. 74* Assertions:: `check-type', `assert', `ignore-errors'.
75 75
@@ -287,7 +287,7 @@ The following simple functions and macros are defined in @file{cl.el};
287they do not cause other components like @file{cl-extra} to be loaded. 287they do not cause other components like @file{cl-extra} to be loaded.
288 288
289@example 289@example
290eql floatp-safe endp 290floatp-safe endp
291evenp oddp plusp minusp 291evenp oddp plusp minusp
292caaar .. cddddr 292caaar .. cddddr
293list* ldiff rest first .. tenth 293list* ldiff rest first .. tenth
@@ -700,7 +700,7 @@ facts are true or false.
700 700
701@menu 701@menu
702* Type Predicates:: `typep', `deftype', and `coerce' 702* Type Predicates:: `typep', `deftype', and `coerce'
703* Equality Predicates:: `eql' and `equalp' 703* Equality Predicates:: `equalp'
704@end menu 704@end menu
705 705
706@node Type Predicates, Equality Predicates, Predicates, Predicates 706@node Type Predicates, Equality Predicates, Predicates, Predicates
@@ -840,40 +840,7 @@ arguments to specify the type of sequence to return. @xref{Sequences}.
840@section Equality Predicates 840@section Equality Predicates
841 841
842@noindent 842@noindent
843This package defines two Common Lisp predicates, @code{eql} and 843This package defines the Common Lisp predicate @code{equalp}.
844@code{equalp}.
845
846@defun eql a b
847This function is almost the same as @code{eq}, except that if @var{a}
848and @var{b} are numbers of the same type, it compares them for numeric
849equality (as if by @code{equal} instead of @code{eq}). This makes a
850difference only for versions of Emacs that are compiled with
851floating-point support. Emacs floats are allocated
852objects just like cons cells, which means that @code{(eq 3.0 3.0)}
853will not necessarily be true---if the two @code{3.0}s were allocated
854separately, the pointers will be different even though the numbers are
855the same. But @code{(eql 3.0 3.0)} will always be true.
856
857The types of the arguments must match, so @code{(eql 3 3.0)} is
858still false.
859
860Note that Emacs integers are ``direct'' rather than allocated, which
861basically means @code{(eq 3 3)} will always be true. Thus @code{eq}
862and @code{eql} behave differently only if floating-point numbers are
863involved, and are indistinguishable on Emacs versions that don't
864support floats.
865
866There is a slight inconsistency with Common Lisp in the treatment of
867positive and negative zeros. Some machines, notably those with IEEE
868standard arithmetic, represent @code{+0} and @code{-0} as distinct
869values. Normally this doesn't matter because the standard specifies
870that @code{(= 0.0 -0.0)} should always be true, and this is indeed
871what Emacs Lisp and Common Lisp do. But the Common Lisp standard
872states that @code{(eql 0.0 -0.0)} and @code{(equal 0.0 -0.0)} should
873be false on IEEE-like machines; Emacs Lisp does not do this, and in
874fact the only known way to distinguish between the two zeros in Emacs
875Lisp is to @code{format} them and check for a minus sign.
876@end defun
877 844
878@defun equalp a b 845@defun equalp a b
879This function is a more flexible version of @code{equal}. In 846This function is a more flexible version of @code{equal}. In
@@ -3685,7 +3652,7 @@ the same sequence, in the same order as they appear in that sequence.)
3685The @code{:test} argument specifies a function which must return 3652The @code{:test} argument specifies a function which must return
3686true (non-@code{nil}) to indicate a match; instead, you may use 3653true (non-@code{nil}) to indicate a match; instead, you may use
3687@code{:test-not} to give a function which returns @emph{false} to 3654@code{:test-not} to give a function which returns @emph{false} to
3688indicate a match. The default test function is @code{:test 'eql}. 3655indicate a match. The default test function is @code{eql}.
3689 3656
3690Many functions which take @var{item} and @code{:test} or @code{:test-not} 3657Many functions which take @var{item} and @code{:test} or @code{:test-not}
3691arguments also come in @code{-if} and @code{-if-not} varieties, 3658arguments also come in @code{-if} and @code{-if-not} varieties,
@@ -4998,7 +4965,7 @@ which understand full-featured argument lists. The @code{&whole}
4998keyword does not work in @code{defmacro} argument lists (except 4965keyword does not work in @code{defmacro} argument lists (except
4999inside recursive argument lists). 4966inside recursive argument lists).
5000 4967
5001The @code{eql} and @code{equal} predicates do not distinguish 4968The @code{equal} predicate does not distinguish
5002between IEEE floating-point plus and minus zero. The @code{equalp} 4969between IEEE floating-point plus and minus zero. The @code{equalp}
5003predicate has several differences with Common Lisp; @pxref{Predicates}. 4970predicate has several differences with Common Lisp; @pxref{Predicates}.
5004 4971
@@ -5218,12 +5185,6 @@ whereas Emacs Lisp's parser just treats quote as a special case.
5218Some Lisp packages use reader macros to create special syntaxes 5185Some Lisp packages use reader macros to create special syntaxes
5219for themselves, which the Emacs parser is incapable of reading. 5186for themselves, which the Emacs parser is incapable of reading.
5220 5187
5221The lack of reader macros, incidentally, is the reason behind
5222Emacs Lisp's unusual backquote syntax. Since backquotes are
5223implemented as a Lisp package and not built-in to the Emacs
5224parser, they are forced to use a regular macro named @code{`}
5225which is used with the standard function/macro call notation.
5226
5227@item 5188@item
5228Other syntactic features. Common Lisp provides a number of 5189Other syntactic features. Common Lisp provides a number of
5229notations beginning with @code{#} that the Emacs Lisp parser 5190notations beginning with @code{#} that the Emacs Lisp parser
@@ -5287,11 +5248,11 @@ matters, Emacs has its own @code{#(} notation for
5287something entirely different---strings with properties. 5248something entirely different---strings with properties.
5288 5249
5289@item 5250@item
5290Characters are distinct from integers in Common Lisp. The 5251Characters are distinct from integers in Common Lisp. The notation
5291notation for character constants is also different: @code{#\A} 5252for character constants is also different: @code{#\A} in Common Lisp
5292instead of @code{?A}. Also, @code{string=} and @code{string-equal} 5253where Emacs Lisp uses @code{?A}. Also, @code{string=} and
5293are synonyms in Emacs Lisp whereas the latter is case-insensitive 5254@code{string-equal} are synonyms in Emacs Lisp, whereas the latter is
5294in Common Lisp. 5255case-insensitive in Common Lisp.
5295 5256
5296@item 5257@item
5297Data types. Some Common Lisp data types do not exist in Emacs 5258Data types. Some Common Lisp data types do not exist in Emacs
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
new file mode 100644
index 00000000000..14ceea37d1d
--- /dev/null
+++ b/doc/misc/dbus.texi
@@ -0,0 +1,564 @@
1\input texinfo @c -*-texinfo-*-
2@setfilename ../../info/dbus
3@c %**start of header
4@settitle Using of D-Bus
5@c @setchapternewpage odd
6@c %**end of header
7
8@copying
9Copyright @copyright{} 2007 Free Software Foundation, Inc.
10
11@quotation
12Permission is granted to copy, distribute and/or modify this document
13under the terms of the GNU Free Documentation License, Version 1.2 or
14any later version published by the Free Software Foundation; with no
15Invariant Sections, with the Front-Cover texts being ``A GNU
16Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
17license is included in the section entitled ``GNU Free Documentation
18License'' in the Emacs manual.
19
20(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
21this GNU Manual, like GNU software. Copies published by the Free
22Software Foundation raise funds for GNU development.''
23
24This document is part of a collection distributed under the GNU Free
25Documentation License. If you want to distribute this document
26separately from the collection, you can do so by adding a copy of the
27license to the document, as described in section 6 of the license.
28@end quotation
29@end copying
30
31@dircategory Emacs
32@direntry
33* D-Bus: (dbus). Using D-Bus in Emacs.
34@end direntry
35
36@node Top, Overview, (dir), (dir)
37@top D-Bus integration in Emacs
38
39This manual documents an API for usage of D-Bus in
40Emacs.@footnote{D-Bus is not enabled by default. You must run
41@command{./configure --with-dbus} in Emacs' top level directory,
42before you compile Emacs.} D-Bus is a message bus system, a simple
43way for applications to talk to one another. An overview of D-Bus can
44be found at @uref{http://dbus.freedesktop.org/}.
45
46@insertcopying
47
48@menu
49* Overview:: An overview of D-Bus.
50* Inspection:: Inspection of the bus names.
51* Type Conversion:: Mapping Lisp types and D-Bus types.
52* Synchronous Methods:: Calling methods in a blocking way.
53* Signals:: Sending and receiving signals.
54* Errors and Events:: Errors and events.
55* GNU Free Documentation License:: The license for this documentation.
56@end menu
57
58@node Overview
59@chapter An overview of D-Bus
60@cindex overview
61
62D-Bus is an inter-process communication mechanism for applications
63residing on the same host. The communication is based on
64@dfn{messages}. Data in the messages is carried in a structured way,
65it is not just a byte stream.
66
67The communication is connection oriented to two kinds of message
68buses: a so called @dfn{system bus}, and a @dfn{session bus}. On a
69given machine, there is always one single system bus for miscellaneous
70system-wide communication, like changing of hardware configuration.
71On the other hand, the session bus is always related to a single
72user's session.
73
74Every client application, which is connected to a bus, registers under
75a @dfn{unique name} at the bus. This name is used for identifying the
76client application. Such a unique name starts always with a colon,
77and looks like @samp{:1.42}.
78
79Additionally, a client application can register itself to a so called
80@dfn{known name}, which is a series of identifiers separated by dots,
81as in @samp{org.gnu.Emacs}. If several applications register to the
82same known name, these registrations are queued, and only the first
83application which has registered for the known name is reachable via
84this name. If this application disconnects from the bus, the next
85queued unique name becomes the owner of this known name.
86
87An application can install one or several objects under its name.
88Such objects are identified by an @dfn{object path}, which looks
89similar to paths in a filesystem. An example of such an object path
90could be @samp{/org/gnu/Emacs/}.
91
92Applications might send a request to an object, that means sending a
93message with some data as input parameters, and receiving a message
94from that object with the result of this message, the output
95parameters. Such a request is called @dfn{method} in D-Bus.
96
97The other form of communication are @dfn{signals}. The underlying
98message is emitted from an object and will be received by all other
99applications which have registered for such a signal.
100
101All methods and signals an object supports are called @dfn{interface}
102of the object. Interfaces are specified under a hierarchical name in
103D-Bus; an object can support several interfaces. Such an interface
104name could be @samp{org.gnu.Emacs.TextEditor} or
105@samp{org.gnu.Emacs.FileManager}.
106
107
108@node Inspection
109@chapter Inspection of the bus names.
110@cindex inspection
111
112There are several basic functions which inspect the buses for
113registered names. Internally they use the basic interface
114@samp{org.freedesktop.DBus}, which is supported by all objects of a bus.
115
116@defun dbus-list-activatable-names
117This function returns the D-Bus service names, which can be activated.
118An activatable service is described in a service registration file.
119Under GNU/Linux, such files are located at
120@file{/usr/share/dbus-1/services/}.
121
122The result is a list of strings, which is @code{nil} when there are no
123activatable service names at all.
124@end defun
125
126@defun dbus-list-names bus
127All service names, which are registered at D-Bus @var{bus}, are
128returned. The result is a list of strings, which is @code{nil} when
129there are no registered service names at all. Well known names are
130strings like @samp{org.freedesktop.DBus}. Names starting with
131@samp{:} are unique names for services.
132
133@var{bus} must be either the symbol @code{:system} or the symbol
134@code{:session}.
135@end defun
136
137@defun dbus-list-known-names bus
138Retrieves all services which correspond to a known name in @var{bus}.
139A service has a known name if it doesn't start with @samp{:}. The
140result is a list of strings, which is @code{nil} when there are no
141known names at all.
142
143@var{bus} must be either the symbol @code{:system} or the symbol
144@code{:session}.
145@end defun
146
147@defun dbus-list-queued-owners bus service
148For a given service, registered at D-Bus @var{bus} under the name
149@var{service}, all queued unique names are returned. The result is a
150list of strings, or @code{nil} when there are no queued names for
151@var{service} at all.
152
153@var{bus} must be either the symbol @code{:system} or the symbol
154@code{:session}. @var{service} must be a known service name as
155string.
156@end defun
157
158@defun dbus-get-name-owner bus service
159For a given service, registered at D-Bus @var{bus} under the name
160@var{service}, the unique name of the name owner is returned. The result is a
161string, or @code{nil} when there exist no name owner of @var{service}.
162
163@var{bus} must be either the symbol @code{:system} or the symbol
164@code{:session}. @var{service} must be a known service name as
165string.
166@end defun
167
168@defun dbus-get-unique-name bus
169The unique name, under which Emacs is registered at D-Bus @var{bus},
170is returned as string.
171
172@var{bus} must be either the symbol @code{:system} or the symbol
173@code{:session}.
174@end defun
175
176@defun dbus-introspect bus service path
177Objects can publish there interfaces to the D-Bus. This function
178returns all interfaces of @var{service}, registered at object path
179@var{path} at bus @var{bus}.
180
181@var{bus} must be either the symbol @code{:system} or the symbol
182@code{:session}. @var{service} must be a known service name, and
183@var{path} must be a valid object path. The last two parameters are
184strings. The result, the introspection data, is a string in XML
185format. Example:
186
187@example
188(dbus-introspect
189 :system "org.freedesktop.Hal"
190 "/org/freedesktop/Hal/devices/computer")
191
192@result{} "<!DOCTYPE node PUBLIC
193 \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"
194 \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">
195 <node>
196 <interface name=\"org.freedesktop.Hal.Device\">
197 <method name=\"GetAllProperties\">
198 <arg name=\"properties\" direction=\"out\" type=\"a@{sv@}\"/>
199 </method>
200 ...
201 <signal name=\"PropertyModified\">
202 <arg name=\"num_updates\" type=\"i\"/>
203 <arg name=\"updates\" type=\"a(sbb)\"/>
204 </signal>
205 </interface>
206 ...
207 </node>"
208@end example
209
210This example informs us, that the service @code{org.freedesktop.Hal}
211at object path @code{/org/freedesktop/Hal/devices/computer} offers the
212interface @code{org.freedesktop.Hal.Device} (and 2 other interfaces
213not documented here). This interface contains the method
214@code{GetAllProperties}, which needs no input parameters, but returns
215as output parameter an array of dictionary entries (key-value pairs).
216Every dictionary entry has a string as key, and a variant as value.
217
218The interface offers also a signal, which returns 2 parameters: an
219integer, and an array consisting of elements which are a struct of a
220string and 2 boolean values.
221
222Such type descriptions are called @dfn{signature} in D-Bus. For a
223discussion of D-Bus types and their Lisp representation see @ref{Type
224Conversion}.@footnote{D-Bus signatures are explained in the D-Bus
225specification
226@uref{http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures}.
227The interfaces of the service @code{org.freedesktop.Hal} are described
228at
229@uref{http://people.freedesktop.org/~david/hal-spec/hal-spec.html#interfaces}.}
230@end defun
231
232
233@node Type Conversion
234@chapter Mapping Lisp types and D-Bus types.
235@cindex type conversion
236
237D-Bus method calls and signals accept usually several arguments as
238parameters, either as input parameter, or as output parameter. Every
239argument belongs to a D-Bus type.
240
241Such arguments must be mapped between the the value encoded as a D-Bus
242type, and the corresponding type of Lisp objects. The mapping is
243applied Lisp object @expansion{} D-Bus type for input parameters, and
244D-Bus type @expansion{} Lisp object for output parameters.
245
246
247@section Input parameters.
248
249Input parameters for D-Bus methods and signals occur as arguments of a
250Lisp function call. Only some primitive Lisp types are supported in
251the current implementation. The following mapping to D-Bus types is
252applied, when the corresponding D-Bus message is created:
253
254@example
255@multitable {@code{t} and @code{nil}} {@expansion{}} {DBUS_TYPE_BOOLEAN}
256@item Lisp type @tab @tab D-Bus type
257@item
258@item @code{t} and @code{nil} @tab @expansion{} @tab DBUS_TYPE_BOOLEAN
259@item number @tab @expansion{} @tab DBUS_TYPE_UINT32
260@item integer @tab @expansion{} @tab DBUS_TYPE_INT32
261@item float @tab @expansion{} @tab DBUS_TYPE_DOUBLE
262@item string @tab @expansion{} @tab DBUS_TYPE_STRING
263@end multitable
264@end example
265
266@noindent
267Other Lisp types, especially lists, are not supported (yet).
268
269
270@section Output parameters.
271
272Output parameters of D-Bus methods and signals are mapped to Lisp
273objects. This mapping is more powerful than the one for input
274parameters, i.e., more D-Bus types are supported by the current
275implementation.
276
277@example
278@multitable {DBUS_TYPE_OBJECT_PATH} {@expansion{}} {@code{t} or @code{nil}}
279@item D-Bus type @tab @tab Lisp type
280@item
281@item DBUS_TYPE_BOOLEAN @tab @expansion{} @tab @code{t} or @code{nil}
282@item DBUS_TYPE_UINT32 @tab @expansion{} @tab number
283@item DBUS_TYPE_INT32 @tab @expansion{} @tab number
284@item DBUS_TYPE_DOUBLE @tab @expansion{} @tab float
285@item DBUS_TYPE_STRING @tab @expansion{} @tab string
286@item DBUS_TYPE_OBJECT_PATH @tab @expansion{} @tab string
287@item DBUS_TYPE_ARRAY @tab @expansion{} @tab list
288@item DBUS_TYPE_VARIANT @tab @expansion{} @tab list
289@item DBUS_TYPE_STRUCT @tab @expansion{} @tab list
290@item DBUS_TYPE_DICT_ENTRY @tab @expansion{} @tab list
291@end multitable
292@end example
293
294The resulting list of the last 4 D-Bus compound types contains as
295elements the elements of the D-Bus container, mapped according to the
296same rules.
297
298The signal @code{PropertyModified}, discussed as example in
299@ref{Inspection}, would offer as Lisp data the following object
300(@var{BOOL} stands here for either @code{nil} or @code{t}):
301
302@lisp
303(@var{NUMBER} ((@var{STRING} @var{BOOL} @var{BOOL}) (@var{STRING} @var{BOOL} @var{BOOL}) ...))
304@end lisp
305
306
307@node Synchronous Methods
308@chapter Calling methods in a blocking way.
309@cindex method calls, synchronous
310@cindex synchronous method calls
311
312Methods can be called synchronously (@dfn{blocking}) or asynchronously
313(@dfn{non-blocking}). Currently, just synchronous methods are
314implemented.
315
316At D-Bus level, a method call consist of two messages: one message
317which carries the input parameters to the object owning the method to
318be called, and a reply message returning the resulting output
319parameters from the object.
320
321@defun dbus-call-method bus method service path interface &rest args
322This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is
323either the symbol @code{:system} or the symbol @code{:session}.
324
325@var{service} is the D-Bus service name to be used. @var{path} is the
326D-Bus object path, @var{service} is registered at. @var{interface} is
327an interface offered by @var{service}. It must provide @var{method}.
328
329All other arguments args are passed to @var{method} as arguments.
330They are converted into D-Bus types as described in @ref{Type
331Conversion}.
332
333The function returns the resulting values of @var{method} as a list of
334Lisp objects, according to the type conversion rules described in
335@ref{Type Conversion}. Example:
336
337@example
338(dbus-call-method
339 :session "GetKeyField" "org.gnome.seahorse"
340 "/org/gnome/seahorse/keys/openpgp" "org.gnome.seahorse.Keys"
341 "openpgp:657984B8C7A966DD" "simple-name")
342
343@result{} (t ("Philip R. Zimmermann"))
344@end example
345
346If the result of the method call is just one value, the converted Lisp
347object is returned instead of a list containing this single Lisp
348object. Example:
349
350@example
351(dbus-call-method
352 :system "GetPropertyString" "org.freedesktop.Hal"
353 "/org/freedesktop/Hal/devices/computer" "org.freedesktop.Hal.Device"
354 "system.kernel.machine")
355
356@result{} "i686"
357@end example
358
359With the @code{dbus-introspect} function it is possible to explore the
360interfaces of @samp{org.freedesktop.Hal} service. It offers the
361interfaces @samp{org.freedesktop.Hal.Manager} for the object at the
362path @samp{/org/freedesktop/Hal/Manager} as well as the interface
363@samp{org.freedesktop.Hal.Device} for all objects prefixed with the
364path @samp{/org/freedesktop/Hal/devices}. With the methods
365@samp{GetAllDevices} and @samp{GetAllProperties}, it is simple to
366emulate the @code{lshal} command on GNU/Linux systems:
367
368@example
369(dolist (device
370 (dbus-call-method
371 :system "GetAllDevices" "org.freedesktop.Hal"
372 "/org/freedesktop/Hal/Manager"
373 "org.freedesktop.Hal.Manager"))
374 (message "\nudi = %s" device)
375 (dolist (properties
376 (dbus-call-method
377 :system "GetAllProperties" "org.freedesktop.Hal"
378 device "org.freedesktop.Hal.Device"))
379 (message " %s = %S"
380 (car properties) (or (caar (cdr properties)) ""))))
381
382@print{} "udi = /org/freedesktop/Hal/devices/computer
383 info.addons = (\"hald-addon-acpi\")
384 info.bus = \"unknown\"
385 info.product = \"Computer\"
386 info.subsystem = \"unknown\"
387 info.udi = \"/org/freedesktop/Hal/devices/computer\"
388 linux.sysfs_path_device = \"(none)\"
389 power_management.acpi.linux.version = \"20051216\"
390 power_management.can_suspend_to_disk = t
391 power_management.can_suspend_to_ram = \"\"
392 power_management.type = \"acpi\"
393 smbios.bios.release_date = \"11/07/2001\"
394 system.chassis.manufacturer = \"COMPAL\"
395 system.chassis.type = \"Notebook\"
396 system.firmware.release_date = \"03/19/2005\"
397 ..."
398@end example
399@end defun
400
401
402@node Signals
403@chapter Sending and receiving signals.
404@cindex signals
405
406Signals are broadcast messages. They carry input parameters, which
407are received by all objects which have registered for such a signal.
408
409@defun dbus-send-signal bus signal service path interface &rest args
410This function is similar to @code{dbus-call-method}. The difference
411is, that there are no returning output parameters.
412
413The function emits @var{signal} on the D-Bus @var{bus}. @var{bus} is
414either the symbol @code{:system} or the symbol @code{:session}. It
415doesn't matter whether another object has registered for @var{signal}.
416
417@var{service} is the D-Bus service name of the object the signal is
418emitted from. @var{path} is the corresponding D-Bus object path,
419@var{service} is registered at. @var{interface} is an interface
420offered by @var{service}. It must provide @var{signal}.
421
422All other arguments args are passed to @var{signal} as arguments.
423They are converted into D-Bus types as described in @ref{Type
424Conversion}. Example:
425
426@example
427(dbus-send-signal
428 :session "FileModified" "org.gnu.Emacs" "/org/gnu/Emacs"
429 "org.gnu.Emacs.FileManager" "/home/albinus/.emacs")
430@end example
431@end defun
432
433@defun dbus-register-signal bus signal service path interface handler
434With this function, an application registers for @var{signal} on the
435D-Bus @var{bus}.
436
437@var{bus} is either the symbol @code{:system} or the symbol
438@code{:session}.
439
440@var{service} is the D-Bus service name used by the sending D-Bus
441object. It can be either a known name or the unique name of the D-Bus
442object sending the signal. In case of a unique name, signals won't be
443received any longer once the object owning this unique name has
444disappeared, and a new queued object has replaced it.
445
446When @var{service} is @code{nil}, related signals from all D-Bus
447objects shall be accepted.
448
449@var{path} is the corresponding D-Bus object path, @var{service} is
450registered at. It can also be @code{nil} if the path name of incoming
451signals shall not be checked.
452
453@var{interface} is an interface offered by @var{service}. It must
454provide @var{signal}.
455
456@var{handler} is a Lisp function to be called when the @var{signal} is
457received. It must accept as arguments the output parameters
458@var{signal} is sending. Example:
459
460@example
461(defun my-dbus-signal-handler (device)
462 (message "Device %s added" device))
463
464(dbus-register-signal
465 :system "DeviceAdded"
466 (dbus-get-name-owner :system "org.freedesktop.Hal")
467 "/org/freedesktop/Hal/Manager" "org.freedesktop.Hal.Manager"
468 'my-dbus-signal-handler)
469
470@result{} (:system "org.freedesktop.Hal.Manager" "DeviceAdded")
471@end example
472
473As we know from the inspection data of interface
474@code{org.freedesktop.Hal.Manager}, the signal @code{DeviceAdded}
475provides one single parameter, which is mapped into a Lisp string.
476The callback function @code{my-dbus-signal-handler} must define one
477single string argument therefore. Plugging an USB device to your
478machine, when registered for signal @code{DeviceAdded}, will show you
479which objects the GNU/Linux @code{hal} daemon adds.
480
481@code{dbus-register-signal} returns a Lisp symbol, which can be used
482as argument in @code{dbus-unregister-signal} for removing the
483registration for @var{signal}.
484@end defun
485
486@defun dbus-unregister-signal object
487Unregister @var{object} from the the D-Bus. @var{object} must be the
488result of a preceding @code{dbus-register-signal} call.
489@end defun
490
491
492@node Errors and Events
493@chapter Errors and events.
494@cindex errors
495@cindex events
496
497All errors raised by D-Bus are signaled with the error symbol
498@code{dbus-error}. As usual, such an error can be trapped with a
499@code{condition-case} form. If possible, error messages from D-Bus
500are appended to the @code{dbus-error}.
501
502Incoming D-Bus messages are handled as Emacs events (see @pxref{Misc
503Events, , , elisp}). The generated event has this form:
504
505@example
506(dbus-event @var{handler} @var{bus} @var{service} @var{path} @var{interface} @var{member} &rest @var{args})
507@end example
508
509@var{handler} is the callback function which has been registered for
510this signal (see @pxref{Signals}). When a @code{dbus-event} event
511arrives, @var{handler} is called with @var{args} as arguments.
512
513@var{bus} identifies the D-Bus the signal is coming from. It is
514either the symbol @code{:system} or the symbol @code{:session}.
515
516@var{service} and @var{path} are the unique name and the object path
517of the D-Bus object emitting the signal. @var{interface} and
518@var{member} denote the signal which has been sent.
519
520In order to inspect the @code{dbus-event} data, you could extend the
521definition of the callback function in @ref{Signals}:
522
523@example
524(defun my-dbus-signal-handler (&rest args)
525 (message "my-dbus-signal-handler: %S" last-input-event))
526@end example
527
528There exist convenience functions which could be called inside a
529callback function in order to retrieve the information from the event.
530
531@defun dbus-event-bus-name event
532Returns the bus name @var{event} is coming from.
533The result is either the symbol @code{:system} or the symbol @code{:session}.
534@end defun
535
536@defun dbus-event-service-name event
537Returns the unique name of the D-Bus object @var{event} is coming from.
538@end defun
539
540@defun dbus-event-path-name event
541Returns the object path of the D-Bus object @var{event} is coming from.
542@end defun
543
544@defun dbus-event-interface-name event
545Returns the interface name of of the D-Bus object @var{event} is coming from.
546@end defun
547
548@defun dbus-event-member-name event
549Returns the member name of of the D-Bus object @var{event} is coming
550from. It is either a signal name or a method name.
551@end defun
552
553
554@node GNU Free Documentation License
555@appendix GNU Free Documentation License
556@include doclicense.texi
557
558@contents
559@c End of dbus.texi
560@bye
561
562@ignore
563 arch-tag: 2eeec19d-0caf-44e0-a193-329d7f9951d8
564@end ignore
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index d4cbf8380b6..f8be71ef860 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -1417,10 +1417,23 @@ This is an alist of encoding / function pairs. The encodings are
1417@vindex rfc2047-encoded-word-regexp 1417@vindex rfc2047-encoded-word-regexp
1418When decoding words, this library looks for matches to this regexp. 1418When decoding words, this library looks for matches to this regexp.
1419 1419
1420@item rfc2047-encoded-word-regexp-loose
1421@vindex rfc2047-encoded-word-regexp-loose
1422This is a version from which the regexp for the Q encoding pattern of
1423@code{rfc2047-encoded-word-regexp} is made loose.
1424
1420@item rfc2047-encode-encoded-words 1425@item rfc2047-encode-encoded-words
1421@vindex rfc2047-encode-encoded-words 1426@vindex rfc2047-encode-encoded-words
1422The boolean variable specifies whether encoded words 1427The boolean variable specifies whether encoded words
1423(e.g. @samp{=?hello?=}) should be encoded again. 1428(e.g. @samp{=?us-ascii?q?hello?=}) should be encoded again.
1429@code{rfc2047-encoded-word-regexp} is used to look for such words.
1430
1431@item rfc2047-allow-irregular-q-encoded-words
1432@vindex rfc2047-allow-irregular-q-encoded-words
1433The boolean variable specifies whether irregular Q encoded words
1434(e.g. @samp{=?us-ascii?q?hello??=}) should be decoded. If it is
1435non-@code{nil}, @code{rfc2047-encoded-word-regexp-loose} is used instead
1436of @code{rfc2047-encoded-word-regexp} to look for encoded words.
1424 1437
1425@end table 1438@end table
1426 1439
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 491ee631fe7..6ab4c199de6 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -413,12 +413,9 @@ First, we write the @code{init-function}:
413(defun flymake-perl-init () 413(defun flymake-perl-init ()
414 (let* ((temp-file (flymake-init-create-temp-buffer-copy 414 (let* ((temp-file (flymake-init-create-temp-buffer-copy
415 'flymake-create-temp-inplace)) 415 'flymake-create-temp-inplace))
416 (local-file (concat (flymake-build-relative-filename 416 (local-file (file-relative-name
417 (file-name-directory 417 temp-file
418 (buffer-file-name 418 (file-name-directory buffer-file-name))))
419 (current-buffer)))
420 (file-name-directory temp-file))
421 (file-name-nondirectory temp-file))))
422 (list "perl" (list "-wc " local-file)))) 419 (list "perl" (list "-wc " local-file))))
423@end lisp 420@end lisp
424 421
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 97e70c1cec2..8ec39ce81fe 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -8175,6 +8175,11 @@ Save the current series
8175@findex gnus-uu-decode-binhex 8175@findex gnus-uu-decode-binhex
8176Unbinhex the current series (@code{gnus-uu-decode-binhex}). This 8176Unbinhex the current series (@code{gnus-uu-decode-binhex}). This
8177doesn't really work yet. 8177doesn't really work yet.
8178
8179@item X Y
8180@kindex X Y (Summary)
8181@findex gnus-uu-decode-yenc
8182yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
8178@end table 8183@end table
8179 8184
8180 8185
@@ -9740,7 +9745,7 @@ To have all Vcards be ignored, you'd say something like this:
9740If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header 9745If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9741before interpreting the message as a @acronym{MIME} message. This helps 9746before interpreting the message as a @acronym{MIME} message. This helps
9742when reading messages from certain broken mail user agents. The 9747when reading messages from certain broken mail user agents. The
9743default is @code{nil}. 9748default is @code{t}.
9744 9749
9745@item gnus-article-emulate-mime 9750@item gnus-article-emulate-mime
9746@vindex gnus-article-emulate-mime 9751@vindex gnus-article-emulate-mime
@@ -14649,14 +14654,12 @@ If non-@code{nil}, name of program for fetching new mail. If
14649@subsubsection Fetching Mail 14654@subsubsection Fetching Mail
14650 14655
14651@vindex mail-sources 14656@vindex mail-sources
14652@vindex nnmail-spool-file
14653The way to actually tell Gnus where to get new mail from is to set 14657The way to actually tell Gnus where to get new mail from is to set
14654@code{mail-sources} to a list of mail source specifiers 14658@code{mail-sources} to a list of mail source specifiers
14655(@pxref{Mail Source Specifiers}). 14659(@pxref{Mail Source Specifiers}).
14656 14660
14657If this variable (and the obsolescent @code{nnmail-spool-file}) is 14661If this variable is @code{nil}, the mail back ends will never attempt to
14658@code{nil}, the mail back ends will never attempt to fetch mail by 14662fetch mail by themselves.
14659themselves.
14660 14663
14661If you want to fetch mail both from your local spool as well as a 14664If you want to fetch mail both from your local spool as well as a
14662@acronym{POP} mail server, you'd say something like: 14665@acronym{POP} mail server, you'd say something like:
@@ -14865,10 +14868,10 @@ body of the messages:
14865 "string.group")))) 14868 "string.group"))))
14866@end lisp 14869@end lisp
14867 14870
14868The buffer is narrowed to the message in question when @var{function} 14871The buffer is narrowed to the header of the message in question when
14869is run. That's why @code{(widen)} needs to be called after 14872@var{function} is run. That's why @code{(widen)} needs to be called
14870@code{save-excursion} and @code{save-restriction} in the example 14873after @code{save-excursion} and @code{save-restriction} in the example
14871above. Also note that with the nnimap back end, message bodies will 14874above. Also note that with the nnimap backend, message bodies will
14872not be downloaded by default. You need to set 14875not be downloaded by default. You need to set
14873@code{nnimap-split-download-body} to @code{t} to do that 14876@code{nnimap-split-download-body} to @code{t} to do that
14874(@pxref{Splitting in IMAP}). 14877(@pxref{Splitting in IMAP}).
diff --git a/doc/misc/makefile.w32-in b/doc/misc/makefile.w32-in
index 4d8d44765d4..a676da55e26 100644
--- a/doc/misc/makefile.w32-in
+++ b/doc/misc/makefile.w32-in
@@ -31,27 +31,27 @@ infodir = $(srcdir)/../../info
31MAKEINFO = makeinfo --force 31MAKEINFO = makeinfo --force
32MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat 32MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
33INFO_TARGETS = $(infodir)/ccmode \ 33INFO_TARGETS = $(infodir)/ccmode \
34 $(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \ 34 $(infodir)/cl $(infodir)/dbus $(infodir)/dired-x \
35 $(infodir)/forms $(infodir)/gnus $(infodir)/message \ 35 $(infodir)/ediff $(infodir)/forms $(infodir)/gnus \
36 $(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \ 36 $(infodir)/message $(infodir)/sieve $(infodir)/pgg \
37 $(infodir)/info $(infodir)/mh-e $(infodir)/reftex \ 37 $(infodir)/emacs-mime $(infodir)/info $(infodir)/mh-e \
38 $(infodir)/sc $(infodir)/vip $(infodir)/viper \ 38 $(infodir)/reftex $(infodir)/sc $(infodir)/vip \
39 $(infodir)/widget $(infodir)/efaq $(infodir)/ada-mode \ 39 $(infodir)/viper $(infodir)/widget $(infodir)/efaq \
40 $(infodir)/autotype $(infodir)/calc $(infodir)/idlwave \ 40 $(infodir)/ada-mode $(infodir)/autotype $(infodir)/calc \
41 $(infodir)/eudc $(infodir)/ebrowse $(infodir)/pcl-cvs \ 41 $(infodir)/idlwave $(infodir)/eudc $(infodir)/ebrowse \
42 $(infodir)/woman $(infodir)/eshell $(infodir)/org \ 42 $(infodir)/pcl-cvs $(infodir)/woman $(infodir)/eshell \
43 $(infodir)/url $(infodir)/speedbar $(infodir)/tramp \ 43 $(infodir)/org $(infodir)/url $(infodir)/speedbar \
44 $(infodir)/ses $(infodir)/smtpmail $(infodir)/flymake \ 44 $(infodir)/tramp $(infodir)/ses $(infodir)/smtpmail \
45 $(infodir)/newsticker $(infodir)/rcirc $(infodir)/erc \ 45 $(infodir)/flymake $(infodir)/newsticker $(infodir)/rcirc \
46 $(infodir)/remember 46 $(infodir)/erc $(infodir)/remember $(infodir)/nxml-mode
47DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \ 47DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dbus.dvi dired-x.dvi \
48 ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \ 48 ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
49 gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \ 49 gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \
50 reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \ 50 reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
51 ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \ 51 ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
52 pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \ 52 pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \
53 speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \ 53 speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \
54 newsticker.dvi rcirc.dvi erc.dvi remember.dvi 54 newsticker.dvi rcirc.dvi erc.dvi remember.dvi nxml-mode.dvi
55INFOSOURCES = info.texi 55INFOSOURCES = info.texi
56 56
57# The following rule does not work with all versions of `make'. 57# The following rule does not work with all versions of `make'.
@@ -114,6 +114,11 @@ $(infodir)/cl: cl.texi
114cl.dvi: cl.texi 114cl.dvi: cl.texi
115 $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi 115 $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
116 116
117$(infodir)/dbus: dbus.texi
118 $(MAKEINFO) dbus.texi
119dbus.dvi: dbus.texi
120 $(ENVADD) $(TEXI2DVI) $(srcdir)/dbus.texi
121
117$(infodir)/dired-x: dired-x.texi 122$(infodir)/dired-x: dired-x.texi
118 $(MAKEINFO) dired-x.texi 123 $(MAKEINFO) dired-x.texi
119dired-x.dvi: dired-x.texi 124dired-x.dvi: dired-x.texi
@@ -271,6 +276,11 @@ $(infodir)/newsticker: newsticker.texi
271newsticker.dvi: newsticker.texi 276newsticker.dvi: newsticker.texi
272 $(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi 277 $(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi
273 278
279$(infodir)/nxml-mode: nxml-mode.texi
280 $(MAKEINFO) nxml-mode.texi
281nxml-mod.dvi: nxml-mode.texi
282 $(ENVADD) $(TEXI2DVI) $(srcdir)/nxml-mode.texi
283
274$(infodir)/rcirc: rcirc.texi 284$(infodir)/rcirc: rcirc.texi
275 $(MAKEINFO) rcirc.texi 285 $(MAKEINFO) rcirc.texi
276rcirc.dvi: rcirc.texi 286rcirc.dvi: rcirc.texi
@@ -286,8 +296,8 @@ mostlyclean:
286 296
287clean: mostlyclean 297clean: mostlyclean
288 - $(DEL) *.dvi 298 - $(DEL) *.dvi
289 - $(DEL) $(infodir)/ccmode* \ 299 - $(DEL) $(infodir)/ccmode* $(infodir)/cl* \
290 $(infodir)/cl* $(infodir)/dired-x* \ 300 $(infodir)/dbus* $(infodir)/dired-x* \
291 $(infodir)/ediff* $(infodir)/forms* \ 301 $(infodir)/ediff* $(infodir)/forms* \
292 $(infodir)/gnus* $(infodir)/info* \ 302 $(infodir)/gnus* $(infodir)/info* \
293 $(infodir)/message* $(infodir)/mh-e* \ 303 $(infodir)/message* $(infodir)/mh-e* \
@@ -304,7 +314,7 @@ clean: mostlyclean
304 $(infodir)/flymake* $(infodir)/newsticker* \ 314 $(infodir)/flymake* $(infodir)/newsticker* \
305 $(infodir)/sieve* $(infodir)/pgg* \ 315 $(infodir)/sieve* $(infodir)/pgg* \
306 $(infodir)/erc* $(infodir)/rcirc* \ 316 $(infodir)/erc* $(infodir)/rcirc* \
307 $(infodir)/remember* 317 $(infodir)/remember* $(infodir)/nxml-mode*
308 318
309distclean: clean 319distclean: clean
310 320
diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi
new file mode 100644
index 00000000000..c79a552959f
--- /dev/null
+++ b/doc/misc/nxml-mode.texi
@@ -0,0 +1,838 @@
1\input texinfo @c -*- texinfo -*-
2@c %**start of header
3@setfilename ../../info/nxml-mode
4@settitle nXML Mode
5@c %**end of header
6
7@dircategory Emacs
8@direntry
9* nXML Mode: (nxml-mode). XML editing mode with RELAX NG support.
10@end direntry
11
12@node Top
13@top nXML Mode
14
15This manual documents nxml-mode, an Emacs major mode for editing
16XML with RELAX NG support. This manual is not yet complete.
17
18@menu
19* Completion::
20* Inserting end-tags::
21* Paragraphs::
22* Outlining::
23* Locating a schema::
24* DTDs::
25* Limitations::
26@end menu
27
28@node Completion
29@chapter Completion
30
31Apart from real-time validation, the most important feature that
32nxml-mode provides for assisting in document creation is "completion".
33Completion assists the user in inserting characters at point, based on
34knowledge of the schema and on the contents of the buffer before
35point.
36
37The traditional GNU Emacs key combination for completion in a
38buffer is @kbd{M-@key{TAB}}. However, many window systems
39and window managers use this key combination themselves (typically for
40switching between windows) and do not pass it to applications. It's
41hard to find key combinations in GNU Emacs that are both easy to type
42and not taken by something else. @kbd{C-@key{RET}} (i.e.
43pressing the Enter or Return key, while the Ctrl key is held down) is
44available. It won't be available on a traditional terminal (because
45it is indistinguishable from Return), but it will work with a window
46system. Therefore we adopt the following solution by default: use
47@kbd{C-@key{RET}} when there's a window system and
48@kbd{M-@key{TAB}} when there's not. In the following, I
49will assume that a window system is being used and will therefore
50refer to @kbd{C-@key{RET}}.
51
52Completion works by examining the symbol preceding point. This
53is the symbol to be completed. The symbol to be completed may be the
54empty. Completion considers what symbols starting with the symbol to
55be completed would be valid replacements for the symbol to be
56completed, given the schema and the contents of the buffer before
57point. These symbols are the possible completions. An example may
58make this clearer. Suppose the buffer looks like this (where @point{}
59indicates point):
60
61@example
62<html xmlns="http://www.w3.org/1999/xhtml">
63<h@point{}
64@end example
65
66@noindent
67and the schema is XHTML. In this context, the symbol to be completed
68is @samp{h}. The possible completions consist of just
69@samp{head}. Another example, is
70
71@example
72<html xmlns="http://www.w3.org/1999/xhtml">
73<head>
74<@point{}
75@end example
76
77@noindent
78In this case, the symbol to be completed is empty, and the possible
79completions are @samp{base}, @samp{isindex},
80@samp{link}, @samp{meta}, @samp{script},
81@samp{style}, @samp{title}. Another example is:
82
83@example
84<html xmlns="@point{}
85@end example
86
87@noindent
88In this case, the symbol to be completed is empty, and the possible
89completions are just @samp{http://www.w3.org/1999/xhtml}.
90
91When you type @kbd{C-@key{RET}}, what happens depends
92on what the set of possible completions are.
93
94@itemize @bullet
95@item
96If the set of completions is empty, nothing
97happens.
98@item
99If there is one possible completion, then that completion is
100inserted, together with any following characters that are
101required. For example, in this case:
102
103@example
104<html xmlns="http://www.w3.org/1999/xhtml">
105<@point{}
106@end example
107
108@noindent
109@kbd{C-@key{RET}} will yield
110
111@example
112<html xmlns="http://www.w3.org/1999/xhtml">
113<head@point{}
114@end example
115@item
116If there is more than one possible completion, but all
117possible completions share a common non-empty prefix, then that prefix
118is inserted. For example, suppose the buffer is:
119
120@example
121<html x@point{}
122@end example
123
124@noindent
125The symbol to be completed is @samp{x}. The possible completions
126are @samp{xmlns} and @samp{xml:lang}. These share a
127common prefix of @samp{xml}. Thus, @kbd{C-@key{RET}}
128will yield:
129
130@example
131<html xml@point{}
132@end example
133
134@noindent
135Typically, you would do @kbd{C-@key{RET}} again, which would
136have the result described in the next item.
137@item
138If there is more than one possible completion, but the
139possible completions do not share a non-empty prefix, then Emacs will
140prompt you to input the symbol in the minibuffer, initializing the
141minibuffer with the symbol to be completed, and popping up a buffer
142showing the possible completions. You can now input the symbol to be
143inserted. The symbol you input will be inserted in the buffer instead
144of the symbol to be completed. Emacs will then insert any required
145characters after the symbol. For example, if it contains:
146
147@example
148<html xml@point{}
149@end example
150
151@noindent
152Emacs will prompt you in the minibuffer with
153
154@example
155Attribute: xml@point{}
156@end example
157
158@noindent
159and the buffer showing possible completions will contain
160
161@example
162Possible completions are:
163xml:lang xmlns
164@end example
165
166@noindent
167If you input @kbd{xmlns}, the result will be:
168
169@example
170<html xmlns="@point{}
171@end example
172
173@noindent
174(If you do @kbd{C-@key{RET}} again, the namespace URI will
175be inserted. Should that happen automatically?)
176@end itemize
177
178@node Inserting end-tags
179@chapter Inserting end-tags
180
181The main redundancy in XML syntax is end-tags. nxml-mode provides
182several ways to make it easier to enter end-tags. You can use all of
183these without a schema.
184
185You can use @kbd{C-@key{RET}} after @samp{</}
186to complete the rest of the end-tag.
187
188@kbd{C-c C-f} inserts an end-tag for the element containing
189point. This command is useful when you want to input the start-tag,
190then input the content and finally input the end-tag. The @samp{f}
191is mnemonic for finish.
192
193If you want to keep tags balanced and input the end-tag at the
194same time as the start-tag, before inputting the content, then you can
195use @kbd{C-c C-i}. This inserts a @samp{>}, then inserts
196the end-tag and leaves point before the end-tag. @kbd{C-c C-b}
197is similar but more convenient for block-level elements: it puts the
198start-tag, point and the end-tag on successive lines, appropriately
199indented. The @samp{i} is mnemonic for inline and the
200@samp{b} is mnemonic for block.
201
202Finally, you can customize nxml-mode so that @kbd{/}
203automatically inserts the rest of the end-tag when it occurs after
204@samp{<}, by doing
205
206@display
207@kbd{M-x customize-variable @key{RET} nxml-slash-auto-complete-flag @key{RET}}
208@end display
209
210@noindent
211and then following the instructions in the displayed buffer.
212
213@node Paragraphs
214@chapter Paragraphs
215
216Emacs has several commands that operate on paragraphs, most
217notably @kbd{M-q}. nXML mode redefines these to work in a way
218that is useful for XML. The exact rules that are used to find the
219beginning and end of a paragraph are complicated; they are designed
220mainly to ensure that @kbd{M-q} does the right thing.
221
222A paragraph consists of one or more complete, consecutive lines.
223A group of lines is not considered a paragraph unless it contains some
224non-whitespace characters between tags or inside comments. A blank
225line separates paragraphs. A single tag on a line by itself also
226separates paragraphs. More precisely, if one tag together with any
227leading and trailing whitespace completely occupy one or more lines,
228then those lines will not be included in any paragraph.
229
230A start-tag at the beginning of the line (possibly indented) may
231be treated as starting a paragraph. Similarly, an end-tag at the end
232of the line may be treated as ending a paragraph. The following rules
233are used to determine whether such a tag is in fact treated as a
234paragraph boundary:
235
236@itemize @bullet
237@item
238If the schema does not allow text at that point, then it
239is a paragraph boundary.
240@item
241If the end-tag corresponding to the start-tag is not at
242the end of its line, or the start-tag corresponding to the end-tag is
243not at the beginning of its line, then it is not a paragraph
244boundary. For example, in
245
246@example
247<p>This is a paragraph with an
248<emph>emphasized</emph> phrase.
249@end example
250
251@noindent
252the @samp{<emph>} start-tag would not be considered as
253starting a paragraph, because its corresponding end-tag is not at the
254end of the line.
255@item
256If there is text that is a sibling in element tree, then
257it is not a paragraph boundary. For example, in
258
259@example
260<p>This is a paragraph with an
261<emph>emphasized phrase that takes one source line</emph>
262@end example
263
264@noindent
265the @samp{<emph>} start-tag would not be considered as
266starting a paragraph, even though its end-tag is at the end of its
267line, because there the text @samp{This is a paragraph with an}
268is a sibling of the @samp{emph} element.
269@item
270Otherwise, it is a paragraph boundary.
271@end itemize
272
273@node Outlining
274@chapter Outlining
275
276nXML mode allows you to display all or part of a buffer as an
277outline, in a similar way to Emacs' outline mode. An outline in nXML
278mode is based on recognizing two kinds of element: sections and
279headings. There is one heading for every section and one section for
280every heading. A section contains its heading as or within its first
281child element. A section also contains its subordinate sections (its
282subsections). The text content of a section consists of anything in a
283section that is neither a subsection nor a heading.
284
285Note that this is a different model from that used by XHTML.
286nXML mode's outline support will not be useful for XHTML unless you
287adopt a convention of adding a @code{div} to enclose each
288section, rather than having sections implicitly delimited by different
289@code{h@var{n}} elements. This limitation may be removed
290in a future version.
291
292The variable @code{nxml-section-element-name-regexp} gives
293a regexp for the local names (i.e. the part of the name following any
294prefix) of section elements. The variable
295@code{nxml-heading-element-name-regexp} gives a regexp for the
296local names of heading elements. For an element to be recognized
297as a section
298
299@itemize @bullet
300@item
301its start-tag must occur at the beginning of a line
302(possibly indented);
303@item
304its local name must match
305@code{nxml-section-element-name-regexp};
306@item
307either its first child element or a descendant of that
308first child element must have a local name that matches
309@code{nxml-heading-element-name-regexp}; the first such element
310is treated as the section's heading.
311@end itemize
312
313@noindent
314You can customize these variables using @kbd{M-x
315customize-variable}.
316
317There are three possible outline states for a section:
318
319@itemize @bullet
320@item
321normal, showing everything, including its heading, text
322content and subsections; each subsection is displayed according to the
323state of that subsection;
324@item
325showing just its heading, with both its text content and
326its subsections hidden; all subsections are hidden regardless of their
327state;
328@item
329showing its heading and its subsections, with its text
330content hidden; each subsection is displayed according to the state of
331that subsection.
332@end itemize
333
334In the last two states, where the text content is hidden, the
335heading is displayed specially, in an abbreviated form. An element
336like this:
337
338@example
339<section>
340<title>Food</title>
341<para>There are many kinds of food.</para>
342</section>
343@end example
344
345@noindent
346would be displayed on a single line like this:
347
348@example
349<-section>Food...</>
350@end example
351
352@noindent
353If there are hidden subsections, then a @code{+} will be used
354instead of a @code{-} like this:
355
356@example
357<+section>Food...</>
358@end example
359
360@noindent
361If there are non-hidden subsections, then the section will instead be
362displayed like this:
363
364@example
365<-section>Food...
366 <-section>Delicious Food...</>
367 <-section>Distasteful Food...</>
368</-section>
369@end example
370
371@noindent
372The heading is always displayed with an indent that corresponds to its
373depth in the outline, even it is not actually indented in the buffer.
374The variable @code{nxml-outline-child-indent} controls how much
375a subheading is indented with respect to its parent heading when the
376heading is being displayed specially.
377
378Commands to change the outline state of sections are bound to
379key sequences that start with @kbd{C-c C-o} (@kbd{o} is
380mnemonic for outline). The third and final key has been chosen to be
381consistent with outline mode. In the following descriptions
382current section means the section containing point, or, more precisely,
383the innermost section containing the character immediately following
384point.
385
386@itemize @bullet
387@item
388@kbd{C-c C-o C-a} shows all sections in the buffer
389normally.
390@item
391@kbd{C-c C-o C-t} hides the text content
392of all sections in the buffer.
393@item
394@kbd{C-c C-o C-c} hides the text content
395of the current section.
396@item
397@kbd{C-c C-o C-e} shows the text content
398of the current section.
399@item
400@kbd{C-c C-o C-d} hides the text content
401and subsections of the current section.
402@item
403@kbd{C-c C-o C-s} shows the current section
404and all its direct and indirect subsections normally.
405@item
406@kbd{C-c C-o C-k} shows the headings of the
407direct and indirect subsections of the current section.
408@item
409@kbd{C-c C-o C-l} hides the text content of the
410current section and of its direct and indirect
411subsections.
412@item
413@kbd{C-c C-o C-i} shows the headings of the
414direct subsections of the current section.
415@item
416@kbd{C-c C-o C-o} hides as much as possible without
417hiding the current section's text content; the headings of ancestor
418sections of the current section and their child section sections will
419not be hidden.
420@end itemize
421
422When a heading is displayed specially, you can use
423@key{RET} in that heading to show the text content of the section
424in the same way as @kbd{C-c C-o C-e}.
425
426You can also use the mouse to change the outline state:
427@kbd{S-mouse-2} hides the text content of a section in the same
428way as@kbd{C-c C-o C-c}; @kbd{mouse-2} on a specially
429displayed heading shows the text content of the section in the same
430way as @kbd{C-c C-o C-e}; @kbd{mouse-1} on a specially
431displayed start-tag toggles the display of subheadings on and
432off.
433
434The outline state for each section is stored with the first
435character of the section (as a text property). Every command that
436changes the outline state of any section updates the display of the
437buffer so that each section is displayed correctly according to its
438outline state. If the section structure is subsequently changed, then
439it is possible for the display to no longer correctly reflect the
440stored outline state. @kbd{C-c C-o C-r} can be used to refresh
441the display so it is correct again.
442
443@node Locating a schema
444@chapter Locating a schema
445
446nXML mode has a configurable set of rules to locate a schema for
447the file being edited. The rules are contained in one or more schema
448locating files, which are XML documents.
449
450The variable @samp{rng-schema-locating-files} specifies
451the list of the file-names of schema locating files that nXML mode
452should use. The order of the list is significant: when file
453@var{x} occurs in the list before file @var{y} then rules
454from file @var{x} have precedence over rules from file
455@var{y}. A filename specified in
456@samp{rng-schema-locating-files} may be relative. If so, it will
457be resolved relative to the document for which a schema is being
458located. It is not an error if relative file-names in
459@samp{rng-schema-locating-files} do not not exist. You can use
460@kbd{M-x customize-variable @key{RET} rng-schema-locating-files
461@key{RET}} to customize the list of schema locating
462files.
463
464By default, @samp{rng-schema-locating-files} list has two
465members: @samp{schemas.xml}, and
466@samp{@var{dist-dir}/schema/schemas.xml} where
467@samp{@var{dist-dir}} is the directory containing the nXML
468distribution. The first member will cause nXML mode to use a file
469@samp{schemas.xml} in the same directory as the document being
470edited if such a file exist. The second member contains rules for the
471schemas that are included with the nXML distribution.
472
473@menu
474* Commands for locating a schema::
475* Schema locating files::
476@end menu
477
478@node Commands for locating a schema
479@section Commands for locating a schema
480
481The command @kbd{C-c C-s C-w} will tell you what schema
482is currently being used.
483
484The rules for locating a schema are applied automatically when
485you visit a file in nXML mode. However, if you have just created a new
486file and the schema cannot be inferred from the file-name, then this
487will not locate the right schema. In this case, you should insert the
488start-tag of the root element and then use the command @kbd{C-c
489C-a}, which reapplies the rules based on the current content of
490the document. It is usually not necessary to insert the complete
491start-tag; often just @samp{<@var{name}} is
492enough.
493
494If you want to use a schema that has not yet been added to the
495schema locating files, you can use the command @kbd{C-c C-s C-f}
496to manually select the file contaiing the schema for the document in
497current buffer. Emacs will read the file-name of the schema from the
498minibuffer. After reading the file-name, Emacs will ask whether you
499wish to add a rule to a schema locating file that persistently
500associates the document with the selected schema. The rule will be
501added to the first file in the list specified
502@samp{rng-schema-locating-files}; it will create the file if
503necessary, but will not create a directory. If the variable
504@samp{rng-schema-locating-files} has not been customized, this
505means that the rule will be added to the file @samp{schemas.xml}
506in the same directory as the document being edited.
507
508The command @kbd{C-c C-s C-t} allows you to select a schema by
509specifying an identifier for the type of the document. The schema
510locating files determine the available type identifiers and what
511schema is used for each type identifier. This is useful when it is
512impossible to infer the right schema from either the file-name or the
513content of the document, even though the schema is already in the
514schema locating file. A situation in which this can occur is when
515there are multiple variants of a schema where all valid documents have
516the same document element. For example, XHTML has Strict and
517Transitional variants. In a situation like this, a schema locating file
518can define a type identifier for each variant. As with @kbd{C-c
519C-s C-f}, Emacs will ask whether you wish to add a rule to a schema
520locating file that persistently associates the document with the
521specified type identifier.
522
523The command @kbd{C-c C-s C-l} adds a rule to a schema
524locating file that persistently associates the document with
525the schema that is currently being used.
526
527@node Schema locating files
528@section Schema locating files
529
530Each schema locating file specifies a list of rules. The rules
531from each file are appended in order. To locate a schema each rule is
532applied in turn until a rule matches. The first matching rule is then
533used to determine the schema.
534
535Schema locating files are designed to be useful for other
536applications that need to locate a schema for a document. In fact,
537there is nothing specific to locating schemas in the design; it could
538equally well be used for locating a stylesheet.
539
540@menu
541* Schema locating file syntax basics::
542* Using the document's URI to locate a schema::
543* Using the document element to locate a schema::
544* Using type identifiers in schema locating files::
545* Using multiple schema locating files::
546@end menu
547
548@node Schema locating file syntax basics
549@subsection Schema locating file syntax basics
550
551There is a schema for schema locating files in the file
552@samp{locate.rnc} in the schema directory. Schema locating
553files must be valid with respect to this schema.
554
555The document element of a schema locating file must be
556@samp{locatingRules} and the namespace URI must be
557@samp{http://thaiopensource.com/ns/locating-rules/1.0}. The
558children of the document element specify rules. The order of the
559children is the same as the order of the rules. Here's a complete
560example of a schema locating file:
561
562@example
563<?xml version="1.0"?>
564<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
565 <namespace ns="http://www.w3.org/1999/xhtml" uri="xhtml.rnc"/>
566 <documentElement localName="book" uri="docbook.rnc"/>
567</locatingRules>
568@end example
569
570@noindent
571This says to use the schema @samp{xhtml.rnc} for a document with
572namespace @samp{http://www.w3.org/1999/xhtml}, and to use the
573schema @samp{docbook.rnc} for a document whose local name is
574@samp{book}. If the document element had both a namespace URI
575of @samp{http://www.w3.org/1999/xhtml} and a local name of
576@samp{book}, then the matching rule that comes first will be
577used and so the schema @samp{xhtml.rnc} would be used. There is
578no precedence between different types of rule; the first matching rule
579of any type is used.
580
581As usual with XML-related technologies, resources are identified
582by URIs. The @samp{uri} attribute identifies the schema by
583specifying the URI. The URI may be relative. If so, it is resolved
584relative to the URI of the schema locating file that contains
585attribute. This means that if the value of @samp{uri} attribute
586does not contain a @samp{/}, then it will refer to a filename in
587the same directory as the schema locating file.
588
589@node Using the document's URI to locate a schema
590@subsection Using the document's URI to locate a schema
591
592A @samp{uri} rule locates a schema based on the URI of the
593document. The @samp{uri} attribute specifies the URI of the
594schema. The @samp{resource} attribute can be used to specify
595the schema for a particular document. For example,
596
597@example
598<uri resource="spec.xml" uri="docbook.rnc"/>
599@end example
600
601@noindent
602specifies that that the schema for @samp{spec.xml} is
603@samp{docbook.rnc}.
604
605The @samp{pattern} attribute can be used instead of the
606@samp{resource} attribute to specify the schema for any document
607whose URI matches a pattern. The pattern has the same syntax as an
608absolute or relative URI except that the path component of the URI can
609use a @samp{*} character to stand for zero or more characters
610within a path segment (i.e. any character other @samp{/}).
611Typically, the URI pattern looks like a relative URI, but, whereas a
612relative URI in the @samp{resource} attribute is resolved into a
613particular absolute URI using the base URI of the schema locating
614file, a relative URI pattern matches if it matches some number of
615complete path segments of the document's URI ending with the last path
616segment of the document's URI. For example,
617
618@example
619<uri pattern="*.xsl" uri="xslt.rnc"/>
620@end example
621
622@noindent
623specifies that the schema for documents with a URI whose path ends
624with @samp{.xsl} is @samp{xslt.rnc}.
625
626A @samp{transformURI} rule locates a schema by
627transforming the URI of the document. The @samp{fromPattern}
628attribute specifies a URI pattern with the same meaning as the
629@samp{pattern} attribute of the @samp{uri} element. The
630@samp{toPattern} attribute is a URI pattern that is used to
631generate the URI of the schema. Each @samp{*} in the
632@samp{toPattern} is replaced by the string that matched the
633corresponding @samp{*} in the @samp{fromPattern}. The
634resulting string is appended to the initial part of the document's URI
635that was not explicitly matched by the @samp{fromPattern}. The
636rule matches only if the transformed URI identifies an existing
637resource. For example, the rule
638
639@example
640<transformURI fromPattern="*.xml" toPattern="*.rnc"/>
641@end example
642
643@noindent
644would transform the URI @samp{file:///home/jjc/docs/spec.xml}
645into the URI @samp{file:///home/jjc/docs/spec.rnc}. Thus, this
646rule specifies that to locate a schema for a document
647@samp{@var{foo}.xml}, Emacs should test whether a file
648@samp{@var{foo}.rnc} exists in the same directory as
649@samp{@var{foo}.xml}, and, if so, should use it as the
650schema.
651
652@node Using the document element to locate a schema
653@subsection Using the document element to locate a schema
654
655A @samp{documentElement} rule locates a schema based on
656the local name and prefix of the document element. For example, a rule
657
658@example
659<documentElement prefix="xsl" localName="stylesheet" uri="xslt.rnc"/>
660@end example
661
662@noindent
663specifies that when the name of the document element is
664@samp{xsl:stylesheet}, then @samp{xslt.rnc} should be used
665as the schema. Either the @samp{prefix} or
666@samp{localName} attribute may be omitted to allow any prefix or
667local name.
668
669A @samp{namespace} rule locates a schema based on the
670namespace URI of the document element. For example, a rule
671
672@example
673<namespace ns="http://www.w3.org/1999/XSL/Transform" uri="xslt.rnc"/>
674@end example
675
676@noindent
677specifies that when the namespace URI of the document is
678@samp{http://www.w3.org/1999/XSL/Transform}, then
679@samp{xslt.rnc} should be used as the schema.
680
681@node Using type identifiers in schema locating files
682@subsection Using type identifiers in schema locating files
683
684Type identifiers allow a level of indirection in locating the
685schema for a document. Instead of associating the document directly
686with a schema URI, the document is associated with a type identifier,
687which is in turn associated with a schema URI. nXML mode does not
688constrain the format of type identifiers. They can be simply strings
689without any formal structure or they can be public identifiers or
690URIs. Note that these type identifiers have nothing to do with the
691DOCTYPE declaration. When comparing type identifiers, whitespace is
692normalized in the same way as with the @samp{xsd:token}
693datatype: leading and trailing whitespace is stripped; other sequences
694of whitespace are normalized to a single space character.
695
696Each of the rules described in previous sections that uses a
697@samp{uri} attribute to specify a schema, can instead use a
698@samp{typeId} attribute to specify a type identifier. The type
699identifier can be associated with a URI using a @samp{typeId}
700element. For example,
701
702@example
703<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
704 <namespace ns="http://www.w3.org/1999/xhtml" typeId="XHTML"/>
705 <typeId id="XHTML" typeId="XHTML Strict"/>
706 <typeId id="XHTML Strict" uri="xhtml-strict.rnc"/>
707 <typeId id="XHTML Transitional" uri="xhtml-transitional.rnc"/>
708</locatingRules>
709@end example
710
711@noindent
712declares three type identifiers @samp{XHTML} (representing the
713default variant of XHTML to be used), @samp{XHTML Strict} and
714@samp{XHTML Transitional}. Such a schema locating file would
715use @samp{xhtml-strict.rnc} for a document whose namespace is
716@samp{http://www.w3.org/1999/xhtml}. But it is considerably
717more flexible than a schema locating file that simply specified
718
719@example
720<namespace ns="http://www.w3.org/1999/xhtml" uri="xhtml-strict.rnc"/>
721@end example
722
723@noindent
724A user can easily use @kbd{C-c C-s C-t} to select between XHTML
725Strict and XHTML Transitional. Also, a user can easily add a catalog
726
727@example
728<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
729 <typeId id="XHTML" typeId="XHTML Transitional"/>
730</locatingRules>
731@end example
732
733@noindent
734that makes the default variant of XHTML be XHTML Transitional.
735
736@node Using multiple schema locating files
737@subsection Using multiple schema locating files
738
739The @samp{include} element includes rules from another
740schema locating file. The behavior is exactly as if the rules from
741that file were included in place of the @samp{include} element.
742Relative URIs are resolved into absolute URIs before the inclusion is
743performed. For example,
744
745@example
746<include rules="../rules.xml"/>
747@end example
748
749@noindent
750includes the rules from @samp{rules.xml}.
751
752The process of locating a schema takes as input a list of schema
753locating files. The rules in all these files and in the files they
754include are resolved into a single list of rules, which are applied
755strictly in order. Sometimes this order is not what is needed.
756For example, suppose you have two schema locating files, a private
757file
758
759@example
760<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
761 <namespace ns="http://www.w3.org/1999/xhtml" uri="xhtml.rnc"/>
762</locatingRules>
763@end example
764
765@noindent
766followed by a public file
767
768@example
769<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
770 <transformURI pathSuffix=".xml" replacePathSuffix=".rnc"/>
771 <namespace ns="http://www.w3.org/1999/XSL/Transform" typeId="XSLT"/>
772</locatingRules>
773@end example
774
775@noindent
776The effect of these two files is that the XHTML @samp{namespace}
777rule takes precedence over the @samp{transformURI} rule, which
778is almost certainly not what is needed. This can be solved by adding
779an @samp{applyFollowingRules} to the private file.
780
781@example
782<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
783 <applyFollowingRules ruleType="transformURI"/>
784 <namespace ns="http://www.w3.org/1999/xhtml" uri="xhtml.rnc"/>
785</locatingRules>
786@end example
787
788@node DTDs
789@chapter DTDs
790
791nxml-mode is designed to support the creation of standalone XML
792documents that do not depend on a DTD. Although it is common practice
793to insert a DOCTYPE declaration referencing an external DTD, this has
794undesirable side-effects. It means that the document is no longer
795self-contained. It also means that different XML parsers may interpret
796the document in different ways, since the XML Recommendation does not
797require XML parsers to read the DTD. With DTDs, it was impractical to
798get validation without using an external DTD or reference to an
799parameter entity. With RELAX NG and other schema languages, you can
800simulataneously get the benefits of validation and standalone XML
801documents. Therefore, I recommend that you do not reference an
802external DOCTYPE in your XML documents.
803
804One problem is entities for characters. Typically, as well as
805providing validation, DTDs also provide a set of character entities
806for documents to use. Schemas cannot provide this functionality,
807because schema validation happens after XML parsing. The recommended
808solution is to either use the Unicode characters directly, or, if this
809is impractical, use character references. nXML mode supports this by
810providing commands for entering characters and character references
811using the Unicode names, and can display the glyph corresponding to a
812character reference.
813
814@node Limitations
815@chapter Limitations
816
817nXML mode has some limitations:
818
819@itemize @bullet
820@item
821DTD support is limited. Internal parsed general entities declared
822in the internal subset are supported provided they do not contain
823elements. Other usage of DTDs is ignored.
824@item
825The restrictions on RELAX NG schemas in section 7 of the RELAX NG
826specification are not enforced.
827@item
828Unicode support has problems. This stems mostly from the fact that
829the XML (and RELAX NG) character model is based squarely on Unicode,
830whereas the Emacs character model is not. Emacs 22 is slated to have
831full Unicode support, which should improve the situation here.
832@end itemize
833
834@bye
835
836@ignore
837 arch-tag: 3b6e8ac2-ae8d-4f38-bd43-ce9f80be04d6
838@end ignore
diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi
index 41d1777bf5a..d93774c5850 100644
--- a/doc/misc/remember.texi
+++ b/doc/misc/remember.texi
@@ -350,7 +350,6 @@ The text used to begin each remember item.
350@subheading Insinuation 350@subheading Insinuation
351 351
352@lisp 352@lisp
353(require 'remember-diary)
354(add-to-list 'remember-handler-functions 'remember-diary-extract-entries) 353(add-to-list 'remember-handler-functions 'remember-diary-extract-entries)
355@end lisp 354@end lisp
356 355
@@ -358,6 +357,7 @@ The text used to begin each remember item.
358 357
359@defopt remember-diary-file 358@defopt remember-diary-file
360File for extracted diary entries. 359File for extracted diary entries.
360If this is nil, then @code{diary-file} will be used instead."
361@end defopt 361@end defopt
362 362
363@node Mailbox, Org, Diary, Backends 363@node Mailbox, Org, Diary, Backends
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 591122640fe..d1acafefa03 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -327,9 +327,10 @@ host, followed by a newline.
327@value{tramp} now waits for the shell prompt or for a message that the login 327@value{tramp} now waits for the shell prompt or for a message that the login
328failed. 328failed.
329 329
330If @value{tramp} sees neither of them after a certain period of time (a minute, 330If @value{tramp} sees neither of them after a certain period of time
331say), then it issues an error message saying that it couldn't find the 331(a minute, say), then it issues an error message saying that it
332remote shell prompt and shows you what the remote host has sent. 332couldn't find the remote shell prompt and shows you what the remote
333host has sent.
333 334
334If @value{tramp} sees a @samp{login failed} message, it tells you so, 335If @value{tramp} sees a @samp{login failed} message, it tells you so,
335aborts the login attempt and allows you to try again. 336aborts the login attempt and allows you to try again.
@@ -1602,6 +1603,19 @@ the connections, like introducing a @option{Host} section in
1602@file{~/.ssh/config} (@pxref{Frequently Asked Questions}) or applying 1603@file{~/.ssh/config} (@pxref{Frequently Asked Questions}) or applying
1603multiple hops (@pxref{Multi-hops}). 1604multiple hops (@pxref{Multi-hops}).
1604 1605
1606When @value{tramp} detects a changed operating system version on a
1607remote host (via the command @command{uname -sr}), it flushes all
1608connection related information for this host, quits the execution, and
1609displays a message like this:
1610
1611@example
1612Quit: "Connection reset, because remote host changed from `Linux
16132.6.22-13-generic' to `Linux 2.6.22-14-generic'"
1614@end example
1615
1616@noindent
1617You can simply open the remote file again in such a case.
1618
1605 1619
1606@node Remote Programs 1620@node Remote Programs
1607@section How @value{tramp} finds and uses programs on the remote machine. 1621@section How @value{tramp} finds and uses programs on the remote machine.
@@ -2253,27 +2267,49 @@ filename completion on the remote host. This works pretty much like
2253for files on the local host, with the exception that minibuffer 2267for files on the local host, with the exception that minibuffer
2254killing via a double-slash works only on the filename part, except 2268killing via a double-slash works only on the filename part, except
2255that filename part starts with @file{//}. 2269that filename part starts with @file{//}.
2270@ifset emacs
2271A triple-slash stands for the default behaviour.
2272@end ifset
2256@ifinfo 2273@ifinfo
2257@xref{Minibuffer File, , , @value{emacsdir}}. 2274@xref{Minibuffer File, , , @value{emacsdir}}.
2258@end ifinfo 2275@end ifinfo
2259 2276
2277@noindent
2278Example:
2279
2280@example
2260@ifset emacs 2281@ifset emacs
2261As example, @kbd{@trampfn{telnet, , melancholia, /usr/local/bin//etc} 2282@kbd{C-x C-f @trampfn{telnet, , melancholia, /usr/local/bin//etc} @key{TAB}}
2262@key{TAB}} would result in 2283 @print{} @trampfn{telnet, , melancholia, /etc}
2263@file{@trampfn{telnet, , melancholia, /etc}}, whereas 2284
2264@kbd{@trampfn{telnet, , melancholia, //etc} @key{TAB}} reduces the 2285@kbd{C-x C-f @trampfn{telnet, , melancholia, //etc} @key{TAB}}
2265minibuffer contents to @file{/etc}. A triple-slash stands for the 2286 @print{} /etc
2266default behaviour, 2287
2267i.e. @kbd{@trampfn{telnet, , melancholia, /usr/local/bin///etc} 2288@kbd{C-x C-f @trampfn{telnet, , melancholia, /usr/local/bin///etc} @key{TAB}}
2268@key{TAB}} expands directly to @file{/etc}. 2289 @print{} /etc
2269@end ifset 2290@end ifset
2270 2291
2271@ifset xemacs 2292@ifset xemacs
2272As example, @kbd{@trampfn{telnet, , melancholia, /usr/local/bin//}} 2293@kbd{C-x C-f @trampfn{telnet, , melancholia, /usr/local/bin//}}
2273would result in @file{@trampfn{telnet, , melancholia, /}}, whereas 2294 @print{} @trampfn{telnet, , melancholia, /}
2274@kbd{@trampfn{telnet, , melancholia, //}} expands the minibuffer 2295
2275contents to @file{/}. 2296@kbd{C-x C-f @trampfn{telnet, , melancholia, //}}
2297 @print{} /
2276@end ifset 2298@end ifset
2299@end example
2300
2301A remote directory might have changed its contents out of
2302@value{emacsname} control, for example by creation or deletion of
2303files by other processes. Therefore, during filename completion the
2304remote directory contents is reread regularly in order to detect such
2305changes, which would be invisible otherwise (@pxref{Connection caching}).
2306
2307@defopt tramp-completion-reread-directory-timeout
2308This variable defines the number of seconds since last remote command
2309before rereading a directory contents. A value of 0 would require an
2310immediate reread during filename completion, @code{nil} means to use
2311always cached values for the directory contents.
2312@end defopt
2277 2313
2278 2314
2279@node Remote processes 2315@node Remote processes