aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorStefan Monnier2010-09-13 16:40:48 +0200
committerStefan Monnier2010-09-13 16:40:48 +0200
commitcc390e46c7ba95b76ea133d98fd386214cd01709 (patch)
treeead4400d22bd07214b782ff7e46e79d473fac419 /doc/lispref
parentc566235d981eba73c88bbff00b6a1d88360b6e9f (diff)
parentc5fe4acb5fb456d6e8e147d8bc7981ce56c5c03d (diff)
downloademacs-cc390e46c7ba95b76ea133d98fd386214cd01709.tar.gz
emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.zip
Merge from trunk
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog69
-rw-r--r--doc/lispref/anti.texi2
-rw-r--r--doc/lispref/commands.texi10
-rw-r--r--doc/lispref/compile.texi6
-rw-r--r--doc/lispref/display.texi59
-rw-r--r--doc/lispref/elisp.texi10
-rw-r--r--doc/lispref/files.texi8
-rw-r--r--doc/lispref/frames.texi94
-rw-r--r--doc/lispref/loading.texi7
-rw-r--r--doc/lispref/modes.texi12
-rw-r--r--doc/lispref/nonascii.texi3
-rw-r--r--doc/lispref/objects.texi4
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--doc/lispref/package.texi197
-rw-r--r--doc/lispref/processes.texi28
-rw-r--r--doc/lispref/syntax.texi91
-rw-r--r--doc/lispref/text.texi53
-rw-r--r--doc/lispref/tips.texi25
-rw-r--r--doc/lispref/vol1.texi8
-rw-r--r--doc/lispref/vol2.texi8
20 files changed, 570 insertions, 126 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index fe64ca9d835..e3df5fab9e9 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,72 @@
12010-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * syntax.texi (Syntax Flags): Document new `c' flag.
4
52010-09-09 Glenn Morris <rgm@gnu.org>
6
7 * display.texi (ImageMagick Images): General cleanup.
8
92010-09-06 Alexander Klimov <alserkli@inbox.ru> (tiny change)
10
11 * files.texi (Directory Names): Use \` rather than ^.
12
132010-09-02 Jan Djärv <jan.h.d@swipnet.se>
14
15 * text.texi (Low-Level Kill Ring):
16 * frames.texi (Window System Selections): Remove cut buffer
17 documentation.
18
192010-08-28 Eli Zaretskii <eliz@gnu.org>
20
21 * display.texi (Fringe Size/Pos): Add a cross-reference to "Layout
22 Parameters", where the default fringe width is described.
23
24 * frames.texi (Window Frame Parameters, Basic Parameters)
25 (Position Parameters, Layout Parameters, Management Parameters)
26 (Cursor Parameters, Font and Color Parameters): Add indexing for
27 frame parameters. (Bug#6929)
28
292010-08-25 Tom Tromey <tromey@redhat.com>
30
31 * vol2.texi (Top): Update.
32 * vol1.texi (Top): Update.
33 * tips.texi (Library Headers): Mention Package-Version and
34 Package-Requires.
35 * package.texi: New file.
36 * os.texi (System Interface): Update pointers.
37 * elisp.texi (Top): Link to new nodes. Include package.texi.
38 * anti.texi (Antinews): Update pointers.
39
402010-08-25 Eli Zaretskii <eliz@gnu.org>
41
42 * processes.texi (Filter Functions): Fix last change.
43
442010-08-24 Markus Triska <triska@gmx.at>
45
46 * processes.texi (Filter Functions): Use `buffer-live-p' instead
47 of `buffer-name' in the main text as well as in the example
48 (Bug#3098).
49
502010-08-22 Chong Yidong <cyd@stupidchicken.com>
51
52 * nonascii.texi (Text Representations):
53 * loading.texi (Loading Non-ASCII):
54 * compile.texi (Byte Compilation): Don't mention obsolete
55 --unibyte command-line argument.
56
572010-08-22 Chong Yidong <cyd@stupidchicken.com>
58
59 * modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
60
612010-08-22 Chong Yidong <cyd@stupidchicken.com>
62
63 * objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878).
64
652010-08-20 Eli Zaretskii <eliz@gnu.org>
66
67 * commands.texi (Misc Events): Add cross-references to where
68 POSITION of a mouse event is described in detail.
69
12010-08-08 Christoph <cschol2112@googlemail.com> 702010-08-08 Christoph <cschol2112@googlemail.com>
2 71
3 * control.texi (Handling Errors) <error-message-string>: Fix arg name. 72 * control.texi (Handling Errors) <error-message-string>: Fix arg name.
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 11b8220d290..92e0432b842 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -6,7 +6,7 @@
6 6
7@c This node must have no pointers. 7@c This node must have no pointers.
8 8
9@node Antinews, GNU Free Documentation License, System Interface, Top 9@node Antinews, GNU Free Documentation License, Packaging, Top
10@appendix Emacs 22 Antinews 10@appendix Emacs 22 Antinews
11@c Update the elisp.texi, vol1.texi, vol2.texi Antinews menu entries 11@c Update the elisp.texi, vol1.texi, vol2.texi Antinews menu entries
12@c with the above version number. 12@c with the above version number.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index d22cfd955cb..17cfcc0def8 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1616,7 +1616,8 @@ These kinds of event are generated by moving a mouse wheel. Their
1616usual meaning is a kind of scroll or zoom. 1616usual meaning is a kind of scroll or zoom.
1617 1617
1618The element @var{position} is a list describing the position of the 1618The element @var{position} is a list describing the position of the
1619event, in the same format as used in a mouse-click event. 1619event, in the same format as used in a mouse-click event (@pxref{Click
1620Events}).
1620 1621
1621@vindex mouse-wheel-up-event 1622@vindex mouse-wheel-up-event
1622@vindex mouse-wheel-down-event 1623@vindex mouse-wheel-down-event
@@ -1633,9 +1634,10 @@ selected in an application outside of Emacs, and then dragged and
1633dropped onto an Emacs frame. 1634dropped onto an Emacs frame.
1634 1635
1635The element @var{position} is a list describing the position of the 1636The element @var{position} is a list describing the position of the
1636event, in the same format as used in a mouse-click event, and 1637event, in the same format as used in a mouse-click event (@pxref{Click
1637@var{files} is the list of file names that were dragged and dropped. 1638Events}), and @var{files} is the list of file names that were dragged
1638The usual way to handle this event is by visiting these files. 1639and dropped. The usual way to handle this event is by visiting these
1640files.
1639 1641
1640This kind of event is generated, at present, only on some kinds of 1642This kind of event is generated, at present, only on some kinds of
1641systems. 1643systems.
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 1c28664e7c3..69b57f19ea7 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -22,12 +22,6 @@ hardware (as true compiled code is), byte-code is completely
22transportable from machine to machine without recompilation. It is not, 22transportable from machine to machine without recompilation. It is not,
23however, as fast as true compiled code. 23however, as fast as true compiled code.
24 24
25 Compiling a Lisp file with the Emacs byte compiler always reads the
26file as multibyte text, even if Emacs was started with @samp{--unibyte},
27unless the file specifies otherwise. This is so that compilation gives
28results compatible with running the same file without compilation.
29@xref{Loading Non-ASCII}.
30
31 In general, any version of Emacs can run byte-compiled code produced 25 In general, any version of Emacs can run byte-compiled code produced
32by recent earlier versions of Emacs, but the reverse is not true. 26by recent earlier versions of Emacs, but the reverse is not true.
33 27
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 9f07fb42ef4..037c334ab88 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3214,7 +3214,9 @@ width from the window's frame.
3214 The values of these variables take effect when you display the 3214 The values of these variables take effect when you display the
3215buffer in a window. If you change them while the buffer is visible, 3215buffer in a window. If you change them while the buffer is visible,
3216you can call @code{set-window-buffer} to display it once again in the 3216you can call @code{set-window-buffer} to display it once again in the
3217same window, to make the changes take effect. 3217same window, to make the changes take effect. A buffer that does not
3218specify values for these variables will use the default values
3219specified for the frame; see @ref{Layout Parameters}.
3218 3220
3219@defun set-window-fringes window left &optional right outside-margins 3221@defun set-window-fringes window left &optional right outside-margins
3220This function sets the fringe widths of window @var{window}. 3222This function sets the fringe widths of window @var{window}.
@@ -4039,6 +4041,7 @@ displayed (@pxref{Display Feature Testing}).
4039* GIF Images:: Special features for GIF format. 4041* GIF Images:: Special features for GIF format.
4040* TIFF Images:: Special features for TIFF format. 4042* TIFF Images:: Special features for TIFF format.
4041* PostScript Images:: Special features for PostScript format. 4043* PostScript Images:: Special features for PostScript format.
4044* ImageMagick Images:: Special features available through ImageMagick.
4042* Other Image Types:: Various other formats are supported. 4045* Other Image Types:: Various other formats are supported.
4043* Defining Images:: Convenient ways to define an image for later use. 4046* Defining Images:: Convenient ways to define an image for later use.
4044* Showing Images:: Convenient ways to display an image once it is defined. 4047* Showing Images:: Convenient ways to display an image once it is defined.
@@ -4463,6 +4466,60 @@ specifying the bounding box of the PostScript image, analogous to the
4463@end example 4466@end example
4464@end table 4467@end table
4465 4468
4469@node ImageMagick Images
4470@subsection ImageMagick Images
4471@cindex ImageMagick images
4472@cindex images, support for more formats
4473
4474 If you build Emacs with ImageMagick (@url{http://www.imagemagick.org})
4475support, you can use the ImageMagick library to load many image formats.
4476
4477@findex imagemagick-types
4478The function @code{imagemagick-types} returns a list of image file
4479extensions that your installation of ImageMagick supports. To enable
4480support, you must call the function @code{imagemagick-register-types}.
4481
4482@vindex imagemagick-types-inhibit
4483The variable @code{imagemagick-types-inhibit} specifies a list of
4484image types that you do @emph{not} want ImageMagick to handle. There
4485may be overlap between image loaders in your Emacs installation, and
4486you may prefer to use a different one for a given image type (which
4487@c FIXME how is this priority determined?
4488loader will be used in practice depends on the priority of the loaders).
4489@c FIXME why are these uppercase when image-types is lower-case?
4490@c FIXME what are the possibe options? Are these actually file extensions?
4491For example, if you never want to use the ImageMagick loader to use
4492JPEG files, add @code{JPG} to this list.
4493
4494@vindex imagemagick-render-type
4495You can set the variable @code{imagemagick-render-type} to choose
4496between screen render methods for the ImageMagick loader. The options
4497are: @code{0}, a conservative method which works with older
4498@c FIXME details of this "newer method"?
4499@c Presumably it is faster but may be less "robust"?
4500ImageMagick versions (it is a bit slow, but robust); and @code{1},
4501a newer ImageMagick method.
4502
4503Images loaded with ImageMagick support a few new display specifications:
4504
4505@table @code
4506@item :width, :height
4507The @code{:width} and @code{:height} keywords are used for scaling the
4508image. If only one of them is specified, the other one will be
4509calculated so as to preserve the aspect ratio. If both are specified,
4510aspect ratio may not be preserved.
4511
4512@item :rotation
4513Specifies a rotation angle in degrees.
4514
4515@item :index
4516Specifies which image to view inside an image bundle file format, such
4517as TIFF or DJVM. You can use the @code{image-metadata} function to
4518retrieve the total number of images in an image bundle (this is
4519similar to how GIF files work).
4520@end table
4521
4522
4466@node Other Image Types 4523@node Other Image Types
4467@subsection Other Image Types 4524@subsection Other Image Types
4468@cindex PBM 4525@cindex PBM
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 30f085f69de..7f0a2ff5a37 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -159,6 +159,8 @@ Cover art by Etienne Suvasa.
159* System Interface:: Getting the user id, system type, environment 159* System Interface:: Getting the user id, system type, environment
160 variables, and other such things. 160 variables, and other such things.
161 161
162* Packaging:: Preparing Lisp code for distribution.
163
162Appendices 164Appendices
163 165
164* Antinews:: Info for users downgrading to Emacs 22. 166* Antinews:: Info for users downgrading to Emacs 22.
@@ -1395,6 +1397,12 @@ Operating System Interface
1395* Session Management:: Saving and restoring state with 1397* Session Management:: Saving and restoring state with
1396 X Session Management. 1398 X Session Management.
1397 1399
1400Preparing Lisp code for distribution
1401
1402* Packaging Basics:: The basic concepts of Emacs Lisp packages.
1403* Simple Packages:: How to package a single .el file.
1404* Multi-file Packages:: How to package multiple files.
1405
1398Starting Up Emacs 1406Starting Up Emacs
1399 1407
1400* Startup Summary:: Sequence of actions Emacs performs at startup. 1408* Startup Summary:: Sequence of actions Emacs performs at startup.
@@ -1491,6 +1499,8 @@ Object Internals
1491@include display.texi 1499@include display.texi
1492@include os.texi 1500@include os.texi
1493 1501
1502@include package.texi
1503
1494@c MOVE to Emacs Manual: include misc-modes.texi 1504@c MOVE to Emacs Manual: include misc-modes.texi
1495 1505
1496@c appendices 1506@c appendices
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index abdd2814b56..23fd2376a57 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1933,7 +1933,7 @@ The variable @code{directory-abbrev-alist} contains an alist of
1933abbreviations to use for file directories. Each element has the form 1933abbreviations to use for file directories. Each element has the form
1934@code{(@var{from} . @var{to})}, and says to replace @var{from} with 1934@code{(@var{from} . @var{to})}, and says to replace @var{from} with
1935@var{to} when it appears in a directory name. The @var{from} string is 1935@var{to} when it appears in a directory name. The @var{from} string is
1936actually a regular expression; it should always start with @samp{^}. 1936actually a regular expression; it should always start with @samp{\`}.
1937The @var{to} string should be an ordinary absolute directory name. Do 1937The @var{to} string should be an ordinary absolute directory name. Do
1938not use @samp{~} to stand for a home directory in that string. The 1938not use @samp{~} to stand for a home directory in that string. The
1939function @code{abbreviate-file-name} performs these substitutions. 1939function @code{abbreviate-file-name} performs these substitutions.
@@ -1946,9 +1946,9 @@ and so on are normally accessed through symbolic links named @file{/fsf}
1946and so on. 1946and so on.
1947 1947
1948@example 1948@example
1949(("^/home/fsf" . "/fsf") 1949(("\\`/home/fsf" . "/fsf")
1950 ("^/home/gp" . "/gp") 1950 ("\\`/home/gp" . "/gp")
1951 ("^/home/gd" . "/gd")) 1951 ("\\`/home/gd" . "/gd"))
1952@end example 1952@end example
1953@end defopt 1953@end defopt
1954 1954
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index a54a65b0743..d27010d2096 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -461,6 +461,7 @@ Line Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}.
461 461
462@node Window Frame Parameters 462@node Window Frame Parameters
463@subsection Window Frame Parameters 463@subsection Window Frame Parameters
464@cindex frame parameters for windowed displays
464 465
465 Just what parameters a frame has depends on what display mechanism 466 Just what parameters a frame has depends on what display mechanism
466it uses. This section describes the parameters that have special 467it uses. This section describes the parameters that have special
@@ -489,16 +490,19 @@ terminal frames.
489frame. @code{title} and @code{name} are meaningful on all terminals. 490frame. @code{title} and @code{name} are meaningful on all terminals.
490 491
491@table @code 492@table @code
493@vindex display, a frame parameter
492@item display 494@item display
493The display on which to open this frame. It should be a string of the 495The display on which to open this frame. It should be a string of the
494form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the 496form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the
495@code{DISPLAY} environment variable. 497@code{DISPLAY} environment variable.
496 498
499@vindex display-type, a frame parameter
497@item display-type 500@item display-type
498This parameter describes the range of possible colors that can be used 501This parameter describes the range of possible colors that can be used
499in this frame. Its value is @code{color}, @code{grayscale} or 502in this frame. Its value is @code{color}, @code{grayscale} or
500@code{mono}. 503@code{mono}.
501 504
505@vindex title, a frame parameter
502@item title 506@item title
503If a frame has a non-@code{nil} title, it appears in the window 507If a frame has a non-@code{nil} title, it appears in the window
504system's title bar at the top of the frame, and also in the mode line 508system's title bar at the top of the frame, and also in the mode line
@@ -507,6 +511,7 @@ of windows in that frame if @code{mode-line-frame-identification} uses
507Emacs is not using a window system, and can only display one frame at 511Emacs is not using a window system, and can only display one frame at
508a time. @xref{Frame Titles}. 512a time. @xref{Frame Titles}.
509 513
514@vindex name, a frame parameter
510@item name 515@item name
511The name of the frame. The frame name serves as a default for the frame 516The name of the frame. The frame name serves as a default for the frame
512title, if the @code{title} parameter is unspecified or @code{nil}. If 517title, if the @code{title} parameter is unspecified or @code{nil}. If
@@ -520,11 +525,13 @@ looking up X resources for the frame.
520 525
521@node Position Parameters 526@node Position Parameters
522@subsubsection Position Parameters 527@subsubsection Position Parameters
528@cindex window position on display
523 529
524 Position parameters' values are normally measured in pixels, but on 530 Position parameters' values are normally measured in pixels, but on
525text-only terminals they count characters or lines instead. 531text-only terminals they count characters or lines instead.
526 532
527@table @code 533@table @code
534@vindex left, a frame parameter
528@item left 535@item left
529The position, in pixels, of the left (or right) edge of the frame with 536The position, in pixels, of the left (or right) edge of the frame with
530respect to the left (or right) edge of the screen. The value may be: 537respect to the left (or right) edge of the screen. The value may be:
@@ -550,11 +557,13 @@ Some window managers ignore program-specified positions. If you want to
550be sure the position you specify is not ignored, specify a 557be sure the position you specify is not ignored, specify a
551non-@code{nil} value for the @code{user-position} parameter as well. 558non-@code{nil} value for the @code{user-position} parameter as well.
552 559
560@vindex top, a frame parameter
553@item top 561@item top
554The screen position of the top (or bottom) edge, in pixels, with respect 562The screen position of the top (or bottom) edge, in pixels, with respect
555to the top (or bottom) edge of the screen. It works just like 563to the top (or bottom) edge of the screen. It works just like
556@code{left}, except vertically instead of horizontally. 564@code{left}, except vertically instead of horizontally.
557 565
566@vindex icon-left, a frame parameter
558@item icon-left 567@item icon-left
559The screen position of the left edge @emph{of the frame's icon}, in 568The screen position of the left edge @emph{of the frame's icon}, in
560pixels, counting from the left edge of the screen. This takes effect if 569pixels, counting from the left edge of the screen. This takes effect if
@@ -564,11 +573,13 @@ If you specify a value for this parameter, then you must also specify
564a value for @code{icon-top} and vice versa. The window manager may 573a value for @code{icon-top} and vice versa. The window manager may
565ignore these two parameters. 574ignore these two parameters.
566 575
576@vindex icon-top, a frame parameter
567@item icon-top 577@item icon-top
568The screen position of the top edge @emph{of the frame's icon}, in 578The screen position of the top edge @emph{of the frame's icon}, in
569pixels, counting from the top edge of the screen. This takes effect if 579pixels, counting from the top edge of the screen. This takes effect if
570and when the frame is iconified. 580and when the frame is iconified.
571 581
582@vindex user-position, a frame parameter
572@item user-position 583@item user-position
573When you create a frame and specify its screen position with the 584When you create a frame and specify its screen position with the
574@code{left} and @code{top} parameters, use this parameter to say whether 585@code{left} and @code{top} parameters, use this parameter to say whether
@@ -576,6 +587,7 @@ the specified position was user-specified (explicitly requested in some
576way by a human user) or merely program-specified (chosen by a program). 587way by a human user) or merely program-specified (chosen by a program).
577A non-@code{nil} value says the position was user-specified. 588A non-@code{nil} value says the position was user-specified.
578 589
590@cindex window positions and window managers
579Window managers generally heed user-specified positions, and some heed 591Window managers generally heed user-specified positions, and some heed
580program-specified positions too. But many ignore program-specified 592program-specified positions too. But many ignore program-specified
581positions, placing the window in a default fashion or letting the user 593positions, placing the window in a default fashion or letting the user
@@ -591,24 +603,31 @@ parameters represent the user's stated preference; otherwise, use
591 603
592@node Size Parameters 604@node Size Parameters
593@subsubsection Size Parameters 605@subsubsection Size Parameters
606@cindex window size on display
594 607
595 Size parameters' values are normally measured in pixels, but on 608 Size parameters' values are normally measured in pixels, but on
596text-only terminals they count characters or lines instead. 609text-only terminals they count characters or lines instead.
597 610
598@table @code 611@table @code
612@vindex height, a frame parameter
599@item height 613@item height
600The height of the frame contents, in characters. (To get the height in 614The height of the frame contents, in characters. (To get the height in
601pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.) 615pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.)
602 616
617@vindex width, a frame parameter
603@item width 618@item width
604The width of the frame contents, in characters. (To get the width in 619The width of the frame contents, in characters. (To get the width in
605pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.) 620pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.)
606 621
622@vindex user-size, a frame parameter
607@item user-size 623@item user-size
608This does for the size parameters @code{height} and @code{width} what 624This does for the size parameters @code{height} and @code{width} what
609the @code{user-position} parameter (see above) does for the position 625the @code{user-position} parameter (@pxref{Position Parameters,
610parameters @code{top} and @code{left}. 626user-position}) does for the position parameters @code{top} and
627@code{left}.
611 628
629@cindex full-screen frames
630@vindex fullscreen, a frame parameter
612@item fullscreen 631@item fullscreen
613Specify that width, height or both shall be maximized. The value 632Specify that width, height or both shall be maximized. The value
614@code{fullwidth} specifies that width shall be as wide as possible. 633@code{fullwidth} specifies that width shall be as wide as possible.
@@ -623,33 +642,42 @@ covers the whole screen.
623 642
624@node Layout Parameters 643@node Layout Parameters
625@subsubsection Layout Parameters 644@subsubsection Layout Parameters
645@cindex layout parameters of frames
646@cindex frame layout parameters
626 647
627 These frame parameters enable or disable various parts of the 648 These frame parameters enable or disable various parts of the
628frame, or control their sizes. 649frame, or control their sizes.
629 650
630@table @code 651@table @code
652@vindex border-width, a frame parameter
631@item border-width 653@item border-width
632The width in pixels of the frame's border. 654The width in pixels of the frame's border.
633 655
656@vindex internal-border-width, a frame parameter
634@item internal-border-width 657@item internal-border-width
635The distance in pixels between text (or fringe) and the frame's border. 658The distance in pixels between text (or fringe) and the frame's border.
636 659
660@vindex vertical-scroll-bars, a frame parameter
637@item vertical-scroll-bars 661@item vertical-scroll-bars
638Whether the frame has scroll bars for vertical scrolling, and which side 662Whether the frame has scroll bars for vertical scrolling, and which side
639of the frame they should be on. The possible values are @code{left}, 663of the frame they should be on. The possible values are @code{left},
640@code{right}, and @code{nil} for no scroll bars. 664@code{right}, and @code{nil} for no scroll bars.
641 665
642@ignore 666@ignore
667@vindex horizontal-scroll-bars, a frame parameter
643@item horizontal-scroll-bars 668@item horizontal-scroll-bars
644Whether the frame has scroll bars for horizontal scrolling 669Whether the frame has scroll bars for horizontal scrolling
645(non-@code{nil} means yes). Horizontal scroll bars are not currently 670(non-@code{nil} means yes). Horizontal scroll bars are not currently
646implemented. 671implemented.
647@end ignore 672@end ignore
648 673
674@vindex scroll-bar-width, a frame parameter
649@item scroll-bar-width 675@item scroll-bar-width
650The width of vertical scroll bars, in pixels, or @code{nil} meaning to 676The width of vertical scroll bars, in pixels, or @code{nil} meaning to
651use the default width. 677use the default width.
652 678
679@vindex left-fringe, a frame parameter
680@vindex right-fringe, a frame parameter
653@item left-fringe 681@item left-fringe
654@itemx right-fringe 682@itemx right-fringe
655The default width of the left and right fringes of windows in this 683The default width of the left and right fringes of windows in this
@@ -666,22 +694,26 @@ fringe. However, you can force one fringe or the other to a precise
666width by specifying that width as a negative integer. If both widths are 694width by specifying that width as a negative integer. If both widths are
667negative, only the left fringe gets the specified width. 695negative, only the left fringe gets the specified width.
668 696
697@vindex menu-bar-lines, a frame parameter
669@item menu-bar-lines 698@item menu-bar-lines
670The number of lines to allocate at the top of the frame for a menu 699The number of lines to allocate at the top of the frame for a menu
671bar. The default is 1. A value of @code{nil} means don't display a 700bar. The default is 1. A value of @code{nil} means don't display a
672menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one 701menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one
673menu bar line; they treat larger values as 1.) 702menu bar line; they treat larger values as 1.)
674 703
704@vindex tool-bar-lines, a frame parameter
675@item tool-bar-lines 705@item tool-bar-lines
676The number of lines to use for the tool bar. A value of @code{nil} 706The number of lines to use for the tool bar. A value of @code{nil}
677means don't display a tool bar. (GTK and Nextstep allow at most one 707means don't display a tool bar. (GTK and Nextstep allow at most one
678tool bar line; they treat larger values as 1.) 708tool bar line; they treat larger values as 1.)
679 709
710@vindex tool-bar-position, a frame parameter
680@item tool-bar-position 711@item tool-bar-position
681The position of the tool bar. Currently only for the GTK tool bar. 712The position of the tool bar. Currently only for the GTK tool bar.
682Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. 713Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}.
683The default is @code{top}. 714The default is @code{top}.
684 715
716@vindex line-spacing, a frame parameter
685@item line-spacing 717@item line-spacing
686Additional space to leave below each text line, in pixels (a positive 718Additional space to leave below each text line, in pixels (a positive
687integer). @xref{Line Height}, for more information. 719integer). @xref{Line Height}, for more information.
@@ -694,6 +726,7 @@ integer). @xref{Line Height}, for more information.
694with which buffers have been, or should, be displayed in the frame. 726with which buffers have been, or should, be displayed in the frame.
695 727
696@table @code 728@table @code
729@vindex minibuffer, a frame parameter
697@item minibuffer 730@item minibuffer
698Whether this frame has its own minibuffer. The value @code{t} means 731Whether this frame has its own minibuffer. The value @code{t} means
699yes, @code{nil} means no, @code{only} means this frame is just a 732yes, @code{nil} means no, @code{only} means this frame is just a
@@ -703,6 +736,7 @@ frame), the frame uses that minibuffer.
703This frame parameter takes effect when the frame is created, and can 736This frame parameter takes effect when the frame is created, and can
704not be changed afterwards. 737not be changed afterwards.
705 738
739@vindex buffer-predicate, a frame parameter
706@item buffer-predicate 740@item buffer-predicate
707The buffer-predicate function for this frame. The function 741The buffer-predicate function for this frame. The function
708@code{other-buffer} uses this predicate (from the selected frame) to 742@code{other-buffer} uses this predicate (from the selected frame) to
@@ -711,61 +745,73 @@ decide which buffers it should consider, if the predicate is not
711each buffer; if the predicate returns a non-@code{nil} value, it 745each buffer; if the predicate returns a non-@code{nil} value, it
712considers that buffer. 746considers that buffer.
713 747
748@vindex buffer-list, a frame parameter
714@item buffer-list 749@item buffer-list
715A list of buffers that have been selected in this frame, 750A list of buffers that have been selected in this frame, ordered
716ordered most-recently-selected first. 751most-recently-selected first.
717 752
753@vindex unsplittable, a frame parameter
718@item unsplittable 754@item unsplittable
719If non-@code{nil}, this frame's window is never split automatically. 755If non-@code{nil}, this frame's window is never split automatically.
720@end table 756@end table
721 757
722@node Management Parameters 758@node Management Parameters
723@subsubsection Window Management Parameters 759@subsubsection Window Management Parameters
724@cindex window manager, and frame parameters 760@cindex window manager interaction, and frame parameters
725 761
726 These frame parameters, meaningful only on window system displays, 762 These frame parameters, meaningful only on window system displays,
727interact with the window manager. 763interact with the window manager.
728 764
729@table @code 765@table @code
766@vindex visibility, a frame parameter
730@item visibility 767@item visibility
731The state of visibility of the frame. There are three possibilities: 768The state of visibility of the frame. There are three possibilities:
732@code{nil} for invisible, @code{t} for visible, and @code{icon} for 769@code{nil} for invisible, @code{t} for visible, and @code{icon} for
733iconified. @xref{Visibility of Frames}. 770iconified. @xref{Visibility of Frames}.
734 771
772@vindex auto-raise, a frame parameter
735@item auto-raise 773@item auto-raise
736Whether selecting the frame raises it (non-@code{nil} means yes). 774Whether selecting the frame raises it (non-@code{nil} means yes).
737 775
776@vindex auto-lower, a frame parameter
738@item auto-lower 777@item auto-lower
739Whether deselecting the frame lowers it (non-@code{nil} means yes). 778Whether deselecting the frame lowers it (non-@code{nil} means yes).
740 779
780@vindex icon-type, a frame parameter
741@item icon-type 781@item icon-type
742The type of icon to use for this frame when it is iconified. If the 782The type of icon to use for this frame when it is iconified. If the
743value is a string, that specifies a file containing a bitmap to use. 783value is a string, that specifies a file containing a bitmap to use.
744Any other non-@code{nil} value specifies the default bitmap icon (a 784Any other non-@code{nil} value specifies the default bitmap icon (a
745picture of a gnu); @code{nil} specifies a text icon. 785picture of a gnu); @code{nil} specifies a text icon.
746 786
787@vindex icon-name, a frame parameter
747@item icon-name 788@item icon-name
748The name to use in the icon for this frame, when and if the icon 789The name to use in the icon for this frame, when and if the icon
749appears. If this is @code{nil}, the frame's title is used. 790appears. If this is @code{nil}, the frame's title is used.
750 791
792@vindex window-id, a frame parameter
751@item window-id 793@item window-id
752The number of the window-system window used by the frame 794The number of the window-system window used by the frame
753to contain the actual Emacs windows. 795to contain the actual Emacs windows.
754 796
797@vindex outer-window-id, a frame parameter
755@item outer-window-id 798@item outer-window-id
756The number of the outermost window-system window used for the whole frame. 799The number of the outermost window-system window used for the whole frame.
757 800
801@vindex wait-for-wm, a frame parameter
758@item wait-for-wm 802@item wait-for-wm
759If non-@code{nil}, tell Xt to wait for the window manager to confirm 803If non-@code{nil}, tell Xt to wait for the window manager to confirm
760geometry changes. Some window managers, including versions of Fvwm2 804geometry changes. Some window managers, including versions of Fvwm2
761and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to 805and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to
762prevent hanging with those window managers. 806prevent hanging with those window managers.
763 807
808@vindex sticky, a frame parameter
764@item sticky 809@item sticky
765If non-@code{nil}, the frame is visible on all virtual desktops on systems 810If non-@code{nil}, the frame is visible on all virtual desktops on systems
766with virtual desktops. 811with virtual desktops.
767 812
768@ignore 813@ignore
814@vindex parent-id, a frame parameter
769@item parent-id 815@item parent-id
770@c ??? Not yet working. 816@c ??? Not yet working.
771The X window number of the window that should be the parent of this one. 817The X window number of the window that should be the parent of this one.
@@ -777,10 +823,12 @@ it and see if it works.)
777 823
778@node Cursor Parameters 824@node Cursor Parameters
779@subsubsection Cursor Parameters 825@subsubsection Cursor Parameters
826@cindex cursor, and frame parameters
780 827
781 This frame parameter controls the way the cursor looks. 828 This frame parameter controls the way the cursor looks.
782 829
783@table @code 830@table @code
831@vindex cursor-type, a frame parameter
784@item cursor-type 832@item cursor-type
785How to display the cursor. Legitimate values are: 833How to display the cursor. Legitimate values are:
786 834
@@ -832,10 +880,12 @@ and bar becomes a narrower bar).
832 880
833@node Font and Color Parameters 881@node Font and Color Parameters
834@subsubsection Font and Color Parameters 882@subsubsection Font and Color Parameters
883@cindex font and color, frame parameters
835 884
836 These frame parameters control the use of fonts and colors. 885 These frame parameters control the use of fonts and colors.
837 886
838@table @code 887@table @code
888@vindex font-backend, a frame parameter
839@item font-backend 889@item font-backend
840A list of symbols, specifying the @dfn{font backends} to use for 890A list of symbols, specifying the @dfn{font backends} to use for
841drawing fonts in the frame, in order of priority. On X, there are 891drawing fonts in the frame, in order of priority. On X, there are
@@ -844,10 +894,12 @@ driver) and @code{xft} (the Xft font driver). On other systems, there
844is only one available font backend, so it does not make sense to 894is only one available font backend, so it does not make sense to
845modify this frame parameter. 895modify this frame parameter.
846 896
897@vindex background-mode, a frame parameter
847@item background-mode 898@item background-mode
848This parameter is either @code{dark} or @code{light}, according 899This parameter is either @code{dark} or @code{light}, according
849to whether the background color is a light one or a dark one. 900to whether the background color is a light one or a dark one.
850 901
902@vindex tty-color-mode, a frame parameter
851@item tty-color-mode 903@item tty-color-mode
852@cindex standard colors for character terminals 904@cindex standard colors for character terminals
853This parameter overrides the terminal's color support as given by the 905This parameter overrides the terminal's color support as given by the
@@ -863,6 +915,7 @@ If the parameter's value is a symbol, it specifies a number through
863the value of @code{tty-color-mode-alist}, and the associated number is 915the value of @code{tty-color-mode-alist}, and the associated number is
864used instead. 916used instead.
865 917
918@vindex screen-gamma, a frame parameter
866@item screen-gamma 919@item screen-gamma
867@cindex gamma correction 920@cindex gamma correction
868If this is a number, Emacs performs ``gamma correction'' which adjusts 921If this is a number, Emacs performs ``gamma correction'' which adjusts
@@ -882,6 +935,7 @@ If your monitor displays colors too light, you should specify a
882that makes colors darker. A screen gamma value of 1.5 may give good 935that makes colors darker. A screen gamma value of 1.5 may give good
883results for LCD color displays. 936results for LCD color displays.
884 937
938@vindex alpha, a frame parameter
885@item alpha 939@item alpha
886@cindex opacity, frame 940@cindex opacity, frame
887@cindex transparency, frame 941@cindex transparency, frame
@@ -909,37 +963,45 @@ automatically equivalent to particular face attributes of particular
909faces (@pxref{Standard Faces,,, emacs, The Emacs Manual}): 963faces (@pxref{Standard Faces,,, emacs, The Emacs Manual}):
910 964
911@table @code 965@table @code
966@vindex font, a frame parameter
912@item font 967@item font
913The name of the font for displaying text in the frame. This is a 968The name of the font for displaying text in the frame. This is a
914string, either a valid font name for your system or the name of an Emacs 969string, either a valid font name for your system or the name of an Emacs
915fontset (@pxref{Fontsets}). It is equivalent to the @code{font} 970fontset (@pxref{Fontsets}). It is equivalent to the @code{font}
916attribute of the @code{default} face. 971attribute of the @code{default} face.
917 972
973@vindex foreground-color, a frame parameter
918@item foreground-color 974@item foreground-color
919The color to use for the image of a character. It is equivalent to 975The color to use for the image of a character. It is equivalent to
920the @code{:foreground} attribute of the @code{default} face. 976the @code{:foreground} attribute of the @code{default} face.
921 977
978@vindex background-color, a frame parameter
922@item background-color 979@item background-color
923The color to use for the background of characters. It is equivalent to 980The color to use for the background of characters. It is equivalent to
924the @code{:background} attribute of the @code{default} face. 981the @code{:background} attribute of the @code{default} face.
925 982
983@vindex mouse-color, a frame parameter
926@item mouse-color 984@item mouse-color
927The color for the mouse pointer. It is equivalent to the @code{:background} 985The color for the mouse pointer. It is equivalent to the @code{:background}
928attribute of the @code{mouse} face. 986attribute of the @code{mouse} face.
929 987
988@vindex cursor-color, a frame parameter
930@item cursor-color 989@item cursor-color
931The color for the cursor that shows point. It is equivalent to the 990The color for the cursor that shows point. It is equivalent to the
932@code{:background} attribute of the @code{cursor} face. 991@code{:background} attribute of the @code{cursor} face.
933 992
993@vindex border-color, a frame parameter
934@item border-color 994@item border-color
935The color for the border of the frame. It is equivalent to the 995The color for the border of the frame. It is equivalent to the
936@code{:background} attribute of the @code{border} face. 996@code{:background} attribute of the @code{border} face.
937 997
998@vindex scroll-bar-foreground, a frame parameter
938@item scroll-bar-foreground 999@item scroll-bar-foreground
939If non-@code{nil}, the color for the foreground of scroll bars. It is 1000If non-@code{nil}, the color for the foreground of scroll bars. It is
940equivalent to the @code{:foreground} attribute of the 1001equivalent to the @code{:foreground} attribute of the
941@code{scroll-bar} face. 1002@code{scroll-bar} face.
942 1003
1004@vindex scroll-bar-background, a frame parameter
943@item scroll-bar-background 1005@item scroll-bar-background
944If non-@code{nil}, the color for the background of scroll bars. It is 1006If non-@code{nil}, the color for the background of scroll bars. It is
945equivalent to the @code{:background} attribute of the 1007equivalent to the @code{:background} attribute of the
@@ -1923,28 +1985,6 @@ with X conventions.) The default for @var{data-type} is
1923@code{STRING}. 1985@code{STRING}.
1924@end defun 1986@end defun
1925 1987
1926@cindex cut buffer
1927The X server also has a set of eight numbered @dfn{cut buffers} which can
1928store text or other data being moved between applications. Cut buffers
1929are considered obsolete, but Emacs supports them for the sake of X
1930clients that still use them. Cut buffers are numbered from 0 to 7.
1931
1932@defun x-get-cut-buffer &optional n
1933This function returns the contents of cut buffer number @var{n}.
1934If omitted @var{n} defaults to 0.
1935@end defun
1936
1937@defun x-set-cut-buffer string &optional push
1938@anchor{Definition of x-set-cut-buffer}
1939This function stores @var{string} into the first cut buffer (cut buffer
19400). If @var{push} is @code{nil}, only the first cut buffer is changed.
1941If @var{push} is non-@code{nil}, that says to move the values down
1942through the series of cut buffers, much like the way successive kills in
1943Emacs move down the kill ring. In other words, the previous value of
1944the first cut buffer moves into the second cut buffer, and the second to
1945the third, and so on through all eight cut buffers.
1946@end defun
1947
1948@defopt selection-coding-system 1988@defopt selection-coding-system
1949This variable specifies the coding system to use when reading and 1989This variable specifies the coding system to use when reading and
1950writing selections or the clipboard. @xref{Coding 1990writing selections or the clipboard. @xref{Coding
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index bbdd67fc3a5..dee2a0252eb 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -367,13 +367,6 @@ example) is read without decoding, the text of the program will be
367unibyte text, and its string constants will be unibyte strings. 367unibyte text, and its string constants will be unibyte strings.
368@xref{Coding Systems}. 368@xref{Coding Systems}.
369 369
370 To make the results more predictable, Emacs always performs decoding
371into the multibyte representation when loading Lisp files, even if it
372was started with the @samp{--unibyte} option. This means that string
373constants with non-@acronym{ASCII} characters translate into multibyte
374strings. The only exception is when a particular file specifies no
375decoding.
376
377 The reason Emacs is designed this way is so that Lisp programs give 370 The reason Emacs is designed this way is so that Lisp programs give
378predictable results, regardless of how Emacs was started. In addition, 371predictable results, regardless of how Emacs was started. In addition,
379this enables programs that depend on using multibyte text to work even 372this enables programs that depend on using multibyte text to work even
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 3953da59b93..12f16b67663 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1411,14 +1411,20 @@ The string @var{lighter} says what to display in the mode line
1411when the mode is enabled; if it is @code{nil}, the mode is not displayed 1411when the mode is enabled; if it is @code{nil}, the mode is not displayed
1412in the mode line. 1412in the mode line.
1413 1413
1414The optional argument @var{keymap} specifies the keymap for the minor mode. 1414The optional argument @var{keymap} specifies the keymap for the minor
1415It can be a variable name, whose value is the keymap, or it can be an alist 1415mode. If non-@code{nil}, it should be a variable name (whose value is
1416specifying bindings in this form: 1416a keymap), a keymap, or an alist of the form
1417 1417
1418@example 1418@example
1419(@var{key-sequence} . @var{definition}) 1419(@var{key-sequence} . @var{definition})
1420@end example 1420@end example
1421 1421
1422@noindent
1423where each @var{key-sequence} and @var{definition} are arguments
1424suitable for passing to @code{define-key} (@pxref{Changing Key
1425Bindings}). If @var{keymap} is a keymap or an alist, this also
1426defines the variable @code{@var{mode}-map}.
1427
1422The above three arguments @var{init-value}, @var{lighter}, and 1428The above three arguments @var{init-value}, @var{lighter}, and
1423@var{keymap} can be (partially) omitted when @var{keyword-args} are 1429@var{keymap} can be (partially) omitted when @var{keyword-args} are
1424used. The @var{keyword-args} consist of keywords followed by 1430used. The @var{keyword-args} consist of keywords followed by
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 00a1dffed6a..40c78d97da7 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -102,9 +102,6 @@ it contains unibyte encoded text or binary non-text data.
102 102
103You cannot set this variable directly; instead, use the function 103You cannot set this variable directly; instead, use the function
104@code{set-buffer-multibyte} to change a buffer's representation. 104@code{set-buffer-multibyte} to change a buffer's representation.
105
106The @samp{--unibyte} command line option does its job by setting the
107default value to @code{nil} early in startup.
108@end defvar 105@end defvar
109 106
110@defun position-bytes position 107@defun position-bytes position
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 1a72fdf671c..b0b0e1d0042 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -1189,8 +1189,8 @@ Syntax tables (@pxref{Syntax Tables}).
1189@node Bool-Vector Type 1189@node Bool-Vector Type
1190@subsection Bool-Vector Type 1190@subsection Bool-Vector Type
1191 1191
1192 A @dfn{bool-vector} is a one-dimensional array of elements that 1192 A @dfn{bool-vector} is a one-dimensional array whose elements must
1193must be @code{t} or @code{nil}. 1193be @code{t} or @code{nil}.
1194 1194
1195 The printed representation of a bool-vector is like a string, except 1195 The printed representation of a bool-vector is like a string, except
1196that it begins with @samp{#&} followed by the length. The string 1196that it begins with @samp{#&} followed by the length. The string
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 4f37eb10b7a..dd827234272 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -5,7 +5,7 @@
5@c Free Software Foundation, Inc. 5@c Free Software Foundation, Inc.
6@c See the file elisp.texi for copying conditions. 6@c See the file elisp.texi for copying conditions.
7@setfilename ../../info/os 7@setfilename ../../info/os
8@node System Interface, Antinews, Display, Top 8@node System Interface, Packaging, Display, Top
9@chapter Operating System Interface 9@chapter Operating System Interface
10 10
11 This chapter is about starting and getting out of Emacs, access to 11 This chapter is about starting and getting out of Emacs, access to
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
new file mode 100644
index 00000000000..138f8d934e6
--- /dev/null
+++ b/doc/lispref/package.texi
@@ -0,0 +1,197 @@
1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 2010
4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/package
7@node Packaging, Antinews, System Interface, Top
8@chapter Preparing Lisp code for distribution
9@cindex packaging
10
11 Emacs provides a standard way for Emacs Lisp code to be distributed
12to users. This approach lets users easily download, install,
13uninstall, and upgrade Lisp code that they might want to use.
14
15 A @dfn{package} is simply one or more files, formatted and bundled
16in a particular way. Typically a package includes primarily Emacs
17Lisp code, but it is possible to create other kinds of packages as
18well.
19
20@menu
21* Packaging Basics:: The basic concepts of Emacs Lisp packages.
22* Simple Packages:: How to package a single .el file.
23* Multi-file Packages:: How to package multiple files.
24@end menu
25
26@node Packaging Basics
27@section Packaging Basics
28@cindex packaging basics
29
30 A package has a few attributes:
31@cindex package attributes
32
33@table @asis
34@item Name
35A string, the name of the package. This attribute is mandatory. If
36it does not exist, the package cannot be installed by the package
37manager.
38
39@item Version
40A version number, which is anything that can be parsed by
41@code{version-to-list}. This attribute is mandatory. If it does not
42exist, the package cannot be installed by the package manager.
43
44@item Brief description
45This is shown to the user in the package menu buffer. It is just a
46single line. On a terminal with 80 characters per line, there are
47only 36 characters available in the package menu mode for showing the
48brief description, so it is best to keep it very brief. If no brief
49name is given, an empty string is used.
50
51@item Long description
52This can be a @file{README} file or the like. This is available to
53the user before the package is installed, via the package menu. It
54should more fully describe the package and its capabilities, so a user
55can read it to decide whether he wants to install the package. This
56attribute is optional.
57
58@item Dependencies
59This is a list of other packages and their minimal acceptable
60versions. This is used both at download time (to make sure all the
61needed code is available) and at activation time (to ensure a package
62is only activated if all its dependencies have been successfully
63activated). This attribute is optional.
64
65@item Manual
66A package can optionally include an Info manual.
67@end table
68
69 Conceptually, a package goes through several state transitions (in
70reality some of these transitions are grouped together):
71
72@table @asis
73@item Download
74Fetch the package from somewhere.
75
76@item Install
77Unpack the package, or write a @file{.el} file into the appropriate
78install directory. This step also includes extracting autoloads and
79byte-compiling the Emacs Lisp code.
80
81@item Activate
82Update @code{load-path} and @code{Info-directory-list} and evaluate
83the autoloads, so that the package is ready for the user to use.
84@end table
85
86 It is best for users if packages do not do too much work at
87activation time. The best approach is to have activation consist of
88some autoloads and little more.
89
90@node Simple Packages
91@section Simple Packages
92@cindex single file packages
93
94 The simplest package consists of a single Emacs Lisp source file.
95In this case, all the attributes of the package (@pxref{Packaging
96Basics}) are taken from this file.
97
98 The package system expects this @file{.el} file to conform to the
99Emacs Lisp library header conventions. @xref{Library Headers}.
100
101 The name of the package is the same as the base name of the
102@file{.el} file, as written in the first comment line. For example,
103given the header line:
104
105@smallexample
106;;; superfrobnicator.el --- frobnicate and bifurcate flanges
107@end smallexample
108
109the package name will be @samp{superfrobnicator}.
110
111 The short description of the package is also taken from the first
112line of the file.
113
114 If the file has a ``Commentary'' header, then it is used as the long
115description.
116
117 The version of the package comes either from the ``Package-Version''
118header, if it exists, or from the ``Version'' header. A package is
119required to have a version number. Each release of a package must be
120accompanied by an increase in the version number.
121
122 If the file has a ``Package-Requires'' header, then that is used as
123the package dependencies. Otherwise, the package is assumed not to
124have any dependencies.
125
126 A single-file package cannot have an Info manual.
127
128 The file will be scanned for autoload cookies at install time.
129@xref{Autoload}.
130
131@node Multi-file Packages
132@section Multi-file Packages
133@cindex multi-file packages
134
135 A multi-file package is just a @file{.tar} file. While less
136convenient to create than a single-file package, a multi-file package
137also offers more features: it can include an Info manual, multiple
138Emacs Lisp files, and also other data files needed by a package.
139
140 The contents of the @file{.tar} file must all appear beneath a
141single directory, named after the package and version. Files can
142appear in subdirectories of this top-most directory, but Emacs Lisp
143code will only be found (and thus byte-compiled) at the top-most
144level. Also, the @file{.tar} file is typically also given this same
145name. For example, if you are distributing version 1.3 of the
146superfrobnicator, the package file would be named
147``superfrobnicator-1.3.tar'' and the contents would all appear in the
148directory @file{superfrobnicator-1.3} in that @file{.tar}.
149
150 The package must include a @file{-pkg.el} file, named after the
151package. In our example above, this file would be called
152@file{superfrobnicator-pkg.el}. This file must have a single form in
153it, a call to @code{define-package}. The package dependencies and
154brief description are taken from this form.
155
156@defun define-package name version &optional docstring requirements
157Define a package. @var{name} is the name of the package, a string.
158@var{version} is the package's version, a string. It must be in a
159form that can be understood by @code{version-to-list}.
160@var{docstring} is the short description of the package.
161@var{requirements} is a list of required packages and their versions.
162@end defun
163
164 If a @file{README} file exists in the content directory, then it is
165used as the long description.
166
167 If the package has an Info manual, you should distribute the needed
168info files, plus a @file{dir} file made with @command{install-info}.
169@xref{Invoking install-info, Invoking install-info, Invoking
170install-info, texinfo, Texinfo}.
171
172 Do not include any @file{.elc} files in the package. Those will be
173created at install time. Note that there is no way to control the
174order in which files are byte-compiled; your package must be robust
175here.
176
177 The installation process will scan all the @file{.el} files in the
178package for autoload cookies. @xref{Autoload}. They are extracted
179into a @file{-autoloads.el} file (e.g.,
180@file{superfrobnicator-autoloads.el}), so do not include a file of
181that name in your package.
182
183 Any other files in the @file{.tar} file are simply unpacked when the
184package is installed. This can be useful if your package needs
185auxiliary data files --- e.g., icons or sounds.
186
187 Emacs Lisp code installed via the package manager must take special
188care to be location-independent. One easy way to do this is to make
189references to auxiliary data files relative to @var{load-file-name}.
190For example:
191
192@smallexample
193(defconst superfrobnicator-base (file-name-directory load-file-name))
194
195(defun superfrobnicator-fetch-image (file)
196 (expand-file-name file superfrobnicator-base))
197@end smallexample
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 747d865b0e1..89f97f99de3 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1273,22 +1273,24 @@ process's buffer, mimicking the actions of Emacs when there is no
1273filter. Such filter functions need to use @code{set-buffer} in order to 1273filter. Such filter functions need to use @code{set-buffer} in order to
1274be sure to insert in that buffer. To avoid setting the current buffer 1274be sure to insert in that buffer. To avoid setting the current buffer
1275semipermanently, these filter functions must save and restore the 1275semipermanently, these filter functions must save and restore the
1276current buffer. They should also update the process marker, and in some 1276current buffer. They should also check whether the buffer is still
1277cases update the value of point. Here is how to do these things: 1277alive, update the process marker, and in some cases update the value
1278of point. Here is how to do these things:
1278 1279
1279@smallexample 1280@smallexample
1280@group 1281@group
1281(defun ordinary-insertion-filter (proc string) 1282(defun ordinary-insertion-filter (proc string)
1282 (with-current-buffer (process-buffer proc) 1283 (when (buffer-live-p (process-buffer proc))
1283 (let ((moving (= (point) (process-mark proc)))) 1284 (with-current-buffer (process-buffer proc)
1285 (let ((moving (= (point) (process-mark proc))))
1284@end group 1286@end group
1285@group 1287@group
1286 (save-excursion 1288 (save-excursion
1287 ;; @r{Insert the text, advancing the process marker.} 1289 ;; @r{Insert the text, advancing the process marker.}
1288 (goto-char (process-mark proc)) 1290 (goto-char (process-mark proc))
1289 (insert string) 1291 (insert string)
1290 (set-marker (process-mark proc) (point))) 1292 (set-marker (process-mark proc) (point)))
1291 (if moving (goto-char (process-mark proc)))))) 1293 (if moving (goto-char (process-mark proc)))))))
1292@end group 1294@end group
1293@end smallexample 1295@end smallexample
1294 1296
@@ -1315,12 +1317,6 @@ expression searching or matching had to explicitly save and restore the
1315match data. Now Emacs does this automatically for filter functions; 1317match data. Now Emacs does this automatically for filter functions;
1316they never need to do it explicitly. @xref{Match Data}. 1318they never need to do it explicitly. @xref{Match Data}.
1317 1319
1318 A filter function that writes the output into the buffer of the
1319process should check whether the buffer is still alive. If it tries to
1320insert into a dead buffer, it will get an error. The expression
1321@code{(buffer-name (process-buffer @var{process}))} returns @code{nil}
1322if the buffer is dead.
1323
1324 The output to the function may come in chunks of any size. A program 1320 The output to the function may come in chunks of any size. A program
1325that produces the same output twice in a row may send it as one batch of 1321that produces the same output twice in a row may send it as one batch of
1326200 characters one time, and five batches of 40 characters the next. If 1322200 characters one time, and five batches of 40 characters the next. If
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 9add9b76e79..a608db16f89 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -292,19 +292,21 @@ identifying them as generic string delimiters.
292@cindex syntax flags 292@cindex syntax flags
293 293
294 In addition to the classes, entries for characters in a syntax table 294 In addition to the classes, entries for characters in a syntax table
295can specify flags. There are seven possible flags, represented by the 295can specify flags. There are eight possible flags, represented by the
296characters @samp{1}, @samp{2}, @samp{3}, @samp{4}, @samp{b}, @samp{n}, 296characters @samp{1}, @samp{2}, @samp{3}, @samp{4}, @samp{b}, @samp{c},
297and @samp{p}. 297@samp{n}, and @samp{p}.
298 298
299 All the flags except @samp{n} and @samp{p} are used to describe 299 All the flags except @samp{p} are used to describe comment
300multi-character comment delimiters. The digit flags indicate that a 300delimiters. The digit flags are used for comment delimiters made up
301character can @emph{also} be part of a comment sequence, in addition to 301of 2 characters. They indicate that a character can @emph{also} be
302the syntactic properties associated with its character class. The flags 302part of a comment sequence, in addition to the syntactic properties
303are independent of the class and each other for the sake of characters 303associated with its character class. The flags are independent of the
304such as @samp{*} in C mode, which is a punctuation character, @emph{and} 304class and each other for the sake of characters such as @samp{*} in
305the second character of a start-of-comment sequence (@samp{/*}), 305C mode, which is a punctuation character, @emph{and} the second
306@emph{and} the first character of an end-of-comment sequence 306character of a start-of-comment sequence (@samp{/*}), @emph{and} the
307(@samp{*/}). 307first character of an end-of-comment sequence (@samp{*/}). The flags
308@samp{b}, @samp{c}, and @samp{n} are used to qualify the corresponding
309comment delimiter.
308 310
309 Here is a table of the possible flags for a character @var{c}, 311 Here is a table of the possible flags for a character @var{c},
310and what they mean: 312and what they mean:
@@ -325,63 +327,62 @@ sequence.
325@samp{4} means @var{c} is the second character of such a sequence. 327@samp{4} means @var{c} is the second character of such a sequence.
326 328
327@item 329@item
328@c Emacs 19 feature
329@samp{b} means that @var{c} as a comment delimiter belongs to the 330@samp{b} means that @var{c} as a comment delimiter belongs to the
330alternative ``b'' comment style. 331alternative ``b'' comment style. For a two-character comment starter,
332this flag is only significant on the second char, and for a 2-character
333comment ender it is only significant on the first char.
331 334
332Emacs supports two comment styles simultaneously in any one syntax 335@item
333table. This is for the sake of C++. Each style of comment syntax has 336@samp{c} means that @var{c} as a comment delimiter belongs to the
334its own comment-start sequence and its own comment-end sequence. Each 337alternative ``c'' comment style. For a two-character comment
335comment must stick to one style or the other; thus, if it starts with 338delimiter, @samp{c} on either character makes it of style ``c''.
336the comment-start sequence of style ``b,'' it must also end with the
337comment-end sequence of style ``b.''
338 339
339The two comment-start sequences must begin with the same character; only 340@item
340the second character may differ. Mark the second character of the 341@samp{n} on a comment delimiter character specifies
341``b''-style comment-start sequence with the @samp{b} flag. 342that this kind of comment can be nested. For a two-character
343comment delimiter, @samp{n} on either character makes it
344nestable.
342 345
343A comment-end sequence (one or two characters) applies to the ``b'' 346Emacs supports several comment styles simultaneously in any one syntax
344style if its first character has the @samp{b} flag set; otherwise, it 347table. A comment style is a set of flags @samp{b}, @samp{c}, and
345applies to the ``a'' style. 348@samp{n}, so there can be up to 8 different comment styles.
349Each comment delimiter has a style and only matches comment delimiters
350of the same style. Thus if a comment starts with the comment-start
351sequence of style ``bn'', it will extend until the next matching
352comment-end sequence of style ``bn''.
346 353
347The appropriate comment syntax settings for C++ are as follows: 354The appropriate comment syntax settings for C++ can be as follows:
348 355
349@table @asis 356@table @asis
350@item @samp{/} 357@item @samp{/}
351@samp{124b} 358@samp{124}
352@item @samp{*} 359@item @samp{*}
353@samp{23} 360@samp{23b}
354@item newline 361@item newline
355@samp{>b} 362@samp{>}
356@end table 363@end table
357 364
358This defines four comment-delimiting sequences: 365This defines four comment-delimiting sequences:
359 366
360@table @asis 367@table @asis
361@item @samp{/*} 368@item @samp{/*}
362This is a comment-start sequence for ``a'' style because the 369This is a comment-start sequence for ``b'' style because the
363second character, @samp{*}, does not have the @samp{b} flag. 370second character, @samp{*}, has the @samp{b} flag.
364 371
365@item @samp{//} 372@item @samp{//}
366This is a comment-start sequence for ``b'' style because the second 373This is a comment-start sequence for ``a'' style because the second
367character, @samp{/}, does have the @samp{b} flag. 374character, @samp{/}, does not have the @samp{b} flag.
368 375
369@item @samp{*/} 376@item @samp{*/}
370This is a comment-end sequence for ``a'' style because the first 377This is a comment-end sequence for ``b'' style because the first
371character, @samp{*}, does not have the @samp{b} flag. 378character, @samp{*}, does have the @samp{b} flag.
372 379
373@item newline 380@item newline
374This is a comment-end sequence for ``b'' style, because the newline 381This is a comment-end sequence for ``a'' style, because the newline
375character has the @samp{b} flag. 382character does not have the @samp{b} flag.
376@end table 383@end table
377 384
378@item 385@item
379@samp{n} on a comment delimiter character specifies
380that this kind of comment can be nested. For a two-character
381comment delimiter, @samp{n} on either character makes it
382nestable.
383
384@item
385@c Emacs 19 feature 386@c Emacs 19 feature
386@samp{p} identifies an additional ``prefix character'' for Lisp syntax. 387@samp{p} identifies an additional ``prefix character'' for Lisp syntax.
387These characters are treated as whitespace when they appear between 388These characters are treated as whitespace when they appear between
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index a7c4a3e62f4..ff4e65d299f 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -59,6 +59,7 @@ the character after point.
59 position stored in a register. 59 position stored in a register.
60* Base 64:: Conversion to or from base 64 encoding. 60* Base 64:: Conversion to or from base 64 encoding.
61* MD5 Checksum:: Compute the MD5 "message digest"/"checksum". 61* MD5 Checksum:: Compute the MD5 "message digest"/"checksum".
62* Parsing HTML:: Parsing HTML and XML.
62* Atomic Changes:: Installing several buffer changes "atomically". 63* Atomic Changes:: Installing several buffer changes "atomically".
63* Change Hooks:: Supplying functions to be run when text is changed. 64* Change Hooks:: Supplying functions to be run when text is changed.
64@end menu 65@end menu
@@ -1126,16 +1127,13 @@ use @code{string=} to compare it with the last text Emacs provided.)
1126@defvar interprogram-cut-function 1127@defvar interprogram-cut-function
1127This variable provides a way of communicating killed text to other 1128This variable provides a way of communicating killed text to other
1128programs, when you are using a window system. Its value should be 1129programs, when you are using a window system. Its value should be
1129@code{nil} or a function of one required and one optional argument. 1130@code{nil} or a function of one required argument.
1130 1131
1131If the value is a function, @code{kill-new} and @code{kill-append} call 1132If the value is a function, @code{kill-new} and @code{kill-append} call
1132it with the new first element of the kill ring as the first argument. 1133it with the new first element of the kill ring as the argument.
1133The second, optional, argument has the same meaning as the @var{push}
1134argument to @code{x-set-cut-buffer} (@pxref{Definition of
1135x-set-cut-buffer}) and only affects the second and later cut buffers.
1136 1134
1137The normal use of this function is to set the window system's primary 1135The normal use of this function is to set the window system's primary
1138selection (and first cut buffer) from the newly killed text. 1136selection from the newly killed text.
1139@xref{Window System Selections}. 1137@xref{Window System Selections}.
1140@end defvar 1138@end defvar
1141 1139
@@ -4109,6 +4107,49 @@ using the specified or chosen coding system. However, if
4109coding instead. 4107coding instead.
4110@end defun 4108@end defun
4111 4109
4110@node Parsing HTML
4111@section Parsing HTML
4112@cindex parsing html
4113@cindex parsing xml
4114
4115Emacs provides an interface to the @code{libxml2} library via two
4116functions: @code{html-parse-buffer} and @code{xml-parse-buffer}. The
4117HTML function will parse ``real world'' HTML and try to return a
4118sensible parse tree, while the XML function is somewhat stricter about
4119syntax.
4120
4121They both take a two optional parameter. The first is a buffer, and
4122the second is a base URL to be used to expand relative URLs in the
4123document, if any.
4124
4125Here's an example demonstrating the structure of the parsed data you
4126get out. Given this HTML document:
4127
4128@example
4129<html><hEad></head><body width=101><div class=thing>Foo<div>Yes
4130@end example
4131
4132You get this parse tree:
4133
4134@example
4135(html
4136 (head)
4137 (body
4138 (:width . "101")
4139 (div
4140 (:class . "thing")
4141 (text . "Foo")
4142 (div
4143 (text . "Yes\n")))))
4144@end example
4145
4146It's a simple tree structure, where the @code{car} for each node is
4147the name of the node, and the @code{cdr} is the value, or the list of
4148values.
4149
4150Attributes are coded the same way as child nodes, but with @samp{:} as
4151the first character.
4152
4112@node Atomic Changes 4153@node Atomic Changes
4113@section Atomic Change Groups 4154@section Atomic Change Groups
4114@cindex atomic changes 4155@cindex atomic changes
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index de281b0e147..bf3afcf53ee 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -1052,6 +1052,31 @@ Please use that command to see a list of the meaningful keywords.
1052This field is important; it's how people will find your package when 1052This field is important; it's how people will find your package when
1053they're looking for things by topic area. To separate the keywords, you 1053they're looking for things by topic area. To separate the keywords, you
1054can use spaces, commas, or both. 1054can use spaces, commas, or both.
1055
1056@item Package-Version
1057If @samp{Version} is not suitable for use by the package manager, then
1058a package can define @samp{Package-Version}; it will be used instead.
1059This is handy if @samp{Version} is an RCS id or something else that
1060cannot be parsed by @code{version-to-list}. @xref{Packaging Basics}.
1061
1062@item Package-Requires
1063If this exists, it names packages on which the current package depends
1064for proper operation. @xref{Packaging Basics}. This is used by the
1065package manager both at download time (to ensure that a complete set
1066of packages is downloaded) and at activation time (to ensure that a
1067package is activated if and only if all its dependencies have been).
1068
1069Its format is a list of lists. The @code{car} of each sub-list is the
1070name of a package, as a symbol. The @code{cadr} of each sub-list is
1071the minimum acceptable version number, as a string. For instance:
1072
1073@smallexample
1074;; Package-Requires: ((gnus "1.0") (bubbles "2.7.2"))
1075@end smallexample
1076
1077The package code automatically defines a package named @samp{emacs}
1078with the version number of the currently running Emacs. This can be
1079used to require a minimal version of Emacs for a package.
1055@end table 1080@end table
1056 1081
1057 Just about every Lisp library ought to have the @samp{Author} and 1082 Just about every Lisp library ought to have the @samp{Author} and
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 4c0ae27c043..cbc26ebcec6 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -180,6 +180,8 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
180* System Interface:: Getting the user id, system type, environment 180* System Interface:: Getting the user id, system type, environment
181 variables, and other such things. 181 variables, and other such things.
182 182
183* Packaging:: Preparing Lisp code for distribution.
184
183Appendices 185Appendices
184 186
185* Antinews:: Info for users downgrading to Emacs 22. 187* Antinews:: Info for users downgrading to Emacs 22.
@@ -1415,6 +1417,12 @@ Operating System Interface
1415* Session Management:: Saving and restoring state with 1417* Session Management:: Saving and restoring state with
1416 X Session Management. 1418 X Session Management.
1417 1419
1420Preparing Lisp code for distribution
1421
1422* Packaging Basics:: The basic concepts of Emacs Lisp packages.
1423* Simple Packages:: How to package a single .el file.
1424* Multi-file Packages:: How to package multiple files.
1425
1418Starting Up Emacs 1426Starting Up Emacs
1419 1427
1420* Startup Summary:: Sequence of actions Emacs performs at startup. 1428* Startup Summary:: Sequence of actions Emacs performs at startup.
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 195b89ce3f6..44052e5bd5d 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -179,6 +179,8 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
179* System Interface:: Getting the user id, system type, environment 179* System Interface:: Getting the user id, system type, environment
180 variables, and other such things. 180 variables, and other such things.
181 181
182* Packaging:: Preparing Lisp code for distribution.
183
182Appendices 184Appendices
183 185
184* Antinews:: Info for users downgrading to Emacs 22. 186* Antinews:: Info for users downgrading to Emacs 22.
@@ -1414,6 +1416,12 @@ Operating System Interface
1414* Session Management:: Saving and restoring state with 1416* Session Management:: Saving and restoring state with
1415 X Session Management. 1417 X Session Management.
1416 1418
1419Preparing Lisp code for distribution
1420
1421* Packaging Basics:: The basic concepts of Emacs Lisp packages.
1422* Simple Packages:: How to package a single .el file.
1423* Multi-file Packages:: How to package multiple files.
1424
1417Starting Up Emacs 1425Starting Up Emacs
1418 1426
1419* Startup Summary:: Sequence of actions Emacs performs at startup. 1427* Startup Summary:: Sequence of actions Emacs performs at startup.