Mercurial > emacs
comparison lispref/text.texi @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | 0ca0d9181b5e 9b969687ff7c |
children | c5406394f567 |
comparison
equal
deleted
inserted
replaced
90260:0ca0d9181b5e | 90261:7beb78bc1f8e |
---|---|
468 is the most frequently called function in Emacs, but programs rarely use | 468 is the most frequently called function in Emacs, but programs rarely use |
469 it except to install it on a keymap. | 469 it except to install it on a keymap. |
470 | 470 |
471 In an interactive call, @var{count} is the numeric prefix argument. | 471 In an interactive call, @var{count} is the numeric prefix argument. |
472 | 472 |
473 Self-insertion translates the input character through | |
474 @code{translation-table-for-input}. @xref{Translation of Characters}. | |
475 | |
473 This command calls @code{auto-fill-function} whenever that is | 476 This command calls @code{auto-fill-function} whenever that is |
474 non-@code{nil} and the character inserted is in the table | 477 non-@code{nil} and the character inserted is in the table |
475 @code{auto-fill-chars} (@pxref{Auto Filling}). | 478 @code{auto-fill-chars} (@pxref{Auto Filling}). |
476 | 479 |
477 @c Cross refs reworded to prevent overfull hbox. --rjc 15mar92 | 480 @c Cross refs reworded to prevent overfull hbox. --rjc 15mar92 |
478 This command performs abbrev expansion if Abbrev mode is enabled and | 481 This command performs abbrev expansion if Abbrev mode is enabled and |
479 the inserted character does not have word-constituent | 482 the inserted character does not have word-constituent |
480 syntax. (@xref{Abbrevs}, and @ref{Syntax Class Table}.) | 483 syntax. (@xref{Abbrevs}, and @ref{Syntax Class Table}.) It is also |
481 | 484 responsible for calling @code{blink-paren-function} when the inserted |
482 This is also responsible for calling @code{blink-paren-function} when | 485 character has close parenthesis syntax (@pxref{Blinking}). |
483 the inserted character has close parenthesis syntax (@pxref{Blinking}). | |
484 | 486 |
485 Do not try substituting your own definition of | 487 Do not try substituting your own definition of |
486 @code{self-insert-command} for the standard one. The editor command | 488 @code{self-insert-command} for the standard one. The editor command |
487 loop handles this function specially. | 489 loop handles this function specially. |
488 @end deffn | 490 @end deffn |
1239 | 1241 |
1240 @example | 1242 @example |
1241 (put-text-property @var{beg} @var{end} @var{property} @var{value}) | 1243 (put-text-property @var{beg} @var{end} @var{property} @var{value}) |
1242 @end example | 1244 @end example |
1243 | 1245 |
1244 @item (apply @var{funname} . @var{args}) | |
1245 This kind of element records a change that can be undone by evaluating | |
1246 (@code{apply} @var{funname} @var{args}). | |
1247 | |
1248 @item (apply @var{delta} @var{beg} @var{end} @var{funname} . @var{args}) | |
1249 This kind of element records a change that can be undone by evaluating | |
1250 (@code{apply} @var{funname} @var{args}). The integer values @var{beg} | |
1251 and @var{end} is buffer positions of the range affected by this change | |
1252 and @var{delta} is an integer value which is the number of bytes added | |
1253 or deleted in that range by this change. This kind of element | |
1254 enables undo limited to a region to determine whether the element | |
1255 pertains to that region. | |
1256 | |
1257 @item (@var{marker} . @var{adjustment}) | 1246 @item (@var{marker} . @var{adjustment}) |
1258 This kind of element records the fact that the marker @var{marker} was | 1247 This kind of element records the fact that the marker @var{marker} was |
1259 relocated due to deletion of surrounding text, and that it moved | 1248 relocated due to deletion of surrounding text, and that it moved |
1260 @var{adjustment} character positions. Undoing this element moves | 1249 @var{adjustment} character positions. Undoing this element moves |
1261 @var{marker} @minus{} @var{adjustment} characters. | 1250 @var{marker} @minus{} @var{adjustment} characters. |
1267 @item (apply @var{delta} @var{beg} @var{end} @var{funname} . @var{args}) | 1256 @item (apply @var{delta} @var{beg} @var{end} @var{funname} . @var{args}) |
1268 This is an extensible undo item, which records a change limited to the | 1257 This is an extensible undo item, which records a change limited to the |
1269 range @var{beg} to @var{end}, which increased the size of the buffer | 1258 range @var{beg} to @var{end}, which increased the size of the buffer |
1270 by @var{delta}. It is undone by calling @var{funname} with arguments | 1259 by @var{delta}. It is undone by calling @var{funname} with arguments |
1271 @var{args}. | 1260 @var{args}. |
1261 | |
1262 This kind of element enables undo limited to a region to determine | |
1263 whether the element pertains to that region. | |
1272 | 1264 |
1273 @item nil | 1265 @item nil |
1274 This element is a boundary. The elements between two boundaries are | 1266 This element is a boundary. The elements between two boundaries are |
1275 called a @dfn{change group}; normally, each change group corresponds to | 1267 called a @dfn{change group}; normally, each change group corresponds to |
1276 one keyboard command, and undo commands normally undo an entire group as | 1268 one keyboard command, and undo commands normally undo an entire group as |
1804 The sorting functions described in this section all rearrange text in | 1796 The sorting functions described in this section all rearrange text in |
1805 a buffer. This is in contrast to the function @code{sort}, which | 1797 a buffer. This is in contrast to the function @code{sort}, which |
1806 rearranges the order of the elements of a list (@pxref{Rearrangement}). | 1798 rearranges the order of the elements of a list (@pxref{Rearrangement}). |
1807 The values returned by these functions are not meaningful. | 1799 The values returned by these functions are not meaningful. |
1808 | 1800 |
1809 @defun sort-subr reverse nextrecfun endrecfun &optional startkeyfun endkeyfun | 1801 @defun sort-subr reverse nextrecfun endrecfun &optional startkeyfun endkeyfun predicate |
1810 This function is the general text-sorting routine that subdivides a | 1802 This function is the general text-sorting routine that subdivides a |
1811 buffer into records and then sorts them. Most of the commands in this | 1803 buffer into records and then sorts them. Most of the commands in this |
1812 section use this function. | 1804 section use this function. |
1813 | 1805 |
1814 To understand how @code{sort-subr} works, consider the whole accessible | 1806 To understand how @code{sort-subr} works, consider the whole accessible |
1857 @var{startkeyfun} returns @code{nil} and this argument is omitted (or | 1849 @var{startkeyfun} returns @code{nil} and this argument is omitted (or |
1858 @code{nil}), then the sort key extends to the end of the record. There | 1850 @code{nil}), then the sort key extends to the end of the record. There |
1859 is no need for @var{endkeyfun} if @var{startkeyfun} returns a | 1851 is no need for @var{endkeyfun} if @var{startkeyfun} returns a |
1860 non-@code{nil} value. | 1852 non-@code{nil} value. |
1861 @end enumerate | 1853 @end enumerate |
1854 | |
1855 The argument @var{predicate} is the function to use to compare keys. | |
1856 If keys are numbers, it defaults to @code{<}; otherwise it defaults to | |
1857 @code{string<}. | |
1862 | 1858 |
1863 As an example of @code{sort-subr}, here is the complete function | 1859 As an example of @code{sort-subr}, here is the complete function |
1864 definition for @code{sort-lines}: | 1860 definition for @code{sort-lines}: |
1865 | 1861 |
1866 @example | 1862 @example |
2716 list. | 2712 list. |
2717 @end defun | 2713 @end defun |
2718 | 2714 |
2719 @defun remove-list-of-text-properties start end list-of-properties &optional object | 2715 @defun remove-list-of-text-properties start end list-of-properties &optional object |
2720 Like @code{remove-text-properties} except that | 2716 Like @code{remove-text-properties} except that |
2721 @var{list-of-properties} is a list property names only, not an | 2717 @var{list-of-properties} is a list of property names only, not an |
2722 alternating list of property names and values. | 2718 alternating list of property names and values. |
2723 @end defun | 2719 @end defun |
2724 | 2720 |
2725 @defun set-text-properties start end props &optional object | 2721 @defun set-text-properties start end props &optional object |
2726 This function completely replaces the text property list for the text | 2722 This function completely replaces the text property list for the text |
2737 from the specified range of text. Here's an example: | 2733 from the specified range of text. Here's an example: |
2738 | 2734 |
2739 @example | 2735 @example |
2740 (set-text-properties @var{start} @var{end} nil) | 2736 (set-text-properties @var{start} @var{end} nil) |
2741 @end example | 2737 @end example |
2738 | |
2739 Do not rely on the return value of this function. | |
2742 @end defun | 2740 @end defun |
2743 | 2741 |
2744 The easiest way to make a string with text properties | 2742 The easiest way to make a string with text properties |
2745 is with @code{propertize}: | 2743 is with @code{propertize}: |
2746 | 2744 |