diff options
| author | Stefan Monnier | 2010-09-13 16:40:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-09-13 16:40:48 +0200 |
| commit | cc390e46c7ba95b76ea133d98fd386214cd01709 (patch) | |
| tree | ead4400d22bd07214b782ff7e46e79d473fac419 /doc/lispref | |
| parent | c566235d981eba73c88bbff00b6a1d88360b6e9f (diff) | |
| parent | c5fe4acb5fb456d6e8e147d8bc7981ce56c5c03d (diff) | |
| download | emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.tar.gz emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.zip | |
Merge from trunk
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 69 | ||||
| -rw-r--r-- | doc/lispref/anti.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/compile.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 59 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 94 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/objects.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/package.texi | 197 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 28 | ||||
| -rw-r--r-- | doc/lispref/syntax.texi | 91 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 53 | ||||
| -rw-r--r-- | doc/lispref/tips.texi | 25 | ||||
| -rw-r--r-- | doc/lispref/vol1.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/vol2.texi | 8 |
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 @@ | |||
| 1 | 2010-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * syntax.texi (Syntax Flags): Document new `c' flag. | ||
| 4 | |||
| 5 | 2010-09-09 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * display.texi (ImageMagick Images): General cleanup. | ||
| 8 | |||
| 9 | 2010-09-06 Alexander Klimov <alserkli@inbox.ru> (tiny change) | ||
| 10 | |||
| 11 | * files.texi (Directory Names): Use \` rather than ^. | ||
| 12 | |||
| 13 | 2010-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 | |||
| 19 | 2010-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 | |||
| 29 | 2010-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 | |||
| 40 | 2010-08-25 Eli Zaretskii <eliz@gnu.org> | ||
| 41 | |||
| 42 | * processes.texi (Filter Functions): Fix last change. | ||
| 43 | |||
| 44 | 2010-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 | |||
| 50 | 2010-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 | |||
| 57 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 58 | |||
| 59 | * modes.texi (Defining Minor Modes): Doc fix (Bug#6880). | ||
| 60 | |||
| 61 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 62 | |||
| 63 | * objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878). | ||
| 64 | |||
| 65 | 2010-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 | |||
| 1 | 2010-08-08 Christoph <cschol2112@googlemail.com> | 70 | 2010-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 | |||
| 1616 | usual meaning is a kind of scroll or zoom. | 1616 | usual meaning is a kind of scroll or zoom. |
| 1617 | 1617 | ||
| 1618 | The element @var{position} is a list describing the position of the | 1618 | The element @var{position} is a list describing the position of the |
| 1619 | event, in the same format as used in a mouse-click event. | 1619 | event, in the same format as used in a mouse-click event (@pxref{Click |
| 1620 | Events}). | ||
| 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 | |||
| 1633 | dropped onto an Emacs frame. | 1634 | dropped onto an Emacs frame. |
| 1634 | 1635 | ||
| 1635 | The element @var{position} is a list describing the position of the | 1636 | The element @var{position} is a list describing the position of the |
| 1636 | event, in the same format as used in a mouse-click event, and | 1637 | event, 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. | 1638 | Events}), and @var{files} is the list of file names that were dragged |
| 1638 | The usual way to handle this event is by visiting these files. | 1639 | and dropped. The usual way to handle this event is by visiting these |
| 1640 | files. | ||
| 1639 | 1641 | ||
| 1640 | This kind of event is generated, at present, only on some kinds of | 1642 | This kind of event is generated, at present, only on some kinds of |
| 1641 | systems. | 1643 | systems. |
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 | |||
| 22 | transportable from machine to machine without recompilation. It is not, | 22 | transportable from machine to machine without recompilation. It is not, |
| 23 | however, as fast as true compiled code. | 23 | however, as fast as true compiled code. |
| 24 | 24 | ||
| 25 | Compiling a Lisp file with the Emacs byte compiler always reads the | ||
| 26 | file as multibyte text, even if Emacs was started with @samp{--unibyte}, | ||
| 27 | unless the file specifies otherwise. This is so that compilation gives | ||
| 28 | results 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 |
| 32 | by recent earlier versions of Emacs, but the reverse is not true. | 26 | by 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 |
| 3215 | buffer in a window. If you change them while the buffer is visible, | 3215 | buffer in a window. If you change them while the buffer is visible, |
| 3216 | you can call @code{set-window-buffer} to display it once again in the | 3216 | you can call @code{set-window-buffer} to display it once again in the |
| 3217 | same window, to make the changes take effect. | 3217 | same window, to make the changes take effect. A buffer that does not |
| 3218 | specify values for these variables will use the default values | ||
| 3219 | specified 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 |
| 3220 | This function sets the fringe widths of window @var{window}. | 3222 | This 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}) | ||
| 4475 | support, you can use the ImageMagick library to load many image formats. | ||
| 4476 | |||
| 4477 | @findex imagemagick-types | ||
| 4478 | The function @code{imagemagick-types} returns a list of image file | ||
| 4479 | extensions that your installation of ImageMagick supports. To enable | ||
| 4480 | support, you must call the function @code{imagemagick-register-types}. | ||
| 4481 | |||
| 4482 | @vindex imagemagick-types-inhibit | ||
| 4483 | The variable @code{imagemagick-types-inhibit} specifies a list of | ||
| 4484 | image types that you do @emph{not} want ImageMagick to handle. There | ||
| 4485 | may be overlap between image loaders in your Emacs installation, and | ||
| 4486 | you may prefer to use a different one for a given image type (which | ||
| 4487 | @c FIXME how is this priority determined? | ||
| 4488 | loader 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? | ||
| 4491 | For example, if you never want to use the ImageMagick loader to use | ||
| 4492 | JPEG files, add @code{JPG} to this list. | ||
| 4493 | |||
| 4494 | @vindex imagemagick-render-type | ||
| 4495 | You can set the variable @code{imagemagick-render-type} to choose | ||
| 4496 | between screen render methods for the ImageMagick loader. The options | ||
| 4497 | are: @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"? | ||
| 4500 | ImageMagick versions (it is a bit slow, but robust); and @code{1}, | ||
| 4501 | a newer ImageMagick method. | ||
| 4502 | |||
| 4503 | Images loaded with ImageMagick support a few new display specifications: | ||
| 4504 | |||
| 4505 | @table @code | ||
| 4506 | @item :width, :height | ||
| 4507 | The @code{:width} and @code{:height} keywords are used for scaling the | ||
| 4508 | image. If only one of them is specified, the other one will be | ||
| 4509 | calculated so as to preserve the aspect ratio. If both are specified, | ||
| 4510 | aspect ratio may not be preserved. | ||
| 4511 | |||
| 4512 | @item :rotation | ||
| 4513 | Specifies a rotation angle in degrees. | ||
| 4514 | |||
| 4515 | @item :index | ||
| 4516 | Specifies which image to view inside an image bundle file format, such | ||
| 4517 | as TIFF or DJVM. You can use the @code{image-metadata} function to | ||
| 4518 | retrieve the total number of images in an image bundle (this is | ||
| 4519 | similar 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 | |||
| 162 | Appendices | 164 | Appendices |
| 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 | ||
| 1400 | Preparing 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 | |||
| 1398 | Starting Up Emacs | 1406 | Starting 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 | |||
| 1933 | abbreviations to use for file directories. Each element has the form | 1933 | abbreviations 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 |
| 1936 | actually a regular expression; it should always start with @samp{^}. | 1936 | actually a regular expression; it should always start with @samp{\`}. |
| 1937 | The @var{to} string should be an ordinary absolute directory name. Do | 1937 | The @var{to} string should be an ordinary absolute directory name. Do |
| 1938 | not use @samp{~} to stand for a home directory in that string. The | 1938 | not use @samp{~} to stand for a home directory in that string. The |
| 1939 | function @code{abbreviate-file-name} performs these substitutions. | 1939 | function @code{abbreviate-file-name} performs these substitutions. |
| @@ -1946,9 +1946,9 @@ and so on are normally accessed through symbolic links named @file{/fsf} | |||
| 1946 | and so on. | 1946 | and 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 |
| 466 | it uses. This section describes the parameters that have special | 467 | it uses. This section describes the parameters that have special |
| @@ -489,16 +490,19 @@ terminal frames. | |||
| 489 | frame. @code{title} and @code{name} are meaningful on all terminals. | 490 | frame. @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 |
| 493 | The display on which to open this frame. It should be a string of the | 495 | The display on which to open this frame. It should be a string of the |
| 494 | form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the | 496 | form @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 |
| 498 | This parameter describes the range of possible colors that can be used | 501 | This parameter describes the range of possible colors that can be used |
| 499 | in this frame. Its value is @code{color}, @code{grayscale} or | 502 | in 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 |
| 503 | If a frame has a non-@code{nil} title, it appears in the window | 507 | If a frame has a non-@code{nil} title, it appears in the window |
| 504 | system's title bar at the top of the frame, and also in the mode line | 508 | system'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 | |||
| 507 | Emacs is not using a window system, and can only display one frame at | 511 | Emacs is not using a window system, and can only display one frame at |
| 508 | a time. @xref{Frame Titles}. | 512 | a time. @xref{Frame Titles}. |
| 509 | 513 | ||
| 514 | @vindex name, a frame parameter | ||
| 510 | @item name | 515 | @item name |
| 511 | The name of the frame. The frame name serves as a default for the frame | 516 | The name of the frame. The frame name serves as a default for the frame |
| 512 | title, if the @code{title} parameter is unspecified or @code{nil}. If | 517 | title, 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 |
| 525 | text-only terminals they count characters or lines instead. | 531 | text-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 |
| 529 | The position, in pixels, of the left (or right) edge of the frame with | 536 | The position, in pixels, of the left (or right) edge of the frame with |
| 530 | respect to the left (or right) edge of the screen. The value may be: | 537 | respect 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 | |||
| 550 | be sure the position you specify is not ignored, specify a | 557 | be sure the position you specify is not ignored, specify a |
| 551 | non-@code{nil} value for the @code{user-position} parameter as well. | 558 | non-@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 |
| 554 | The screen position of the top (or bottom) edge, in pixels, with respect | 562 | The screen position of the top (or bottom) edge, in pixels, with respect |
| 555 | to the top (or bottom) edge of the screen. It works just like | 563 | to 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 |
| 559 | The screen position of the left edge @emph{of the frame's icon}, in | 568 | The screen position of the left edge @emph{of the frame's icon}, in |
| 560 | pixels, counting from the left edge of the screen. This takes effect if | 569 | pixels, 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 | |||
| 564 | a value for @code{icon-top} and vice versa. The window manager may | 573 | a value for @code{icon-top} and vice versa. The window manager may |
| 565 | ignore these two parameters. | 574 | ignore these two parameters. |
| 566 | 575 | ||
| 576 | @vindex icon-top, a frame parameter | ||
| 567 | @item icon-top | 577 | @item icon-top |
| 568 | The screen position of the top edge @emph{of the frame's icon}, in | 578 | The screen position of the top edge @emph{of the frame's icon}, in |
| 569 | pixels, counting from the top edge of the screen. This takes effect if | 579 | pixels, counting from the top edge of the screen. This takes effect if |
| 570 | and when the frame is iconified. | 580 | and when the frame is iconified. |
| 571 | 581 | ||
| 582 | @vindex user-position, a frame parameter | ||
| 572 | @item user-position | 583 | @item user-position |
| 573 | When you create a frame and specify its screen position with the | 584 | When 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 | |||
| 576 | way by a human user) or merely program-specified (chosen by a program). | 587 | way by a human user) or merely program-specified (chosen by a program). |
| 577 | A non-@code{nil} value says the position was user-specified. | 588 | A non-@code{nil} value says the position was user-specified. |
| 578 | 589 | ||
| 590 | @cindex window positions and window managers | ||
| 579 | Window managers generally heed user-specified positions, and some heed | 591 | Window managers generally heed user-specified positions, and some heed |
| 580 | program-specified positions too. But many ignore program-specified | 592 | program-specified positions too. But many ignore program-specified |
| 581 | positions, placing the window in a default fashion or letting the user | 593 | positions, 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 |
| 596 | text-only terminals they count characters or lines instead. | 609 | text-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 |
| 600 | The height of the frame contents, in characters. (To get the height in | 614 | The height of the frame contents, in characters. (To get the height in |
| 601 | pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.) | 615 | pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.) |
| 602 | 616 | ||
| 617 | @vindex width, a frame parameter | ||
| 603 | @item width | 618 | @item width |
| 604 | The width of the frame contents, in characters. (To get the width in | 619 | The width of the frame contents, in characters. (To get the width in |
| 605 | pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.) | 620 | pixels, 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 |
| 608 | This does for the size parameters @code{height} and @code{width} what | 624 | This does for the size parameters @code{height} and @code{width} what |
| 609 | the @code{user-position} parameter (see above) does for the position | 625 | the @code{user-position} parameter (@pxref{Position Parameters, |
| 610 | parameters @code{top} and @code{left}. | 626 | user-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 |
| 613 | Specify that width, height or both shall be maximized. The value | 632 | Specify 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 |
| 628 | frame, or control their sizes. | 649 | frame, 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 |
| 632 | The width in pixels of the frame's border. | 654 | The 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 |
| 635 | The distance in pixels between text (or fringe) and the frame's border. | 658 | The 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 |
| 638 | Whether the frame has scroll bars for vertical scrolling, and which side | 662 | Whether the frame has scroll bars for vertical scrolling, and which side |
| 639 | of the frame they should be on. The possible values are @code{left}, | 663 | of 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 |
| 644 | Whether the frame has scroll bars for horizontal scrolling | 669 | Whether 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 |
| 646 | implemented. | 671 | implemented. |
| 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 |
| 650 | The width of vertical scroll bars, in pixels, or @code{nil} meaning to | 676 | The width of vertical scroll bars, in pixels, or @code{nil} meaning to |
| 651 | use the default width. | 677 | use 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 |
| 655 | The default width of the left and right fringes of windows in this | 683 | The 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 | |||
| 666 | width by specifying that width as a negative integer. If both widths are | 694 | width by specifying that width as a negative integer. If both widths are |
| 667 | negative, only the left fringe gets the specified width. | 695 | negative, 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 |
| 670 | The number of lines to allocate at the top of the frame for a menu | 699 | The number of lines to allocate at the top of the frame for a menu |
| 671 | bar. The default is 1. A value of @code{nil} means don't display a | 700 | bar. The default is 1. A value of @code{nil} means don't display a |
| 672 | menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one | 701 | menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one |
| 673 | menu bar line; they treat larger values as 1.) | 702 | menu 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 |
| 676 | The number of lines to use for the tool bar. A value of @code{nil} | 706 | The number of lines to use for the tool bar. A value of @code{nil} |
| 677 | means don't display a tool bar. (GTK and Nextstep allow at most one | 707 | means don't display a tool bar. (GTK and Nextstep allow at most one |
| 678 | tool bar line; they treat larger values as 1.) | 708 | tool 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 |
| 681 | The position of the tool bar. Currently only for the GTK tool bar. | 712 | The position of the tool bar. Currently only for the GTK tool bar. |
| 682 | Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. | 713 | Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. |
| 683 | The default is @code{top}. | 714 | The default is @code{top}. |
| 684 | 715 | ||
| 716 | @vindex line-spacing, a frame parameter | ||
| 685 | @item line-spacing | 717 | @item line-spacing |
| 686 | Additional space to leave below each text line, in pixels (a positive | 718 | Additional space to leave below each text line, in pixels (a positive |
| 687 | integer). @xref{Line Height}, for more information. | 719 | integer). @xref{Line Height}, for more information. |
| @@ -694,6 +726,7 @@ integer). @xref{Line Height}, for more information. | |||
| 694 | with which buffers have been, or should, be displayed in the frame. | 726 | with 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 |
| 698 | Whether this frame has its own minibuffer. The value @code{t} means | 731 | Whether this frame has its own minibuffer. The value @code{t} means |
| 699 | yes, @code{nil} means no, @code{only} means this frame is just a | 732 | yes, @code{nil} means no, @code{only} means this frame is just a |
| @@ -703,6 +736,7 @@ frame), the frame uses that minibuffer. | |||
| 703 | This frame parameter takes effect when the frame is created, and can | 736 | This frame parameter takes effect when the frame is created, and can |
| 704 | not be changed afterwards. | 737 | not be changed afterwards. |
| 705 | 738 | ||
| 739 | @vindex buffer-predicate, a frame parameter | ||
| 706 | @item buffer-predicate | 740 | @item buffer-predicate |
| 707 | The buffer-predicate function for this frame. The function | 741 | The 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 | |||
| 711 | each buffer; if the predicate returns a non-@code{nil} value, it | 745 | each buffer; if the predicate returns a non-@code{nil} value, it |
| 712 | considers that buffer. | 746 | considers that buffer. |
| 713 | 747 | ||
| 748 | @vindex buffer-list, a frame parameter | ||
| 714 | @item buffer-list | 749 | @item buffer-list |
| 715 | A list of buffers that have been selected in this frame, | 750 | A list of buffers that have been selected in this frame, ordered |
| 716 | ordered most-recently-selected first. | 751 | most-recently-selected first. |
| 717 | 752 | ||
| 753 | @vindex unsplittable, a frame parameter | ||
| 718 | @item unsplittable | 754 | @item unsplittable |
| 719 | If non-@code{nil}, this frame's window is never split automatically. | 755 | If 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, |
| 727 | interact with the window manager. | 763 | interact with the window manager. |
| 728 | 764 | ||
| 729 | @table @code | 765 | @table @code |
| 766 | @vindex visibility, a frame parameter | ||
| 730 | @item visibility | 767 | @item visibility |
| 731 | The state of visibility of the frame. There are three possibilities: | 768 | The 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 |
| 733 | iconified. @xref{Visibility of Frames}. | 770 | iconified. @xref{Visibility of Frames}. |
| 734 | 771 | ||
| 772 | @vindex auto-raise, a frame parameter | ||
| 735 | @item auto-raise | 773 | @item auto-raise |
| 736 | Whether selecting the frame raises it (non-@code{nil} means yes). | 774 | Whether 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 |
| 739 | Whether deselecting the frame lowers it (non-@code{nil} means yes). | 778 | Whether 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 |
| 742 | The type of icon to use for this frame when it is iconified. If the | 782 | The type of icon to use for this frame when it is iconified. If the |
| 743 | value is a string, that specifies a file containing a bitmap to use. | 783 | value is a string, that specifies a file containing a bitmap to use. |
| 744 | Any other non-@code{nil} value specifies the default bitmap icon (a | 784 | Any other non-@code{nil} value specifies the default bitmap icon (a |
| 745 | picture of a gnu); @code{nil} specifies a text icon. | 785 | picture 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 |
| 748 | The name to use in the icon for this frame, when and if the icon | 789 | The name to use in the icon for this frame, when and if the icon |
| 749 | appears. If this is @code{nil}, the frame's title is used. | 790 | appears. 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 |
| 752 | The number of the window-system window used by the frame | 794 | The number of the window-system window used by the frame |
| 753 | to contain the actual Emacs windows. | 795 | to 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 |
| 756 | The number of the outermost window-system window used for the whole frame. | 799 | The 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 |
| 759 | If non-@code{nil}, tell Xt to wait for the window manager to confirm | 803 | If non-@code{nil}, tell Xt to wait for the window manager to confirm |
| 760 | geometry changes. Some window managers, including versions of Fvwm2 | 804 | geometry changes. Some window managers, including versions of Fvwm2 |
| 761 | and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to | 805 | and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to |
| 762 | prevent hanging with those window managers. | 806 | prevent hanging with those window managers. |
| 763 | 807 | ||
| 808 | @vindex sticky, a frame parameter | ||
| 764 | @item sticky | 809 | @item sticky |
| 765 | If non-@code{nil}, the frame is visible on all virtual desktops on systems | 810 | If non-@code{nil}, the frame is visible on all virtual desktops on systems |
| 766 | with virtual desktops. | 811 | with 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. |
| 771 | The X window number of the window that should be the parent of this one. | 817 | The 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 |
| 785 | How to display the cursor. Legitimate values are: | 833 | How 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 |
| 840 | A list of symbols, specifying the @dfn{font backends} to use for | 890 | A list of symbols, specifying the @dfn{font backends} to use for |
| 841 | drawing fonts in the frame, in order of priority. On X, there are | 891 | drawing 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 | |||
| 844 | is only one available font backend, so it does not make sense to | 894 | is only one available font backend, so it does not make sense to |
| 845 | modify this frame parameter. | 895 | modify this frame parameter. |
| 846 | 896 | ||
| 897 | @vindex background-mode, a frame parameter | ||
| 847 | @item background-mode | 898 | @item background-mode |
| 848 | This parameter is either @code{dark} or @code{light}, according | 899 | This parameter is either @code{dark} or @code{light}, according |
| 849 | to whether the background color is a light one or a dark one. | 900 | to 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 |
| 853 | This parameter overrides the terminal's color support as given by the | 905 | This 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 | |||
| 863 | the value of @code{tty-color-mode-alist}, and the associated number is | 915 | the value of @code{tty-color-mode-alist}, and the associated number is |
| 864 | used instead. | 916 | used 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 |
| 868 | If this is a number, Emacs performs ``gamma correction'' which adjusts | 921 | If 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 | |||
| 882 | that makes colors darker. A screen gamma value of 1.5 may give good | 935 | that makes colors darker. A screen gamma value of 1.5 may give good |
| 883 | results for LCD color displays. | 936 | results 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 | |||
| 909 | faces (@pxref{Standard Faces,,, emacs, The Emacs Manual}): | 963 | faces (@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 |
| 913 | The name of the font for displaying text in the frame. This is a | 968 | The name of the font for displaying text in the frame. This is a |
| 914 | string, either a valid font name for your system or the name of an Emacs | 969 | string, either a valid font name for your system or the name of an Emacs |
| 915 | fontset (@pxref{Fontsets}). It is equivalent to the @code{font} | 970 | fontset (@pxref{Fontsets}). It is equivalent to the @code{font} |
| 916 | attribute of the @code{default} face. | 971 | attribute of the @code{default} face. |
| 917 | 972 | ||
| 973 | @vindex foreground-color, a frame parameter | ||
| 918 | @item foreground-color | 974 | @item foreground-color |
| 919 | The color to use for the image of a character. It is equivalent to | 975 | The color to use for the image of a character. It is equivalent to |
| 920 | the @code{:foreground} attribute of the @code{default} face. | 976 | the @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 |
| 923 | The color to use for the background of characters. It is equivalent to | 980 | The color to use for the background of characters. It is equivalent to |
| 924 | the @code{:background} attribute of the @code{default} face. | 981 | the @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 |
| 927 | The color for the mouse pointer. It is equivalent to the @code{:background} | 985 | The color for the mouse pointer. It is equivalent to the @code{:background} |
| 928 | attribute of the @code{mouse} face. | 986 | attribute of the @code{mouse} face. |
| 929 | 987 | ||
| 988 | @vindex cursor-color, a frame parameter | ||
| 930 | @item cursor-color | 989 | @item cursor-color |
| 931 | The color for the cursor that shows point. It is equivalent to the | 990 | The 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 |
| 935 | The color for the border of the frame. It is equivalent to the | 995 | The 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 |
| 939 | If non-@code{nil}, the color for the foreground of scroll bars. It is | 1000 | If non-@code{nil}, the color for the foreground of scroll bars. It is |
| 940 | equivalent to the @code{:foreground} attribute of the | 1001 | equivalent 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 |
| 944 | If non-@code{nil}, the color for the background of scroll bars. It is | 1006 | If non-@code{nil}, the color for the background of scroll bars. It is |
| 945 | equivalent to the @code{:background} attribute of the | 1007 | equivalent 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 | ||
| 1927 | The X server also has a set of eight numbered @dfn{cut buffers} which can | ||
| 1928 | store text or other data being moved between applications. Cut buffers | ||
| 1929 | are considered obsolete, but Emacs supports them for the sake of X | ||
| 1930 | clients that still use them. Cut buffers are numbered from 0 to 7. | ||
| 1931 | |||
| 1932 | @defun x-get-cut-buffer &optional n | ||
| 1933 | This function returns the contents of cut buffer number @var{n}. | ||
| 1934 | If 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} | ||
| 1939 | This function stores @var{string} into the first cut buffer (cut buffer | ||
| 1940 | 0). If @var{push} is @code{nil}, only the first cut buffer is changed. | ||
| 1941 | If @var{push} is non-@code{nil}, that says to move the values down | ||
| 1942 | through the series of cut buffers, much like the way successive kills in | ||
| 1943 | Emacs move down the kill ring. In other words, the previous value of | ||
| 1944 | the first cut buffer moves into the second cut buffer, and the second to | ||
| 1945 | the third, and so on through all eight cut buffers. | ||
| 1946 | @end defun | ||
| 1947 | |||
| 1948 | @defopt selection-coding-system | 1988 | @defopt selection-coding-system |
| 1949 | This variable specifies the coding system to use when reading and | 1989 | This variable specifies the coding system to use when reading and |
| 1950 | writing selections or the clipboard. @xref{Coding | 1990 | writing 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 | |||
| 367 | unibyte text, and its string constants will be unibyte strings. | 367 | unibyte 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 | ||
| 371 | into the multibyte representation when loading Lisp files, even if it | ||
| 372 | was started with the @samp{--unibyte} option. This means that string | ||
| 373 | constants with non-@acronym{ASCII} characters translate into multibyte | ||
| 374 | strings. The only exception is when a particular file specifies no | ||
| 375 | decoding. | ||
| 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 |
| 378 | predictable results, regardless of how Emacs was started. In addition, | 371 | predictable results, regardless of how Emacs was started. In addition, |
| 379 | this enables programs that depend on using multibyte text to work even | 372 | this 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 | |||
| 1411 | when the mode is enabled; if it is @code{nil}, the mode is not displayed | 1411 | when the mode is enabled; if it is @code{nil}, the mode is not displayed |
| 1412 | in the mode line. | 1412 | in the mode line. |
| 1413 | 1413 | ||
| 1414 | The optional argument @var{keymap} specifies the keymap for the minor mode. | 1414 | The optional argument @var{keymap} specifies the keymap for the minor |
| 1415 | It can be a variable name, whose value is the keymap, or it can be an alist | 1415 | mode. If non-@code{nil}, it should be a variable name (whose value is |
| 1416 | specifying bindings in this form: | 1416 | a 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 | ||
| 1423 | where each @var{key-sequence} and @var{definition} are arguments | ||
| 1424 | suitable for passing to @code{define-key} (@pxref{Changing Key | ||
| 1425 | Bindings}). If @var{keymap} is a keymap or an alist, this also | ||
| 1426 | defines the variable @code{@var{mode}-map}. | ||
| 1427 | |||
| 1422 | The above three arguments @var{init-value}, @var{lighter}, and | 1428 | The 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 |
| 1424 | used. The @var{keyword-args} consist of keywords followed by | 1430 | used. 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 | ||
| 103 | You cannot set this variable directly; instead, use the function | 103 | You 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 | |||
| 106 | The @samp{--unibyte} command line option does its job by setting the | ||
| 107 | default 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 |
| 1193 | must be @code{t} or @code{nil}. | 1193 | be @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 |
| 1196 | that it begins with @samp{#&} followed by the length. The string | 1196 | that 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 | ||
| 12 | to users. This approach lets users easily download, install, | ||
| 13 | uninstall, and upgrade Lisp code that they might want to use. | ||
| 14 | |||
| 15 | A @dfn{package} is simply one or more files, formatted and bundled | ||
| 16 | in a particular way. Typically a package includes primarily Emacs | ||
| 17 | Lisp code, but it is possible to create other kinds of packages as | ||
| 18 | well. | ||
| 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 | ||
| 35 | A string, the name of the package. This attribute is mandatory. If | ||
| 36 | it does not exist, the package cannot be installed by the package | ||
| 37 | manager. | ||
| 38 | |||
| 39 | @item Version | ||
| 40 | A version number, which is anything that can be parsed by | ||
| 41 | @code{version-to-list}. This attribute is mandatory. If it does not | ||
| 42 | exist, the package cannot be installed by the package manager. | ||
| 43 | |||
| 44 | @item Brief description | ||
| 45 | This is shown to the user in the package menu buffer. It is just a | ||
| 46 | single line. On a terminal with 80 characters per line, there are | ||
| 47 | only 36 characters available in the package menu mode for showing the | ||
| 48 | brief description, so it is best to keep it very brief. If no brief | ||
| 49 | name is given, an empty string is used. | ||
| 50 | |||
| 51 | @item Long description | ||
| 52 | This can be a @file{README} file or the like. This is available to | ||
| 53 | the user before the package is installed, via the package menu. It | ||
| 54 | should more fully describe the package and its capabilities, so a user | ||
| 55 | can read it to decide whether he wants to install the package. This | ||
| 56 | attribute is optional. | ||
| 57 | |||
| 58 | @item Dependencies | ||
| 59 | This is a list of other packages and their minimal acceptable | ||
| 60 | versions. This is used both at download time (to make sure all the | ||
| 61 | needed code is available) and at activation time (to ensure a package | ||
| 62 | is only activated if all its dependencies have been successfully | ||
| 63 | activated). This attribute is optional. | ||
| 64 | |||
| 65 | @item Manual | ||
| 66 | A package can optionally include an Info manual. | ||
| 67 | @end table | ||
| 68 | |||
| 69 | Conceptually, a package goes through several state transitions (in | ||
| 70 | reality some of these transitions are grouped together): | ||
| 71 | |||
| 72 | @table @asis | ||
| 73 | @item Download | ||
| 74 | Fetch the package from somewhere. | ||
| 75 | |||
| 76 | @item Install | ||
| 77 | Unpack the package, or write a @file{.el} file into the appropriate | ||
| 78 | install directory. This step also includes extracting autoloads and | ||
| 79 | byte-compiling the Emacs Lisp code. | ||
| 80 | |||
| 81 | @item Activate | ||
| 82 | Update @code{load-path} and @code{Info-directory-list} and evaluate | ||
| 83 | the 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 | ||
| 87 | activation time. The best approach is to have activation consist of | ||
| 88 | some 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. | ||
| 95 | In this case, all the attributes of the package (@pxref{Packaging | ||
| 96 | Basics}) are taken from this file. | ||
| 97 | |||
| 98 | The package system expects this @file{.el} file to conform to the | ||
| 99 | Emacs 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, | ||
| 103 | given the header line: | ||
| 104 | |||
| 105 | @smallexample | ||
| 106 | ;;; superfrobnicator.el --- frobnicate and bifurcate flanges | ||
| 107 | @end smallexample | ||
| 108 | |||
| 109 | the package name will be @samp{superfrobnicator}. | ||
| 110 | |||
| 111 | The short description of the package is also taken from the first | ||
| 112 | line of the file. | ||
| 113 | |||
| 114 | If the file has a ``Commentary'' header, then it is used as the long | ||
| 115 | description. | ||
| 116 | |||
| 117 | The version of the package comes either from the ``Package-Version'' | ||
| 118 | header, if it exists, or from the ``Version'' header. A package is | ||
| 119 | required to have a version number. Each release of a package must be | ||
| 120 | accompanied by an increase in the version number. | ||
| 121 | |||
| 122 | If the file has a ``Package-Requires'' header, then that is used as | ||
| 123 | the package dependencies. Otherwise, the package is assumed not to | ||
| 124 | have 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 | ||
| 136 | convenient to create than a single-file package, a multi-file package | ||
| 137 | also offers more features: it can include an Info manual, multiple | ||
| 138 | Emacs 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 | ||
| 141 | single directory, named after the package and version. Files can | ||
| 142 | appear in subdirectories of this top-most directory, but Emacs Lisp | ||
| 143 | code will only be found (and thus byte-compiled) at the top-most | ||
| 144 | level. Also, the @file{.tar} file is typically also given this same | ||
| 145 | name. For example, if you are distributing version 1.3 of the | ||
| 146 | superfrobnicator, the package file would be named | ||
| 147 | ``superfrobnicator-1.3.tar'' and the contents would all appear in the | ||
| 148 | directory @file{superfrobnicator-1.3} in that @file{.tar}. | ||
| 149 | |||
| 150 | The package must include a @file{-pkg.el} file, named after the | ||
| 151 | package. In our example above, this file would be called | ||
| 152 | @file{superfrobnicator-pkg.el}. This file must have a single form in | ||
| 153 | it, a call to @code{define-package}. The package dependencies and | ||
| 154 | brief description are taken from this form. | ||
| 155 | |||
| 156 | @defun define-package name version &optional docstring requirements | ||
| 157 | Define 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 | ||
| 159 | form 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 | ||
| 165 | used as the long description. | ||
| 166 | |||
| 167 | If the package has an Info manual, you should distribute the needed | ||
| 168 | info files, plus a @file{dir} file made with @command{install-info}. | ||
| 169 | @xref{Invoking install-info, Invoking install-info, Invoking | ||
| 170 | install-info, texinfo, Texinfo}. | ||
| 171 | |||
| 172 | Do not include any @file{.elc} files in the package. Those will be | ||
| 173 | created at install time. Note that there is no way to control the | ||
| 174 | order in which files are byte-compiled; your package must be robust | ||
| 175 | here. | ||
| 176 | |||
| 177 | The installation process will scan all the @file{.el} files in the | ||
| 178 | package for autoload cookies. @xref{Autoload}. They are extracted | ||
| 179 | into a @file{-autoloads.el} file (e.g., | ||
| 180 | @file{superfrobnicator-autoloads.el}), so do not include a file of | ||
| 181 | that name in your package. | ||
| 182 | |||
| 183 | Any other files in the @file{.tar} file are simply unpacked when the | ||
| 184 | package is installed. This can be useful if your package needs | ||
| 185 | auxiliary data files --- e.g., icons or sounds. | ||
| 186 | |||
| 187 | Emacs Lisp code installed via the package manager must take special | ||
| 188 | care to be location-independent. One easy way to do this is to make | ||
| 189 | references to auxiliary data files relative to @var{load-file-name}. | ||
| 190 | For 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 | |||
| 1273 | filter. Such filter functions need to use @code{set-buffer} in order to | 1273 | filter. Such filter functions need to use @code{set-buffer} in order to |
| 1274 | be sure to insert in that buffer. To avoid setting the current buffer | 1274 | be sure to insert in that buffer. To avoid setting the current buffer |
| 1275 | semipermanently, these filter functions must save and restore the | 1275 | semipermanently, these filter functions must save and restore the |
| 1276 | current buffer. They should also update the process marker, and in some | 1276 | current buffer. They should also check whether the buffer is still |
| 1277 | cases update the value of point. Here is how to do these things: | 1277 | alive, update the process marker, and in some cases update the value |
| 1278 | of 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 | |||
| 1315 | match data. Now Emacs does this automatically for filter functions; | 1317 | match data. Now Emacs does this automatically for filter functions; |
| 1316 | they never need to do it explicitly. @xref{Match Data}. | 1318 | they never need to do it explicitly. @xref{Match Data}. |
| 1317 | 1319 | ||
| 1318 | A filter function that writes the output into the buffer of the | ||
| 1319 | process should check whether the buffer is still alive. If it tries to | ||
| 1320 | insert into a dead buffer, it will get an error. The expression | ||
| 1321 | @code{(buffer-name (process-buffer @var{process}))} returns @code{nil} | ||
| 1322 | if 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 |
| 1325 | that produces the same output twice in a row may send it as one batch of | 1321 | that produces the same output twice in a row may send it as one batch of |
| 1326 | 200 characters one time, and five batches of 40 characters the next. If | 1322 | 200 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 |
| 295 | can specify flags. There are seven possible flags, represented by the | 295 | can specify flags. There are eight possible flags, represented by the |
| 296 | characters @samp{1}, @samp{2}, @samp{3}, @samp{4}, @samp{b}, @samp{n}, | 296 | characters @samp{1}, @samp{2}, @samp{3}, @samp{4}, @samp{b}, @samp{c}, |
| 297 | and @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 |
| 300 | multi-character comment delimiters. The digit flags indicate that a | 300 | delimiters. The digit flags are used for comment delimiters made up |
| 301 | character can @emph{also} be part of a comment sequence, in addition to | 301 | of 2 characters. They indicate that a character can @emph{also} be |
| 302 | the syntactic properties associated with its character class. The flags | 302 | part of a comment sequence, in addition to the syntactic properties |
| 303 | are independent of the class and each other for the sake of characters | 303 | associated with its character class. The flags are independent of the |
| 304 | such as @samp{*} in C mode, which is a punctuation character, @emph{and} | 304 | class and each other for the sake of characters such as @samp{*} in |
| 305 | the second character of a start-of-comment sequence (@samp{/*}), | 305 | C mode, which is a punctuation character, @emph{and} the second |
| 306 | @emph{and} the first character of an end-of-comment sequence | 306 | character of a start-of-comment sequence (@samp{/*}), @emph{and} the |
| 307 | (@samp{*/}). | 307 | first character of an end-of-comment sequence (@samp{*/}). The flags |
| 308 | @samp{b}, @samp{c}, and @samp{n} are used to qualify the corresponding | ||
| 309 | comment 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}, |
| 310 | and what they mean: | 312 | and 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 |
| 330 | alternative ``b'' comment style. | 331 | alternative ``b'' comment style. For a two-character comment starter, |
| 332 | this flag is only significant on the second char, and for a 2-character | ||
| 333 | comment ender it is only significant on the first char. | ||
| 331 | 334 | ||
| 332 | Emacs supports two comment styles simultaneously in any one syntax | 335 | @item |
| 333 | table. 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 |
| 334 | its own comment-start sequence and its own comment-end sequence. Each | 337 | alternative ``c'' comment style. For a two-character comment |
| 335 | comment must stick to one style or the other; thus, if it starts with | 338 | delimiter, @samp{c} on either character makes it of style ``c''. |
| 336 | the comment-start sequence of style ``b,'' it must also end with the | ||
| 337 | comment-end sequence of style ``b.'' | ||
| 338 | 339 | ||
| 339 | The two comment-start sequences must begin with the same character; only | 340 | @item |
| 340 | the 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. | 342 | that this kind of comment can be nested. For a two-character |
| 343 | comment delimiter, @samp{n} on either character makes it | ||
| 344 | nestable. | ||
| 342 | 345 | ||
| 343 | A comment-end sequence (one or two characters) applies to the ``b'' | 346 | Emacs supports several comment styles simultaneously in any one syntax |
| 344 | style if its first character has the @samp{b} flag set; otherwise, it | 347 | table. A comment style is a set of flags @samp{b}, @samp{c}, and |
| 345 | applies to the ``a'' style. | 348 | @samp{n}, so there can be up to 8 different comment styles. |
| 349 | Each comment delimiter has a style and only matches comment delimiters | ||
| 350 | of the same style. Thus if a comment starts with the comment-start | ||
| 351 | sequence of style ``bn'', it will extend until the next matching | ||
| 352 | comment-end sequence of style ``bn''. | ||
| 346 | 353 | ||
| 347 | The appropriate comment syntax settings for C++ are as follows: | 354 | The 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 | ||
| 358 | This defines four comment-delimiting sequences: | 365 | This defines four comment-delimiting sequences: |
| 359 | 366 | ||
| 360 | @table @asis | 367 | @table @asis |
| 361 | @item @samp{/*} | 368 | @item @samp{/*} |
| 362 | This is a comment-start sequence for ``a'' style because the | 369 | This is a comment-start sequence for ``b'' style because the |
| 363 | second character, @samp{*}, does not have the @samp{b} flag. | 370 | second character, @samp{*}, has the @samp{b} flag. |
| 364 | 371 | ||
| 365 | @item @samp{//} | 372 | @item @samp{//} |
| 366 | This is a comment-start sequence for ``b'' style because the second | 373 | This is a comment-start sequence for ``a'' style because the second |
| 367 | character, @samp{/}, does have the @samp{b} flag. | 374 | character, @samp{/}, does not have the @samp{b} flag. |
| 368 | 375 | ||
| 369 | @item @samp{*/} | 376 | @item @samp{*/} |
| 370 | This is a comment-end sequence for ``a'' style because the first | 377 | This is a comment-end sequence for ``b'' style because the first |
| 371 | character, @samp{*}, does not have the @samp{b} flag. | 378 | character, @samp{*}, does have the @samp{b} flag. |
| 372 | 379 | ||
| 373 | @item newline | 380 | @item newline |
| 374 | This is a comment-end sequence for ``b'' style, because the newline | 381 | This is a comment-end sequence for ``a'' style, because the newline |
| 375 | character has the @samp{b} flag. | 382 | character 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 | ||
| 380 | that this kind of comment can be nested. For a two-character | ||
| 381 | comment delimiter, @samp{n} on either character makes it | ||
| 382 | nestable. | ||
| 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. |
| 387 | These characters are treated as whitespace when they appear between | 388 | These 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 |
| 1127 | This variable provides a way of communicating killed text to other | 1128 | This variable provides a way of communicating killed text to other |
| 1128 | programs, when you are using a window system. Its value should be | 1129 | programs, 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 | ||
| 1131 | If the value is a function, @code{kill-new} and @code{kill-append} call | 1132 | If the value is a function, @code{kill-new} and @code{kill-append} call |
| 1132 | it with the new first element of the kill ring as the first argument. | 1133 | it with the new first element of the kill ring as the argument. |
| 1133 | The second, optional, argument has the same meaning as the @var{push} | ||
| 1134 | argument to @code{x-set-cut-buffer} (@pxref{Definition of | ||
| 1135 | x-set-cut-buffer}) and only affects the second and later cut buffers. | ||
| 1136 | 1134 | ||
| 1137 | The normal use of this function is to set the window system's primary | 1135 | The normal use of this function is to set the window system's primary |
| 1138 | selection (and first cut buffer) from the newly killed text. | 1136 | selection 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 | |||
| 4109 | coding instead. | 4107 | coding 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 | |||
| 4115 | Emacs provides an interface to the @code{libxml2} library via two | ||
| 4116 | functions: @code{html-parse-buffer} and @code{xml-parse-buffer}. The | ||
| 4117 | HTML function will parse ``real world'' HTML and try to return a | ||
| 4118 | sensible parse tree, while the XML function is somewhat stricter about | ||
| 4119 | syntax. | ||
| 4120 | |||
| 4121 | They both take a two optional parameter. The first is a buffer, and | ||
| 4122 | the second is a base URL to be used to expand relative URLs in the | ||
| 4123 | document, if any. | ||
| 4124 | |||
| 4125 | Here's an example demonstrating the structure of the parsed data you | ||
| 4126 | get 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 | |||
| 4132 | You 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 | |||
| 4146 | It's a simple tree structure, where the @code{car} for each node is | ||
| 4147 | the name of the node, and the @code{cdr} is the value, or the list of | ||
| 4148 | values. | ||
| 4149 | |||
| 4150 | Attributes are coded the same way as child nodes, but with @samp{:} as | ||
| 4151 | the 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. | |||
| 1052 | This field is important; it's how people will find your package when | 1052 | This field is important; it's how people will find your package when |
| 1053 | they're looking for things by topic area. To separate the keywords, you | 1053 | they're looking for things by topic area. To separate the keywords, you |
| 1054 | can use spaces, commas, or both. | 1054 | can use spaces, commas, or both. |
| 1055 | |||
| 1056 | @item Package-Version | ||
| 1057 | If @samp{Version} is not suitable for use by the package manager, then | ||
| 1058 | a package can define @samp{Package-Version}; it will be used instead. | ||
| 1059 | This is handy if @samp{Version} is an RCS id or something else that | ||
| 1060 | cannot be parsed by @code{version-to-list}. @xref{Packaging Basics}. | ||
| 1061 | |||
| 1062 | @item Package-Requires | ||
| 1063 | If this exists, it names packages on which the current package depends | ||
| 1064 | for proper operation. @xref{Packaging Basics}. This is used by the | ||
| 1065 | package manager both at download time (to ensure that a complete set | ||
| 1066 | of packages is downloaded) and at activation time (to ensure that a | ||
| 1067 | package is activated if and only if all its dependencies have been). | ||
| 1068 | |||
| 1069 | Its format is a list of lists. The @code{car} of each sub-list is the | ||
| 1070 | name of a package, as a symbol. The @code{cadr} of each sub-list is | ||
| 1071 | the 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 | |||
| 1077 | The package code automatically defines a package named @samp{emacs} | ||
| 1078 | with the version number of the currently running Emacs. This can be | ||
| 1079 | used 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 | |||
| 183 | Appendices | 185 | Appendices |
| 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 | ||
| 1420 | Preparing 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 | |||
| 1418 | Starting Up Emacs | 1426 | Starting 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 | |||
| 182 | Appendices | 184 | Appendices |
| 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 | ||
| 1419 | Preparing 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 | |||
| 1417 | Starting Up Emacs | 1425 | Starting Up Emacs |
| 1418 | 1426 | ||
| 1419 | * Startup Summary:: Sequence of actions Emacs performs at startup. | 1427 | * Startup Summary:: Sequence of actions Emacs performs at startup. |