diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 38 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/eval.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 37 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 33 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 15 | ||||
| -rw-r--r-- | doc/lispref/sequences.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 297 | ||||
| -rw-r--r-- | doc/lispref/vol1.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/vol2.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 4 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/misc/flymake.texi | 34 | ||||
| -rw-r--r-- | doc/misc/info.texi | 1 |
17 files changed, 309 insertions, 192 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 42ec24fac5f..3584c89d5fe 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2012-03-11 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * windows.texi (Window Configurations): save-window-excursion is | ||
| 4 | now a macro. | ||
| 5 | |||
| 6 | * display.texi (Temporary Displays): with-output-to-temp-buffer is | ||
| 7 | now a macro. | ||
| 8 | |||
| 9 | * text.texi (Fields): Minor copyedit. | ||
| 10 | |||
| 11 | 2012-03-10 Eli Zaretskii <eliz@gnu.org> | ||
| 12 | |||
| 13 | * strings.texi (String Basics): | ||
| 14 | * sequences.texi (Sequence Functions): Mention that `length' is | ||
| 15 | not appropriate for computing the string width on display; add a | ||
| 16 | cross-reference to the description of `string-width'. (Bug#10978) | ||
| 17 | |||
| 18 | * eval.texi (Autoloading): Minor change of wording. | ||
| 19 | |||
| 20 | 2012-03-10 Chong Yidong <cyd@gnu.org> | ||
| 21 | |||
| 22 | * loading.texi (Autoload): Explicitly state which forms are | ||
| 23 | processed specially (Bug#7783). | ||
| 24 | |||
| 25 | * keymaps.texi (Mouse Menus): Describe non-toolkit behavior as the | ||
| 26 | non-default situation. Describe one-submenu exception (Bug#7695). | ||
| 27 | |||
| 28 | * nonascii.texi (Character Properties): Copyedits. | ||
| 29 | |||
| 30 | 2012-03-08 Chong Yidong <cyd@gnu.org> | ||
| 31 | |||
| 32 | * text.texi (Mode-Specific Indent): Document new behavior of | ||
| 33 | indent-for-tab-command. Document tab-always-indent. | ||
| 34 | (Special Properties): Copyedits. | ||
| 35 | (Checksum/Hash): Improve secure-hash doc. Do not recommend MD5. | ||
| 36 | (Parsing HTML/XML): Rename from Parsing HTML. Update doc of | ||
| 37 | libxml-parse-html-region. | ||
| 38 | |||
| 1 | 2012-03-07 Glenn Morris <rgm@gnu.org> | 39 | 2012-03-07 Glenn Morris <rgm@gnu.org> |
| 2 | 40 | ||
| 3 | * markers.texi (The Region): Briefly mention use-empty-active-region | 41 | * markers.texi (The Region): Briefly mention use-empty-active-region |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 281ddda9cec..c70418be52b 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1031,7 +1031,7 @@ You can use a display table to substitute other text for the ellipsis | |||
| 1031 | buffer and then present it to the user for perusal rather than for | 1031 | buffer and then present it to the user for perusal rather than for |
| 1032 | editing. Many help commands use this feature. | 1032 | editing. Many help commands use this feature. |
| 1033 | 1033 | ||
| 1034 | @defspec with-output-to-temp-buffer buffer-name forms@dots{} | 1034 | @defmac with-output-to-temp-buffer buffer-name forms@dots{} |
| 1035 | This function executes @var{forms} while arranging to insert any output | 1035 | This function executes @var{forms} while arranging to insert any output |
| 1036 | they print into the buffer named @var{buffer-name}, which is first | 1036 | they print into the buffer named @var{buffer-name}, which is first |
| 1037 | created if necessary, and put into Help mode. Finally, the buffer is | 1037 | created if necessary, and put into Help mode. Finally, the buffer is |
| @@ -1083,7 +1083,7 @@ The value of the last form in @var{forms} is returned. | |||
| 1083 | ---------- Buffer: foo ---------- | 1083 | ---------- Buffer: foo ---------- |
| 1084 | @end group | 1084 | @end group |
| 1085 | @end example | 1085 | @end example |
| 1086 | @end defspec | 1086 | @end defmac |
| 1087 | 1087 | ||
| 1088 | @defopt temp-buffer-show-function | 1088 | @defopt temp-buffer-show-function |
| 1089 | If this variable is non-@code{nil}, @code{with-output-to-temp-buffer} | 1089 | If this variable is non-@code{nil}, @code{with-output-to-temp-buffer} |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 7a444ee4039..ea304292497 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1054,7 +1054,8 @@ Text | |||
| 1054 | * Registers:: How registers are implemented. Accessing | 1054 | * Registers:: How registers are implemented. Accessing |
| 1055 | the text or position stored in a register. | 1055 | the text or position stored in a register. |
| 1056 | * Base 64:: Conversion to or from base 64 encoding. | 1056 | * Base 64:: Conversion to or from base 64 encoding. |
| 1057 | * Checksum/Hash:: Computing "message digests"/"checksums"/"hashes". | 1057 | * Checksum/Hash:: Computing cryptographic hashes. |
| 1058 | * Parsing HTML/XML:: Parsing HTML and XML. | ||
| 1058 | * Atomic Changes:: Installing several buffer changes "atomically". | 1059 | * Atomic Changes:: Installing several buffer changes "atomically". |
| 1059 | * Change Hooks:: Supplying functions to be run when text is changed. | 1060 | * Change Hooks:: Supplying functions to be run when text is changed. |
| 1060 | 1061 | ||
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index cb3a4c54fac..429d999a2c8 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi | |||
| @@ -521,8 +521,10 @@ values).@refill | |||
| 521 | whose function definition has not yet been loaded into Emacs. It | 521 | whose function definition has not yet been loaded into Emacs. It |
| 522 | specifies which file contains the definition. When an autoload object | 522 | specifies which file contains the definition. When an autoload object |
| 523 | appears as a symbol's function definition, calling that symbol as a | 523 | appears as a symbol's function definition, calling that symbol as a |
| 524 | function automatically loads the specified file; then it calls the real | 524 | function automatically loads the specified file; then it calls the |
| 525 | definition loaded from that file. @xref{Autoload}. | 525 | real definition loaded from that file. The way to arrange for an |
| 526 | autoload object to appear as a symbol's function definition is | ||
| 527 | described in @ref{Autoload}. | ||
| 526 | 528 | ||
| 527 | @node Quoting | 529 | @node Quoting |
| 528 | @section Quoting | 530 | @section Quoting |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 83bbc140b13..55b18edf2ec 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -134,7 +134,7 @@ in a different location since it was dumped. | |||
| 134 | This function delays the initialization of @var{symbol} to the next | 134 | This function delays the initialization of @var{symbol} to the next |
| 135 | Emacs start. You normally use this function by specifying it as the | 135 | Emacs start. You normally use this function by specifying it as the |
| 136 | @code{:initialize} property of a customizable variable. (The argument | 136 | @code{:initialize} property of a customizable variable. (The argument |
| 137 | @var{value} is unused, and is provided only for compatiblity with the | 137 | @var{value} is unused, and is provided only for compatibility with the |
| 138 | form Custom expects.) | 138 | form Custom expects.) |
| 139 | @end defun | 139 | @end defun |
| 140 | 140 | ||
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 669f058ef13..5dd57ccb4ac 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -2345,24 +2345,25 @@ multiple levels or comes from the menu bar.) | |||
| 2345 | It's often best to use a button-down event to trigger the menu. Then | 2345 | It's often best to use a button-down event to trigger the menu. Then |
| 2346 | the user can select a menu item by releasing the button. | 2346 | the user can select a menu item by releasing the button. |
| 2347 | 2347 | ||
| 2348 | A single keymap can appear as multiple menu panes, if you explicitly | 2348 | @cindex submenu |
| 2349 | arrange for this. The way to do this is to make a keymap for each pane, | 2349 | If the menu keymap contains a binding to a nested keymap, the nested |
| 2350 | then create a binding for each of those maps in the main keymap of the | 2350 | keymap specifies a @dfn{submenu}. There will be a menu item, labeled |
| 2351 | menu. Give each of these bindings an item string that starts with | 2351 | by the nested keymap's item string, and clicking on this item |
| 2352 | @samp{@@}. The rest of the item string becomes the name of the pane. | 2352 | automatically pops up the specified submenu. As a special exception, |
| 2353 | See the file @file{lisp/mouse.el} for an example of this. Any ordinary | 2353 | if the menu keymap contains a single nested keymap and no other menu |
| 2354 | bindings with @samp{@@}-less item strings are grouped into one pane, | 2354 | items, the menu shows the contents of the nested keymap directly, not |
| 2355 | which appears along with the other panes explicitly created for the | 2355 | as a submenu. |
| 2356 | submaps. | 2356 | |
| 2357 | 2357 | However, if Emacs is compiled without X toolkit support, submenus | |
| 2358 | X toolkit menus don't have panes; instead, they can have submenus. | 2358 | are not supported. Each nested keymap is shown as a menu item, but |
| 2359 | Every nested keymap becomes a submenu, whether the item string starts | 2359 | clicking on it does not automatically pop up the submenu. If you wish |
| 2360 | with @samp{@@} or not. In a toolkit version of Emacs, the only thing | 2360 | to imitate the effect of submenus, you can do that by giving a nested |
| 2361 | special about @samp{@@} at the beginning of an item string is that the | 2361 | keymap an item string which starts with @samp{@@}. This causes Emacs |
| 2362 | @samp{@@} doesn't appear in the menu item. | 2362 | to display the nested keymap using a separate @dfn{menu pane}; the |
| 2363 | 2363 | rest of the item string after the @samp{@@} is the pane label. If | |
| 2364 | Multiple keymaps that define the same menu prefix key produce | 2364 | Emacs is compiled without X toolkit support, menu panes are not used; |
| 2365 | separate panes or separate submenus. | 2365 | in that case, a @samp{@@} at the beginning of an item string is |
| 2366 | omitted when the menu label is displayed, and has no other effect. | ||
| 2366 | 2367 | ||
| 2367 | @node Keyboard Menus | 2368 | @node Keyboard Menus |
| 2368 | @subsection Menus and the Keyboard | 2369 | @subsection Menus and the Keyboard |
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 3c2fa60248e..47a2a39ed63 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -500,14 +500,31 @@ Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}. | |||
| 500 | autoloads for all files in the current directory. | 500 | autoloads for all files in the current directory. |
| 501 | 501 | ||
| 502 | The same magic comment can copy any kind of form into | 502 | The same magic comment can copy any kind of form into |
| 503 | @file{loaddefs.el}. If the form following the magic comment is not a | 503 | @file{loaddefs.el}. The form following the magic comment is copied |
| 504 | function-defining form or a @code{defcustom} form, it is copied | 504 | verbatim, @emph{except} if it is one of the forms which the autoload |
| 505 | verbatim. ``Function-defining forms'' include @code{define-skeleton}, | 505 | facility handles specially (e.g.@: by conversion into an |
| 506 | @code{define-derived-mode}, @code{define-generic-mode} and | 506 | @code{autoload} call). The forms which are not copied verbatim are |
| 507 | @code{define-minor-mode} as well as @code{defun} and | 507 | the following: |
| 508 | @code{defmacro}. To save space, a @code{defcustom} form is converted to | 508 | |
| 509 | a @code{defvar} in @file{loaddefs.el}, with some additional information | 509 | @table @asis |
| 510 | if it uses @code{:require}. | 510 | @item Definitions for function or function-like objects: |
| 511 | @code{defun} and @code{defmacro}; also @code{defun*} and | ||
| 512 | @code{defmacro*} (@pxref{Argument Lists,,,cl,CL Manual}), and | ||
| 513 | @code{define-overloadable-function} (see the commentary in | ||
| 514 | @file{mode-local.el}). | ||
| 515 | |||
| 516 | @item Definitions for major or minor modes: | ||
| 517 | @code{define-derived-mode}, @code{define-minor-mode}, | ||
| 518 | @code{define-compilation-mode}, @code{define-generic-mode}, | ||
| 519 | @code{easy-mmode-define-global-mode}, @code{define-global-minor-mode}, | ||
| 520 | @code{define-globalized-minor-mode}, and | ||
| 521 | @code{easy-mmode-define-minor-mode}. | ||
| 522 | |||
| 523 | @item Other definition types: | ||
| 524 | @code{defcustom}, @code{defgroup}, @code{defclass} | ||
| 525 | (@pxref{Top,EIEIO,,eieio,EIEIO}), and @code{define-skeleton} (see the | ||
| 526 | commentary in @file{skeleton.el}). | ||
| 527 | @end table | ||
| 511 | 528 | ||
| 512 | You can also use a magic comment to execute a form at build time | 529 | You can also use a magic comment to execute a form at build time |
| 513 | @emph{without} executing it when the file itself is loaded. To do this, | 530 | @emph{without} executing it when the file itself is loaded. To do this, |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 19c72981174..c97cd099328 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -412,14 +412,13 @@ or @code{R} (strong R). | |||
| 412 | Corresponds to the Unicode @code{Decomposition_Type} and | 412 | Corresponds to the Unicode @code{Decomposition_Type} and |
| 413 | @code{Decomposition_Value} properties. The value is a list, whose | 413 | @code{Decomposition_Value} properties. The value is a list, whose |
| 414 | first element may be a symbol representing a compatibility formatting | 414 | first element may be a symbol representing a compatibility formatting |
| 415 | tag, such as @code{small}@footnote{ | 415 | tag, such as @code{small}@footnote{The Unicode specification writes |
| 416 | Note that the Unicode spec writes these tag names inside | 416 | these tag names inside @samp{<..>} brackets, but the tag names in |
| 417 | @samp{<..>} brackets. The tag names in Emacs do not include the | 417 | Emacs do not include the brackets; e.g.@: Unicode specifies |
| 418 | brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses | 418 | @samp{<small>} where Emacs uses @samp{small}. }; the other elements |
| 419 | @samp{small}. | 419 | are characters that give the compatibility decomposition sequence of |
| 420 | }; the other elements are characters that give the compatibility | 420 | this character. For unassigned codepoints, the value is the character |
| 421 | decomposition sequence of this character. For unassigned codepoints, | 421 | itself. |
| 422 | the value is the character itself. | ||
| 423 | 422 | ||
| 424 | @item decimal-digit-value | 423 | @item decimal-digit-value |
| 425 | Corresponds to the Unicode @code{Numeric_Value} property for | 424 | Corresponds to the Unicode @code{Numeric_Value} property for |
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 94f1bf666d2..50f75da2de8 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi | |||
| @@ -108,6 +108,11 @@ Emacs character code. | |||
| 108 | @noindent | 108 | @noindent |
| 109 | See also @code{string-bytes}, in @ref{Text Representations}. | 109 | See also @code{string-bytes}, in @ref{Text Representations}. |
| 110 | 110 | ||
| 111 | If you need to compute the width of a string on display, you should | ||
| 112 | use @code{string-width} (@pxref{Width}), not @code{length}, since | ||
| 113 | @code{length} only counts the number of characters, but does not | ||
| 114 | account for the display width of each character. | ||
| 115 | |||
| 111 | @defun elt sequence index | 116 | @defun elt sequence index |
| 112 | @cindex elements of sequences | 117 | @cindex elements of sequences |
| 113 | This function returns the element of @var{sequence} indexed by | 118 | This function returns the element of @var{sequence} indexed by |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index bbb75f1474d..64d0986493a 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -51,7 +51,9 @@ C are terminated by a character with @acronym{ASCII} code 0.) | |||
| 51 | operate on them with the general array and sequence functions. | 51 | operate on them with the general array and sequence functions. |
| 52 | (@xref{Sequences Arrays Vectors}.) For example, you can access or | 52 | (@xref{Sequences Arrays Vectors}.) For example, you can access or |
| 53 | change individual characters in a string using the functions @code{aref} | 53 | change individual characters in a string using the functions @code{aref} |
| 54 | and @code{aset} (@pxref{Array Functions}). | 54 | and @code{aset} (@pxref{Array Functions}). However, note that |
| 55 | @code{length} should @emph{not} be used for computing the width of a | ||
| 56 | string on display; use @code{string-width} (@pxref{Width}) instead. | ||
| 55 | 57 | ||
| 56 | There are two text representations for non-@acronym{ASCII} characters in | 58 | There are two text representations for non-@acronym{ASCII} characters in |
| 57 | Emacs strings (and in buffers): unibyte and multibyte (@pxref{Text | 59 | Emacs strings (and in buffers): unibyte and multibyte (@pxref{Text |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 88cb6a157f8..1ba0cae43b6 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -56,8 +56,8 @@ the character after point. | |||
| 56 | * Registers:: How registers are implemented. Accessing the text or | 56 | * Registers:: How registers are implemented. Accessing the text or |
| 57 | position stored in a register. | 57 | position stored in a register. |
| 58 | * Base 64:: Conversion to or from base 64 encoding. | 58 | * Base 64:: Conversion to or from base 64 encoding. |
| 59 | * Checksum/Hash:: Computing "message digests"/"checksums"/"hashes". | 59 | * Checksum/Hash:: Computing cryptographic hashes. |
| 60 | * Parsing HTML:: Parsing HTML and XML. | 60 | * Parsing HTML/XML:: Parsing HTML and XML. |
| 61 | * Atomic Changes:: Installing several buffer changes "atomically". | 61 | * Atomic Changes:: Installing several buffer changes "atomically". |
| 62 | * Change Hooks:: Supplying functions to be run when text is changed. | 62 | * Change Hooks:: Supplying functions to be run when text is changed. |
| 63 | @end menu | 63 | @end menu |
| @@ -2203,14 +2203,48 @@ key to indent properly for the language being edited. This section | |||
| 2203 | describes the mechanism of the @key{TAB} key and how to control it. | 2203 | describes the mechanism of the @key{TAB} key and how to control it. |
| 2204 | The functions in this section return unpredictable values. | 2204 | The functions in this section return unpredictable values. |
| 2205 | 2205 | ||
| 2206 | @defvar indent-line-function | 2206 | @deffn Command indent-for-tab-command &optional rigid |
| 2207 | This variable's value is the function to be used by @key{TAB} (and | 2207 | This is the command bound to @key{TAB} in most editing modes. Its |
| 2208 | various commands) to indent the current line. The command | 2208 | usual action is to indent the current line, but it can alternatively |
| 2209 | @code{indent-according-to-mode} does little more than call this function. | 2209 | insert a tab character or indent a region. |
| 2210 | |||
| 2211 | Here is what it does: | ||
| 2210 | 2212 | ||
| 2211 | In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C | 2213 | @itemize |
| 2212 | mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}. | 2214 | @item |
| 2213 | The default value is @code{indent-relative}. @xref{Auto-Indentation}. | 2215 | First, it checks whether Transient Mark mode is enabled and the region |
| 2216 | is active. If so, it called @code{indent-region} to indent all the | ||
| 2217 | text in the region (@pxref{Region Indent}). | ||
| 2218 | |||
| 2219 | @item | ||
| 2220 | Otherwise, if the indentation function in @code{indent-line-function} | ||
| 2221 | is @code{indent-to-left-margin} (a trivial command that inserts a tab | ||
| 2222 | character), or if the variable @code{tab-always-indent} specifies that | ||
| 2223 | a tab character ought to be inserted (see below), then it inserts a | ||
| 2224 | tab character. | ||
| 2225 | |||
| 2226 | @item | ||
| 2227 | Otherwise, it indents the current line; this is done by calling the | ||
| 2228 | function in @code{indent-line-function}. If the line is already | ||
| 2229 | indented, and the value of @code{tab-always-indent} is @code{complete} | ||
| 2230 | (see below), it tries completing the text at point. | ||
| 2231 | @end itemize | ||
| 2232 | |||
| 2233 | If @var{rigid} is non-@code{nil} (interactively, with a prefix | ||
| 2234 | argument), then after this command indents a line or inserts a tab, it | ||
| 2235 | also rigidly indents the entire balanced expression which starts at | ||
| 2236 | the beginning of the current line, in order to reflect the new | ||
| 2237 | indentation. This argument is ignored if the command indents the | ||
| 2238 | region. | ||
| 2239 | @end deffn | ||
| 2240 | |||
| 2241 | @defvar indent-line-function | ||
| 2242 | This variable's value is the function to be used by | ||
| 2243 | @code{indent-for-tab-command}, and various other indentation commands, | ||
| 2244 | to indent the current line. It is usually assigned by the major mode; | ||
| 2245 | for instance, Lisp mode sets it to @code{lisp-indent-line}, C mode | ||
| 2246 | sets it to @code{c-indent-line}, and so on. The default value is | ||
| 2247 | @code{indent-relative}. @xref{Auto-Indentation}. | ||
| 2214 | @end defvar | 2248 | @end defvar |
| 2215 | 2249 | ||
| 2216 | @deffn Command indent-according-to-mode | 2250 | @deffn Command indent-according-to-mode |
| @@ -2218,41 +2252,31 @@ This command calls the function in @code{indent-line-function} to | |||
| 2218 | indent the current line in a way appropriate for the current major mode. | 2252 | indent the current line in a way appropriate for the current major mode. |
| 2219 | @end deffn | 2253 | @end deffn |
| 2220 | 2254 | ||
| 2221 | @deffn Command indent-for-tab-command &optional rigid | ||
| 2222 | This command calls the function in @code{indent-line-function} to | ||
| 2223 | indent the current line; however, if that function is | ||
| 2224 | @code{indent-to-left-margin}, @code{insert-tab} is called instead. | ||
| 2225 | (That is a trivial command that inserts a tab character.) If | ||
| 2226 | @var{rigid} is non-@code{nil}, this function also rigidly indents the | ||
| 2227 | entire balanced expression that starts at the beginning of the current | ||
| 2228 | line, to reflect change in indentation of the current line. | ||
| 2229 | @end deffn | ||
| 2230 | |||
| 2231 | @deffn Command newline-and-indent | 2255 | @deffn Command newline-and-indent |
| 2232 | This function inserts a newline, then indents the new line (the one | 2256 | This function inserts a newline, then indents the new line (the one |
| 2233 | following the newline just inserted) according to the major mode. | 2257 | following the newline just inserted) according to the major mode. It |
| 2234 | 2258 | does indentation by calling @code{indent-according-to-mode}. | |
| 2235 | It does indentation by calling the current @code{indent-line-function}. | ||
| 2236 | In programming language modes, this is the same thing @key{TAB} does, | ||
| 2237 | but in some text modes, where @key{TAB} inserts a tab, | ||
| 2238 | @code{newline-and-indent} indents to the column specified by | ||
| 2239 | @code{left-margin}. | ||
| 2240 | @end deffn | 2259 | @end deffn |
| 2241 | 2260 | ||
| 2242 | @deffn Command reindent-then-newline-and-indent | 2261 | @deffn Command reindent-then-newline-and-indent |
| 2243 | @comment !!SourceFile simple.el | ||
| 2244 | This command reindents the current line, inserts a newline at point, | 2262 | This command reindents the current line, inserts a newline at point, |
| 2245 | and then indents the new line (the one following the newline just | 2263 | and then indents the new line (the one following the newline just |
| 2246 | inserted). | 2264 | inserted). It does indentation on both lines by calling |
| 2247 | 2265 | @code{indent-according-to-mode}. | |
| 2248 | This command does indentation on both lines according to the current | ||
| 2249 | major mode, by calling the current value of @code{indent-line-function}. | ||
| 2250 | In programming language modes, this is the same thing @key{TAB} does, | ||
| 2251 | but in some text modes, where @key{TAB} inserts a tab, | ||
| 2252 | @code{reindent-then-newline-and-indent} indents to the column specified | ||
| 2253 | by @code{left-margin}. | ||
| 2254 | @end deffn | 2266 | @end deffn |
| 2255 | 2267 | ||
| 2268 | @defopt tab-always-indent | ||
| 2269 | This variable can be used to customize the behavior of the @key{TAB} | ||
| 2270 | (@code{indent-for-tab-command}) command. If the value is @code{t} | ||
| 2271 | (the default), the command normally just indents the current line. If | ||
| 2272 | the value is @code{nil}, the command indents the current line only if | ||
| 2273 | point is at the left margin or in the line's indentation; otherwise, | ||
| 2274 | it inserts a tab character. If the value is @code{complete}, the | ||
| 2275 | command first tries to indent the current line, and if the line was | ||
| 2276 | already indented, it calls @code{completion-at-point} to complete the | ||
| 2277 | text at point (@pxref{Completion in Buffers}). | ||
| 2278 | @end defopt | ||
| 2279 | |||
| 2256 | @node Region Indent | 2280 | @node Region Indent |
| 2257 | @subsection Indenting an Entire Region | 2281 | @subsection Indenting an Entire Region |
| 2258 | 2282 | ||
| @@ -2827,7 +2851,7 @@ faster to process chunks of text that have the same property value. | |||
| 2827 | comparing property values. In all cases, @var{object} defaults to the | 2851 | comparing property values. In all cases, @var{object} defaults to the |
| 2828 | current buffer. | 2852 | current buffer. |
| 2829 | 2853 | ||
| 2830 | For high performance, it's very important to use the @var{limit} | 2854 | For good performance, it's very important to use the @var{limit} |
| 2831 | argument to these functions, especially the ones that search for a | 2855 | argument to these functions, especially the ones that search for a |
| 2832 | single property---otherwise, they may spend a long time scanning to the | 2856 | single property---otherwise, they may spend a long time scanning to the |
| 2833 | end of the buffer, if the property you are interested in does not change. | 2857 | end of the buffer, if the property you are interested in does not change. |
| @@ -2839,15 +2863,15 @@ different properties. | |||
| 2839 | 2863 | ||
| 2840 | @defun next-property-change pos &optional object limit | 2864 | @defun next-property-change pos &optional object limit |
| 2841 | The function scans the text forward from position @var{pos} in the | 2865 | The function scans the text forward from position @var{pos} in the |
| 2842 | string or buffer @var{object} till it finds a change in some text | 2866 | string or buffer @var{object} until it finds a change in some text |
| 2843 | property, then returns the position of the change. In other words, it | 2867 | property, then returns the position of the change. In other words, it |
| 2844 | returns the position of the first character beyond @var{pos} whose | 2868 | returns the position of the first character beyond @var{pos} whose |
| 2845 | properties are not identical to those of the character just after | 2869 | properties are not identical to those of the character just after |
| 2846 | @var{pos}. | 2870 | @var{pos}. |
| 2847 | 2871 | ||
| 2848 | If @var{limit} is non-@code{nil}, then the scan ends at position | 2872 | If @var{limit} is non-@code{nil}, then the scan ends at position |
| 2849 | @var{limit}. If there is no property change before that point, | 2873 | @var{limit}. If there is no property change before that point, this |
| 2850 | @code{next-property-change} returns @var{limit}. | 2874 | function returns @var{limit}. |
| 2851 | 2875 | ||
| 2852 | The value is @code{nil} if the properties remain unchanged all the way | 2876 | The value is @code{nil} if the properties remain unchanged all the way |
| 2853 | to the end of @var{object} and @var{limit} is @code{nil}. If the value | 2877 | to the end of @var{object} and @var{limit} is @code{nil}. If the value |
| @@ -2980,10 +3004,9 @@ character. | |||
| 2980 | @item face | 3004 | @item face |
| 2981 | @cindex face codes of text | 3005 | @cindex face codes of text |
| 2982 | @kindex face @r{(text property)} | 3006 | @kindex face @r{(text property)} |
| 2983 | You can use the property @code{face} to control the font and color of | 3007 | The @code{face} property controls the appearance of the character, |
| 2984 | text. @xref{Faces}, for more information. | 3008 | such as its font and color. @xref{Faces}. The value of the property |
| 2985 | 3009 | can be the following: | |
| 2986 | @code{face} can be the following: | ||
| 2987 | 3010 | ||
| 2988 | @itemize @bullet | 3011 | @itemize @bullet |
| 2989 | @item | 3012 | @item |
| @@ -2996,10 +3019,10 @@ face attribute name and @var{value} is a meaningful value for that | |||
| 2996 | attribute. With this feature, you do not need to create a face each | 3019 | attribute. With this feature, you do not need to create a face each |
| 2997 | time you want to specify a particular attribute for certain text. | 3020 | time you want to specify a particular attribute for certain text. |
| 2998 | @xref{Face Attributes}. | 3021 | @xref{Face Attributes}. |
| 2999 | @end itemize | ||
| 3000 | 3022 | ||
| 3001 | @code{face} can also be a list, where each element uses one of the | 3023 | @item |
| 3002 | forms listed above. | 3024 | A list, where each element uses one of the two forms listed above. |
| 3025 | @end itemize | ||
| 3003 | 3026 | ||
| 3004 | Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by | 3027 | Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by |
| 3005 | dynamically updating the @code{face} property of characters based on | 3028 | dynamically updating the @code{face} property of characters based on |
| @@ -3354,15 +3377,15 @@ of the text. | |||
| 3354 | Self-inserting characters normally take on the same properties as the | 3377 | Self-inserting characters normally take on the same properties as the |
| 3355 | preceding character. This is called @dfn{inheritance} of properties. | 3378 | preceding character. This is called @dfn{inheritance} of properties. |
| 3356 | 3379 | ||
| 3357 | In a Lisp program, you can do insertion with inheritance or without, | 3380 | A Lisp program can do insertion with inheritance or without, |
| 3358 | depending on your choice of insertion primitive. The ordinary text | 3381 | depending on the choice of insertion primitive. The ordinary text |
| 3359 | insertion functions such as @code{insert} do not inherit any properties. | 3382 | insertion functions, such as @code{insert}, do not inherit any |
| 3360 | They insert text with precisely the properties of the string being | 3383 | properties. They insert text with precisely the properties of the |
| 3361 | inserted, and no others. This is correct for programs that copy text | 3384 | string being inserted, and no others. This is correct for programs |
| 3362 | from one context to another---for example, into or out of the kill ring. | 3385 | that copy text from one context to another---for example, into or out |
| 3363 | To insert with inheritance, use the special primitives described in this | 3386 | of the kill ring. To insert with inheritance, use the special |
| 3364 | section. Self-inserting characters inherit properties because they work | 3387 | primitives described in this section. Self-inserting characters |
| 3365 | using these primitives. | 3388 | inherit properties because they work using these primitives. |
| 3366 | 3389 | ||
| 3367 | When you do insertion with inheritance, @emph{which} properties are | 3390 | When you do insertion with inheritance, @emph{which} properties are |
| 3368 | inherited, and from where, depends on which properties are @dfn{sticky}. | 3391 | inherited, and from where, depends on which properties are @dfn{sticky}. |
| @@ -3754,7 +3777,7 @@ closest to @var{new-pos} that is in the same field as @var{old-pos}. | |||
| 3754 | 3777 | ||
| 3755 | If @var{new-pos} is @code{nil}, then @code{constrain-to-field} uses | 3778 | If @var{new-pos} is @code{nil}, then @code{constrain-to-field} uses |
| 3756 | the value of point instead, and moves point to the resulting position | 3779 | the value of point instead, and moves point to the resulting position |
| 3757 | as well as returning it. | 3780 | in addition to returning that position. |
| 3758 | 3781 | ||
| 3759 | If @var{old-pos} is at the boundary of two fields, then the acceptable | 3782 | If @var{old-pos} is at the boundary of two fields, then the acceptable |
| 3760 | final positions depend on the argument @var{escape-from-edge}. If | 3783 | final positions depend on the argument @var{escape-from-edge}. If |
| @@ -4063,46 +4086,64 @@ The decoding functions ignore newline characters in the encoded text. | |||
| 4063 | @node Checksum/Hash | 4086 | @node Checksum/Hash |
| 4064 | @section Checksum/Hash | 4087 | @section Checksum/Hash |
| 4065 | @cindex MD5 checksum | 4088 | @cindex MD5 checksum |
| 4066 | @cindex hashing, secure | 4089 | @cindex SHA hash |
| 4067 | @cindex SHA-1 | 4090 | @cindex hash, cryptographic |
| 4068 | @cindex message digest computation | 4091 | @cindex cryptographic hash |
| 4069 | 4092 | ||
| 4070 | MD5 cryptographic checksums, or @dfn{message digests}, are 128-bit | 4093 | Emacs has built-in support for computing @dfn{cryptographic hashes}. |
| 4071 | ``fingerprints'' of a document or program. They are used to verify | 4094 | A cryptographic hash, or @dfn{checksum}, is a digital ``fingerprint'' |
| 4072 | that you have an exact and unaltered copy of the data. The algorithm | 4095 | of a piece of data (e.g.@: a block of text) which can be used to check |
| 4073 | to calculate the MD5 message digest is defined in Internet | 4096 | that you have an unaltered copy of that data. |
| 4074 | RFC@footnote{ | 4097 | |
| 4075 | For an explanation of what is an RFC, see the footnote in @ref{Base | 4098 | @cindex message digest |
| 4076 | 64}. | 4099 | Emacs supports several common cryptographic hash algorithms: MD5, |
| 4077 | }1321. This section describes the Emacs facilities for computing | 4100 | SHA-1, SHA-2, SHA-224, SHA-256, SHA-384 and SHA-512. MD5 is the |
| 4078 | message digests and other forms of ``secure hash''. | 4101 | oldest of these algorithms, and is commonly used in @dfn{message |
| 4102 | digests} to check the integrity of messages transmitted over a | ||
| 4103 | network. MD5 is not ``collision resistant'' (i.e.@: it is possible to | ||
| 4104 | deliberately design different pieces of data which have the same MD5 | ||
| 4105 | hash), so you should not used it for anything security-related. A | ||
| 4106 | similar theoretical weakness also exists in SHA-1. Therefore, for | ||
| 4107 | security-related applications you should use the other hash types, | ||
| 4108 | such as SHA-2. | ||
| 4079 | 4109 | ||
| 4080 | @defun md5 object &optional start end coding-system noerror | 4110 | @defun secure-hash algorithm object &optional start end binary |
| 4081 | This function returns the MD5 message digest of @var{object}, which | 4111 | This function returns a hash for @var{object}. The argument |
| 4082 | should be a buffer or a string. | 4112 | @var{algorithm} is a symbol stating which hash to compute: one of |
| 4113 | @code{md5}, @code{sha1}, @code{sha224}, @code{sha256}, @code{sha384} | ||
| 4114 | or @code{sha512}. The argument @var{object} should be a buffer or a | ||
| 4115 | string. | ||
| 4083 | 4116 | ||
| 4084 | The two optional arguments @var{start} and @var{end} are character | 4117 | The optional arguments @var{start} and @var{end} are character |
| 4085 | positions specifying the portion of @var{object} to compute the | 4118 | positions specifying the portion of @var{object} to compute the |
| 4086 | message digest for. If they are @code{nil} or omitted, the digest is | 4119 | message digest for. If they are @code{nil} or omitted, the hash is |
| 4087 | computed for the whole of @var{object}. | 4120 | computed for the whole of @var{object}. |
| 4088 | 4121 | ||
| 4089 | The function @code{md5} does not compute the message digest directly | 4122 | If the argument @var{binary} is omitted or @code{nil}, the function |
| 4090 | from the internal Emacs representation of the text (@pxref{Text | 4123 | returns the @dfn{text form} of the hash, as an ordinary Lisp string. |
| 4091 | Representations}). Instead, it encodes the text using a coding | 4124 | If @var{binary} is non-@code{nil}, it returns the hash in @dfn{binary |
| 4092 | system, and computes the message digest from the encoded text. The | 4125 | form}, as a sequence of bytes stored in a unibyte string. |
| 4093 | optional fourth argument @var{coding-system} specifies which coding | 4126 | |
| 4094 | system to use for encoding the text. It should be the same coding | 4127 | This function does not compute the hash directly from the internal |
| 4095 | system that you used to read the text, or that you used or will use | 4128 | representation of @var{object}'s text (@pxref{Text Representations}). |
| 4096 | when saving or sending the text. @xref{Coding Systems}, for more | 4129 | Instead, it encodes the text using a coding system (@pxref{Coding |
| 4097 | information about coding systems. | 4130 | Systems}), and computes the hash from that encoded text. If |
| 4098 | 4131 | @var{object} is a buffer, the coding system used is the one which | |
| 4099 | If @var{coding-system} is @code{nil} or omitted, the default depends | 4132 | would be chosen by default for writing the text into a file. If |
| 4100 | on @var{object}. If @var{object} is a buffer, the default for | 4133 | @var{object} is a string, the user's preferred coding system is used |
| 4101 | @var{coding-system} is whatever coding system would be chosen by | 4134 | (@pxref{Recognize Coding,,, emacs, GNU Emacs Manual}). |
| 4102 | default for writing this text into a file. If @var{object} is a | 4135 | @end defun |
| 4103 | string, the user's most preferred coding system (@pxref{Recognize | 4136 | |
| 4104 | Coding, prefer-coding-system, the description of | 4137 | @defun md5 object &optional start end coding-system noerror |
| 4105 | @code{prefer-coding-system}, emacs, GNU Emacs Manual}) is used. | 4138 | This function returns an MD5 hash. It is semi-obsolete, since for |
| 4139 | most purposes it is equivalent to calling @code{secure-hash} with | ||
| 4140 | @code{md5} as the @var{algorithm} argument. The @var{object}, | ||
| 4141 | @var{start} and @var{end} arguments have the same meanings as in | ||
| 4142 | @code{secure-hash}. | ||
| 4143 | |||
| 4144 | If @var{coding-system} is non-@code{nil}, it specifies a coding system | ||
| 4145 | to use to encode the text; if omitted or @code{nil}, the default | ||
| 4146 | coding system is used, like in @code{secure-hash}. | ||
| 4106 | 4147 | ||
| 4107 | Normally, @code{md5} signals an error if the text can't be encoded | 4148 | Normally, @code{md5} signals an error if the text can't be encoded |
| 4108 | using the specified or chosen coding system. However, if | 4149 | using the specified or chosen coding system. However, if |
| @@ -4110,65 +4151,53 @@ using the specified or chosen coding system. However, if | |||
| 4110 | coding instead. | 4151 | coding instead. |
| 4111 | @end defun | 4152 | @end defun |
| 4112 | 4153 | ||
| 4113 | @defun secure-hash algorithm object &optional start end binary | 4154 | @node Parsing HTML/XML |
| 4114 | This function provides a general interface to a variety of secure | 4155 | @section Parsing HTML and XML |
| 4115 | hashing algorithms. As well as the MD5 algorithm, it supports SHA-1, | ||
| 4116 | SHA-2, SHA-224, SHA-256, SHA-384 and SHA-512. The argument | ||
| 4117 | @var{algorithm} is a symbol stating which hash to compute. The | ||
| 4118 | arguments @var{object}, @var{start}, and @var{end} are as for the | ||
| 4119 | @code{md5} function. If the optional argument @var{binary} is | ||
| 4120 | non-@code{nil}, returns a string in binary form. | ||
| 4121 | @end defun | ||
| 4122 | |||
| 4123 | @node Parsing HTML | ||
| 4124 | @section Parsing HTML | ||
| 4125 | @cindex parsing html | 4156 | @cindex parsing html |
| 4126 | 4157 | ||
| 4158 | When Emacs is compiled with libxml2 support, the following functions | ||
| 4159 | are available to parse HTML or XML text into Lisp object trees. | ||
| 4160 | |||
| 4127 | @defun libxml-parse-html-region start end &optional base-url | 4161 | @defun libxml-parse-html-region start end &optional base-url |
| 4128 | This function provides HTML parsing via the @code{libxml2} library. | 4162 | This function parses the text between @var{start} and @var{end} as |
| 4129 | It parses ``real world'' HTML and tries to return a sensible parse tree | 4163 | HTML, and returns a list representing the HTML @dfn{parse tree}. It |
| 4130 | regardless. | 4164 | attempts to handle ``real world'' HTML by robustly coping with syntax |
| 4165 | mistakes. | ||
| 4131 | 4166 | ||
| 4132 | In addition to @var{start} and @var{end} (specifying the start and end | 4167 | The optional argument @var{base-url}, if non-@code{nil}, should be a |
| 4133 | of the region to act on), it takes an optional parameter, | 4168 | string specifying the base URL for relative URLs occurring in links. |
| 4134 | @var{base-url}, which is used to expand relative URLs in the document, | ||
| 4135 | if any. | ||
| 4136 | 4169 | ||
| 4137 | Here's an example demonstrating the structure of the parsed data you | 4170 | In the parse tree, each HTML node is represented by a list in which |
| 4138 | get out. Given this HTML document: | 4171 | the first element is a symbol representing the node name, the second |
| 4172 | element is an alist of node attributes, and the remaining elements are | ||
| 4173 | the subnodes. | ||
| 4174 | |||
| 4175 | The following example demonstrates this. Given this (malformed) HTML | ||
| 4176 | document: | ||
| 4139 | 4177 | ||
| 4140 | @example | 4178 | @example |
| 4141 | <html><hEad></head><body width=101><div class=thing>Foo<div>Yes | 4179 | <html><head></head><body width=101><div class=thing>Foo<div>Yes |
| 4142 | @end example | 4180 | @end example |
| 4143 | 4181 | ||
| 4144 | You get this parse tree: | 4182 | @noindent |
| 4183 | A call to @code{libxml-parse-html-region} returns this: | ||
| 4145 | 4184 | ||
| 4146 | @example | 4185 | @example |
| 4147 | (html | 4186 | (html () |
| 4148 | (head) | 4187 | (head ()) |
| 4149 | (body | 4188 | (body ((width . "101")) |
| 4150 | (:width . "101") | 4189 | (div ((class . "thing")) |
| 4151 | (div | 4190 | "Foo" |
| 4152 | (:class . "thing") | 4191 | (div () |
| 4153 | (text . "Foo") | 4192 | "Yes")))) |
| 4154 | (div | ||
| 4155 | (text . "Yes\n"))))) | ||
| 4156 | @end example | 4193 | @end example |
| 4157 | |||
| 4158 | It's a simple tree structure, where the @code{car} for each node is | ||
| 4159 | the name of the node, and the @code{cdr} is the value, or the list of | ||
| 4160 | values. | ||
| 4161 | |||
| 4162 | Attributes are coded the same way as child nodes, but with @samp{:} as | ||
| 4163 | the first character. | ||
| 4164 | @end defun | 4194 | @end defun |
| 4165 | 4195 | ||
| 4166 | @cindex parsing xml | 4196 | @cindex parsing xml |
| 4167 | @defun libxml-parse-xml-region start end &optional base-url | 4197 | @defun libxml-parse-xml-region start end &optional base-url |
| 4168 | 4198 | This function is the same as @code{libxml-parse-html-region}, except | |
| 4169 | This is much the same as @code{libxml-parse-html-region} above, but | 4199 | that it parses the text as XML rather than HTML (so it is stricter |
| 4170 | operates on XML instead of HTML, and is correspondingly stricter about | 4200 | about syntax). |
| 4171 | syntax. | ||
| 4172 | @end defun | 4201 | @end defun |
| 4173 | 4202 | ||
| 4174 | @node Atomic Changes | 4203 | @node Atomic Changes |
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index a92a807b747..58092f23157 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -1076,7 +1076,8 @@ Text | |||
| 1076 | * Registers:: How registers are implemented. Accessing | 1076 | * Registers:: How registers are implemented. Accessing |
| 1077 | the text or position stored in a register. | 1077 | the text or position stored in a register. |
| 1078 | * Base 64:: Conversion to or from base 64 encoding. | 1078 | * Base 64:: Conversion to or from base 64 encoding. |
| 1079 | * Checksum/Hash:: Computing "message digests"/"checksums"/"hashes". | 1079 | * Checksum/Hash:: Computing cryptographic hashes. |
| 1080 | * Parsing HTML/XML:: Parsing HTML and XML. | ||
| 1080 | * Atomic Changes:: Installing several buffer changes "atomically". | 1081 | * Atomic Changes:: Installing several buffer changes "atomically". |
| 1081 | * Change Hooks:: Supplying functions to be run when text is changed. | 1082 | * Change Hooks:: Supplying functions to be run when text is changed. |
| 1082 | 1083 | ||
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 97b21aba10b..a42b70d77a4 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -1075,7 +1075,8 @@ Text | |||
| 1075 | * Registers:: How registers are implemented. Accessing | 1075 | * Registers:: How registers are implemented. Accessing |
| 1076 | the text or position stored in a register. | 1076 | the text or position stored in a register. |
| 1077 | * Base 64:: Conversion to or from base 64 encoding. | 1077 | * Base 64:: Conversion to or from base 64 encoding. |
| 1078 | * Checksum/Hash:: Computing "message digests"/"checksums"/"hashes". | 1078 | * Checksum/Hash:: Computing cryptographic hashes. |
| 1079 | * Parsing HTML/XML:: Parsing HTML and XML. | ||
| 1079 | * Atomic Changes:: Installing several buffer changes "atomically". | 1080 | * Atomic Changes:: Installing several buffer changes "atomically". |
| 1080 | * Change Hooks:: Supplying functions to be run when text is changed. | 1081 | * Change Hooks:: Supplying functions to be run when text is changed. |
| 1081 | 1082 | ||
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 07be7fa9079..b541b2419c8 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -3142,7 +3142,7 @@ as @code{save-window-excursion}: | |||
| 3142 | @end example | 3142 | @end example |
| 3143 | @end defun | 3143 | @end defun |
| 3144 | 3144 | ||
| 3145 | @defspec save-window-excursion forms@dots{} | 3145 | @defmac save-window-excursion forms@dots{} |
| 3146 | This special form records the window configuration, executes @var{forms} | 3146 | This special form records the window configuration, executes @var{forms} |
| 3147 | in sequence, then restores the earlier window configuration. The window | 3147 | in sequence, then restores the earlier window configuration. The window |
| 3148 | configuration includes, for each window, the value of point and the | 3148 | configuration includes, for each window, the value of point and the |
| @@ -3179,7 +3179,7 @@ For example: | |||
| 3179 | ;; @r{The screen is now split again.} | 3179 | ;; @r{The screen is now split again.} |
| 3180 | @end group | 3180 | @end group |
| 3181 | @end example | 3181 | @end example |
| 3182 | @end defspec | 3182 | @end defmac |
| 3183 | 3183 | ||
| 3184 | @defun window-configuration-p object | 3184 | @defun window-configuration-p object |
| 3185 | This function returns @code{t} if @var{object} is a window configuration. | 3185 | This function returns @code{t} if @var{object} is a window configuration. |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 1691c979fb6..c95aaa9b15d 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-03-10 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * info.texi (Expert Info): Move the index entry for "Texinfo" from | ||
| 4 | "Getting Started" to this node. (Bug#10450) | ||
| 5 | |||
| 6 | 2012-03-10 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * flymake.texi (Example -- Configuring a tool called via make): | ||
| 9 | Mention the Automake COMPILE variable (Bug#8715). | ||
| 10 | |||
| 11 | * info.texi (Getting Started): Add an index entry (Bug#10450). | ||
| 12 | |||
| 1 | 2012-03-02 Michael Albinus <michael.albinus@gmx.de> | 13 | 2012-03-02 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 14 | ||
| 3 | * dbus.texi (Signals): Known names will be mapped onto unique | 15 | * dbus.texi (Signals): Known names will be mapped onto unique |
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 687a2f7b4d4..28fb7864f06 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi | |||
| @@ -449,10 +449,10 @@ Finally, we add an entry to @code{flymake-err-line-patterns}: | |||
| 449 | @cindex Adding support for C (gcc+make) | 449 | @cindex Adding support for C (gcc+make) |
| 450 | 450 | ||
| 451 | In this example we will add support for C files syntax checked by | 451 | In this example we will add support for C files syntax checked by |
| 452 | @code{gcc} called via @code{make}. | 452 | @command{gcc} called via @command{make}. |
| 453 | 453 | ||
| 454 | We're not required to write any new functions, as Flymake already has | 454 | We're not required to write any new functions, as Flymake already has |
| 455 | functions for @code{make}. We just add a new entry to the | 455 | functions for @command{make}. We just add a new entry to the |
| 456 | @code{flymake-allowed-file-name-masks}: | 456 | @code{flymake-allowed-file-name-masks}: |
| 457 | 457 | ||
| 458 | @lisp | 458 | @lisp |
| @@ -464,7 +464,7 @@ functions for @code{make}. We just add a new entry to the | |||
| 464 | flymake-allowed-file-name-masks)) | 464 | flymake-allowed-file-name-masks)) |
| 465 | @end lisp | 465 | @end lisp |
| 466 | 466 | ||
| 467 | @code{flymake-simple-make-init} builds the following @code{make} | 467 | @code{flymake-simple-make-init} builds the following @command{make} |
| 468 | command line: | 468 | command line: |
| 469 | 469 | ||
| 470 | @lisp | 470 | @lisp |
| @@ -486,9 +486,17 @@ check-syntax: | |||
| 486 | gcc -o /dev/null -S ${CHK_SOURCES} | 486 | gcc -o /dev/null -S ${CHK_SOURCES} |
| 487 | @end verbatim | 487 | @end verbatim |
| 488 | 488 | ||
| 489 | The format of error messages reported by @code{gcc} is already | 489 | @noindent |
| 490 | The format of error messages reported by @command{gcc} is already | ||
| 490 | supported by Flymake, so we don't have to add a new entry to | 491 | supported by Flymake, so we don't have to add a new entry to |
| 491 | @code{flymake-err-line-patterns}. | 492 | @code{flymake-err-line-patterns}. Note that if you are using |
| 493 | Automake, you may want to replace @code{gcc} with the standard | ||
| 494 | Automake variable @code{COMPILE}: | ||
| 495 | |||
| 496 | @verbatim | ||
| 497 | check-syntax: | ||
| 498 | $(COMPILE) -o /dev/null -S ${CHK_SOURCES} | ||
| 499 | @end verbatim | ||
| 492 | 500 | ||
| 493 | @node Flymake Implementation | 501 | @node Flymake Implementation |
| 494 | @chapter Flymake Implementation | 502 | @chapter Flymake Implementation |
| @@ -548,9 +556,9 @@ These modes are handled inside init/cleanup/getfname functions, see | |||
| 548 | @ref{Adding support for a new syntax check tool}. | 556 | @ref{Adding support for a new syntax check tool}. |
| 549 | 557 | ||
| 550 | Flymake contains implementations of all functionality required to | 558 | Flymake contains implementations of all functionality required to |
| 551 | support different syntax check modes described above (making | 559 | support different syntax check modes described above (making temporary |
| 552 | temporary copies, finding master files, etc.), as well as some | 560 | copies, finding master files, etc.), as well as some tool-specific |
| 553 | tool-specific (routines for @code{make}, @code{Ant}, etc.) code. | 561 | (routines for Make, Ant, etc.) code. |
| 554 | 562 | ||
| 555 | 563 | ||
| 556 | @node Making a temporary copy | 564 | @node Making a temporary copy |
| @@ -626,8 +634,8 @@ Therefore, a customizable variable | |||
| 626 | way to implement the desired behavior. | 634 | way to implement the desired behavior. |
| 627 | 635 | ||
| 628 | The default implementation, @code{flymake-get-project-include-dirs-imp}, | 636 | The default implementation, @code{flymake-get-project-include-dirs-imp}, |
| 629 | uses a @code{make} call. This requires a correct base directory, that is, a | 637 | uses a @command{make} call. This requires a correct base directory, that is, a |
| 630 | directory containing a correct @code{Makefile}, to be determined. | 638 | directory containing a correct @file{Makefile}, to be determined. |
| 631 | 639 | ||
| 632 | As obtaining the project include directories might be a costly operation, its | 640 | As obtaining the project include directories might be a costly operation, its |
| 633 | return value is cached in the hash table. The cache is cleared in the beginning | 641 | return value is cached in the hash table. The cache is cleared in the beginning |
| @@ -641,16 +649,16 @@ of every syntax check attempt. | |||
| 641 | 649 | ||
| 642 | Flymake can be configured to use different tools for performing syntax | 650 | Flymake can be configured to use different tools for performing syntax |
| 643 | checks. For example, it can use direct compiler call to syntax check a perl | 651 | checks. For example, it can use direct compiler call to syntax check a perl |
| 644 | script or a call to @code{make} for a more complicated case of a | 652 | script or a call to @command{make} for a more complicated case of a |
| 645 | @code{C/C++} source. The general idea is that simple files, like perl | 653 | @code{C/C++} source. The general idea is that simple files, like perl |
| 646 | scripts and html pages, can be checked by directly invoking a | 654 | scripts and html pages, can be checked by directly invoking a |
| 647 | corresponding tool. Files that are usually more complex and generally | 655 | corresponding tool. Files that are usually more complex and generally |
| 648 | used as part of larger projects, might require non-trivial options to | 656 | used as part of larger projects, might require non-trivial options to |
| 649 | be passed to the syntax check tool, like include directories for | 657 | be passed to the syntax check tool, like include directories for |
| 650 | C++. The latter files are syntax checked using some build tool, like | 658 | C++. The latter files are syntax checked using some build tool, like |
| 651 | @code{make} or @code{Ant}. | 659 | Make or Ant. |
| 652 | 660 | ||
| 653 | All @code{make} configuration data is usually stored in a file called | 661 | All Make configuration data is usually stored in a file called |
| 654 | @code{Makefile}. To allow for future extensions, flymake uses a notion of | 662 | @code{Makefile}. To allow for future extensions, flymake uses a notion of |
| 655 | buildfile to reference the 'project configuration' file. | 663 | buildfile to reference the 'project configuration' file. |
| 656 | 664 | ||
diff --git a/doc/misc/info.texi b/doc/misc/info.texi index ed00e8da028..8952bfb9122 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi | |||
| @@ -1235,6 +1235,7 @@ this: | |||
| 1235 | 1235 | ||
| 1236 | @node Expert Info | 1236 | @node Expert Info |
| 1237 | @chapter Info for Experts | 1237 | @chapter Info for Experts |
| 1238 | @cindex Texinfo | ||
| 1238 | 1239 | ||
| 1239 | This chapter explains how to write an Info file by hand. However, | 1240 | This chapter explains how to write an Info file by hand. However, |
| 1240 | in most cases, writing a Texinfo file is better, since you can use it | 1241 | in most cases, writing a Texinfo file is better, since you can use it |