Changeset 4148 for trunk/lispref/text.texi
- Timestamp:
- 08/18/06 08:35:31 (2 years ago)
- Files:
-
- trunk/lispref/text.texi (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lispref/text.texi
r4140 r4148 104 104 point is at the end of the buffer, then @code{following-char} returns 0. 105 105 106 Remember that point is always between characters, and the terminal107 cursor normally appears over the character following point. Therefore, 108 thecharacter returned by @code{following-char} is the character the106 Remember that point is always between characters, and the cursor 107 normally appears over the character following point. Therefore, the 108 character returned by @code{following-char} is the character the 109 109 cursor is over. 110 110 … … 527 527 @end deffn 528 528 529 @deffn Command split-line530 This command splits the current line, moving the portion of the line531 after point down vertically so that it is on the next line directly532 below where it was before. Whitespace is inserted as needed at the533 beginning of the lower line, using the @code{indent-to} function.534 @code{split-line} returns the position of point.535 536 Programs hardly ever use this function.537 @end deffn538 539 529 @defvar overwrite-mode 540 530 This variable controls whether overwrite mode is in effect. The value … … 979 969 @subsection Functions for Yanking 980 970 981 @dfn{Yanking} means reinserting an entry of previously killed text 982 from the kill ring. The text properties are copied too. 971 This section describes higher-level commands for yanking, which are 972 intended primarily for the user but useful also in Lisp programs. 973 Both @code{yank} and @code{yank-pop} honor the 974 @code{yank-excluded-properties} variable and @code{yank-handler} text 975 property (@pxref{Yanking}). 983 976 984 977 @deffn Command yank &optional arg … … 1214 1207 don't have one are usually special-purpose buffers for which Emacs 1215 1208 assumes that undoing is not useful. In particular, any buffer whose 1216 name begins with a space has its undo recording off by default ,1209 name begins with a space has its undo recording off by default; 1217 1210 see @ref{Buffer Names}.) All the primitives that modify the 1218 1211 text in the buffer automatically add elements to the front of the undo … … 1319 1312 This is the basic function for undoing elements of an undo list. 1320 1313 It undoes the first @var{count} elements of @var{list}, returning 1321 the rest of @var{list}. You could write this function in Lisp, 1322 but it is convenient to have it in C. 1314 the rest of @var{list}. 1323 1315 1324 1316 @code{primitive-undo} adds elements to the buffer's undo list when it … … 1373 1365 strings of deleted text.) Three variables control the range of acceptable 1374 1366 sizes: @code{undo-limit}, @code{undo-strong-limit} and 1375 @code{undo-outer-limit}. 1367 @code{undo-outer-limit}. In these variables, size is counted as the 1368 number of bytes occupied, which includes both saved text and other 1369 data. 1376 1370 1377 1371 @defopt undo-limit … … 1391 1385 exceeds this limit, Emacs discards the info and displays a warning. 1392 1386 This is a last ditch limit to prevent memory overflow. 1387 @end defopt 1388 1389 @defopt undo-ask-before-discard 1390 If this variable is non-@code{nil}, when the undo info exceeds 1391 @code{undo-outer-limit}, Emacs asks in the echo area whether to 1392 discard the info. The default value is @code{nil}, which means to 1393 discard it automatically. 1394 1395 This option is mainly intended for debugging. Garbage collection is 1396 inhibited while the question is asked, which means that Emacs might 1397 leak memory if the user waits too long before answering the question. 1393 1398 @end defopt 1394 1399 … … 1482 1487 filling when @var{justify} is non-@code{nil}. 1483 1488 1484 In an interactive call, any prefix argument requests justification.1485 1486 1489 If @var{nosqueeze} is non-@code{nil}, that means to leave whitespace 1487 1490 other than line breaks untouched. If @var{squeeze-after} is … … 1523 1526 This function returns the proper justification style to use for filling 1524 1527 the text around point. 1528 1529 This returns the value of the @code{justification} text property at 1530 point, or the variable @var{default-justification} if there is no such 1531 text property. However, it returns @code{nil} rather than @code{none} 1532 to mean ``don't justify''. 1525 1533 @end defun 1526 1534 … … 1570 1578 1571 1579 @defopt fill-prefix 1572 This buffer-local variable specifies a string of text that appears at1573 t he beginning1574 of normal text lines and should be disregarded when filling them. Any 1575 line that fails to start with the fill prefix is considered the start of 1576 a paragraph; so is any line that starts with the fill prefix followed by 1577 additional whitespace. Lines that start with the fill prefix but no 1578 additional whitespace are ordinary text lines that can befilled1579 together. The resulting filledlines also start with the fill prefix.1580 This buffer-local variable, if non-@code{nil}, specifies a string of 1581 text that appears at the beginning of normal text lines and should be 1582 disregarded when filling them. Any line that fails to start with the 1583 fill prefix is considered the start of a paragraph; so is any line 1584 that starts with the fill prefix followed by additional whitespace. 1585 Lines that start with the fill prefix but no additional whitespace are 1586 ordinary text lines that can be filled together. The resulting filled 1587 lines also start with the fill prefix. 1580 1588 1581 1589 The fill prefix follows the left margin whitespace, if any. … … 1662 1670 @defvar fill-nobreak-predicate 1663 1671 This variable gives major modes a way to specify not to break a line 1664 at certain places. Its value should be a list of functions, but a 1665 single function is also supported for compatibility. Whenever filling 1666 considers breaking the line at a certain place in the buffer, it calls 1667 each of these functions with no arguments and with point located at 1668 that place. If any of the functions returns non-@code{nil}, then the 1669 line won't be broken there. 1672 at certain places. Its value should be a list of functions. Whenever 1673 filling considers breaking the line at a certain place in the buffer, 1674 it calls each of these functions with no arguments and with point 1675 located at that place. If any of the functions returns 1676 non-@code{nil}, then the line won't be broken there. 1670 1677 @end defvar 1671 1678 … … 1734 1741 characters it matches are that line's candidate for the fill prefix. 1735 1742 1736 @w{@code{"[ \t]*\\([- |#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"}} is the1743 @w{@code{"[ \t]*\\([-!|#%;>*·â¢â£ââŠ]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"}} is the 1737 1744 default value. This matches a number enclosed in parentheses or 1738 1745 followed by a period, or certain punctuation characters, or any … … 1899 1906 (narrow-to-region beg end) 1900 1907 (goto-char (point-min)) 1901 (sort-subr reverse 'forward-line 'end-of-line)))) 1908 (let ((inhibit-field-text-motion t)) 1909 (sort-subr reverse 'forward-line 'end-of-line))))) 1902 1910 @end group 1903 1911 @end example … … 2055 2063 @var{end}, are included in the region sorted. 2056 2064 2057 Note that @code{sort-columns} uses the @code{sort} utility program, 2058 and so cannot work properly on text containing tab characters. Use 2059 @kbd{M-x untabify} to convert tabs to spaces before sorting. 2065 Note that @code{sort-columns} rejects text that contains tabs, because 2066 tabs could be split across the specified columns. Use @kbd{M-x 2067 untabify} to convert tabs to spaces before sorting. 2068 2069 When possible, this command actually works by calling the @code{sort} 2070 utility program. 2060 2071 @end deffn 2061 2072 … … 2392 2403 Display}). Note that the @key{TAB} character as input uses this tab 2393 2404 stop feature only in a few major modes, such as Text mode. 2405 @xref{Tab Stops,,, emacs, The GNU Emacs Manual}. 2394 2406 2395 2407 @deffn Command tab-to-tab-stop … … 3080 3092 @kindex keymap @r{(text property)} 3081 3093 The @code{keymap} property specifies an additional keymap for 3082 commands. The property's value for the character before point applies 3083 if it is non-@code{nil} and rear-sticky, and the property's value for 3084 the character after point applies if it is non-@code{nil} and 3094 commands. When this keymap applies, it is used for key lookup before 3095 the minor mode keymaps and before the buffer's local map. 3096 @xref{Active Keymaps}. If the property value is a symbol, the 3097 symbol's function definition is used as the keymap. 3098 3099 The property's value for the character before point applies if it is 3100 non-@code{nil} and rear-sticky, and the property's value for the 3101 character after point applies if it is non-@code{nil} and 3085 3102 front-sticky. (For mouse clicks, the position of the click is used 3086 instead of the position of point.) If the property value is a symbol, 3087 the symbol's function definition is used as the keymap. 3088 3089 When this keymap applies, it is used for key lookup before the minor 3090 mode keymaps and before the buffer's local map. @xref{Active 3091 Keymaps}. 3103 instead of the position of point.) 3092 3104 3093 3105 @item local-map … … 3095 3107 This property works like @code{keymap} except that it specifies a 3096 3108 keymap to use @emph{instead of} the buffer's local map. For most 3097 purposes (perhaps all purposes), the @code{keymap} is superior. 3109 purposes (perhaps all purposes), it is better to use the @code{keymap} 3110 property. 3098 3111 3099 3112 @item syntax-table … … 3480 3493 @cindex clickable text 3481 3494 3482 There are two parts of setting up @dfn{clickable text} in a buffer: 3483 (1) to indicate clickability when the mouse moves over the text, and (2) 3484 to make a mouse button do something when you click on that text. 3495 @dfn{Clickable text} is text that can be clicked, with either the 3496 the mouse or via keyboard commands, to produce some result. Many 3497 major modes use clickable text to implement features such as 3498 hyper-links. The @code{button} package provides an easy way to insert 3499 and manipulate clickable text. @xref{Buttons}. 3500 3501 In this section, we will explain how to manually set up clickable 3502 text in a buffer using text properties. This involves two things: (1) 3503 indicating clickability when the mouse moves over the text, and (2) 3504 making @kbd{RET} or a mouse click on that text do something. 3485 3505 3486 3506 Indicating clickability usually involves highlighting the text, and
