diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 73 | ||||
| -rw-r--r-- | doc/emacs/arevert-xtra.texi | 10 | ||||
| -rw-r--r-- | doc/emacs/basic.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/buffers.texi | 110 | ||||
| -rw-r--r-- | doc/emacs/calendar.texi | 13 | ||||
| -rw-r--r-- | doc/emacs/commands.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 21 | ||||
| -rw-r--r-- | doc/emacs/display.texi | 405 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 667 | ||||
| -rw-r--r-- | doc/emacs/fixit.texi | 93 | ||||
| -rw-r--r-- | doc/emacs/fortran-xtra.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/frames.texi | 121 | ||||
| -rw-r--r-- | doc/emacs/help.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/killing.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/kmacro.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/macos.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/mini.texi | 86 | ||||
| -rw-r--r-- | doc/emacs/programs.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/rmail.texi | 13 | ||||
| -rw-r--r-- | doc/emacs/screen.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 215 | ||||
| -rw-r--r-- | doc/emacs/windows.texi | 4 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/misc/trampver.texi | 2 |
25 files changed, 934 insertions, 927 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 15b84c27075..a1310e87b15 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,76 @@ | |||
| 1 | 2011-10-24 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (Scrolling): Document scroll-up-line and | ||
| 4 | scroll-down-line. Document scroll-command property. | ||
| 5 | (Recentering): New node, split off from Scrolling. | ||
| 6 | |||
| 7 | 2011-10-23 Chong Yidong <cyd@gnu.org> | ||
| 8 | |||
| 9 | * frames.texi (Scroll Bars): GTK uses right scroll bars now. | ||
| 10 | (Tool Bars): Copyedits. | ||
| 11 | |||
| 12 | * buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only. | ||
| 13 | |||
| 14 | 2011-10-22 Chong Yidong <cyd@gnu.org> | ||
| 15 | |||
| 16 | * windows.texi (Displaying Buffers): Fix broken lispref link. | ||
| 17 | |||
| 18 | 2011-10-22 Chong Yidong <cyd@gnu.org> | ||
| 19 | |||
| 20 | * mini.texi (Minibuffer Exit): Rename from Strict Completion. | ||
| 21 | Move confirm-nonexistent-file-or-buffer discussion here. | ||
| 22 | |||
| 23 | * files.texi (File Names, Visiting): Move detailed discussion of | ||
| 24 | minibuffer confirmation to Minibuffer Exit. | ||
| 25 | |||
| 26 | * buffers.texi (Buffers): Tweak mention of mail buffer name. | ||
| 27 | (Select Buffer): Move confirmation discussion to Minibuffer Exit. | ||
| 28 | |||
| 29 | 2011-10-21 Chong Yidong <cyd@gnu.org> | ||
| 30 | |||
| 31 | * files.texi (File Names, Visiting, Interlocking): Copyedits. | ||
| 32 | (Backup Copying): backup-by-copying-when-mismatch is now t. | ||
| 33 | (Customize Save): Fix description of require-final-newline. | ||
| 34 | (Reverting): Note that revert-buffer can't be undone. Mention VC. | ||
| 35 | (Auto Save Control): Clarify. | ||
| 36 | (File Archives): Add 7z. | ||
| 37 | (Remote Files): ange-ftp-make-backup-files defaults to nil. | ||
| 38 | |||
| 39 | * arevert-xtra.texi (Autorevert): Copyedits. | ||
| 40 | |||
| 41 | 2011-10-20 Chong Yidong <cyd@gnu.org> | ||
| 42 | |||
| 43 | * custom.texi (Hooks, Init Examples): | ||
| 44 | * display.texi (Font Lock): | ||
| 45 | * fixit.texi (Spelling): | ||
| 46 | * rmail.texi (Rmail Display): Minor mode function with no arg now | ||
| 47 | enables it. | ||
| 48 | |||
| 49 | * fixit.texi (Spelling): Fix description of inline completion. | ||
| 50 | |||
| 51 | 2011-10-19 Chong Yidong <cyd@gnu.org> | ||
| 52 | |||
| 53 | * search.texi (Repeat Isearch, Error in Isearch): Add kindex | ||
| 54 | entries. | ||
| 55 | (Isearch Yank): Document isearch-yank-pop. | ||
| 56 | (Isearch Scroll): Refer to C-l instead of unbound `recenter'. | ||
| 57 | (Other Repeating Search): Document Occur Edit mode. | ||
| 58 | |||
| 59 | 2011-10-18 Chong Yidong <cyd@gnu.org> | ||
| 60 | |||
| 61 | * display.texi (Fringes): Move overflow-newline-into-fringe here, | ||
| 62 | from Line Truncation node. | ||
| 63 | (Standard Faces): Note that only the background of the cursor face | ||
| 64 | has an effect. | ||
| 65 | (Cursor Display): Fix descriptions of cursor face | ||
| 66 | and bar cursor blinking. | ||
| 67 | (Text Display): Document nobreak-char-display more clearly. | ||
| 68 | (Line Truncation): Add xref to Split Window node. | ||
| 69 | (Display Custom): Don't bother documenting baud-rate or | ||
| 70 | no-redraw-on-reenter. | ||
| 71 | |||
| 72 | * search.texi (Slow Isearch): Node removed. | ||
| 73 | |||
| 1 | 2011-10-18 Glenn Morris <rgm@gnu.org> | 74 | 2011-10-18 Glenn Morris <rgm@gnu.org> |
| 2 | 75 | ||
| 3 | * maintaining.texi (Registering): Remove vc-initial-comment. (Bug#9745) | 76 | * maintaining.texi (Registering): Remove vc-initial-comment. (Bug#9745) |
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi index 374886cd956..6a24646b5f7 100644 --- a/doc/emacs/arevert-xtra.texi +++ b/doc/emacs/arevert-xtra.texi | |||
| @@ -8,11 +8,11 @@ | |||
| 8 | @section Auto Reverting Non-File Buffers | 8 | @section Auto Reverting Non-File Buffers |
| 9 | 9 | ||
| 10 | Global Auto Revert Mode normally only reverts file buffers. There are | 10 | Global Auto Revert Mode normally only reverts file buffers. There are |
| 11 | two ways to auto-revert certain non-file buffers: enabling Auto Revert | 11 | two ways to auto-revert certain non-file buffers: by enabling Auto |
| 12 | Mode in those buffers (using @kbd{M-x auto-revert-mode}); and setting | 12 | Revert Mode in those buffers (using @kbd{M-x auto-revert-mode}); and |
| 13 | @code{global-auto-revert-non-file-buffers} non-@code{nil}. The latter | 13 | by setting @code{global-auto-revert-non-file-buffers} to a |
| 14 | enables Auto Reverting for all types of buffers for which it is | 14 | non-@code{nil} value. The latter enables Auto Reverting for all types |
| 15 | implemented (listed in the menu below). | 15 | of buffers for which it is implemented (listed in the menu below). |
| 16 | 16 | ||
| 17 | Like file buffers, non-file buffers should normally not revert while | 17 | Like file buffers, non-file buffers should normally not revert while |
| 18 | you are working on them, or while they contain information that might | 18 | you are working on them, or while they contain information that might |
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 714e03720bc..abb65982873 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -367,7 +367,7 @@ the preceding newline, joining this line to the previous one. | |||
| 367 | If, however, the region is active, @kbd{@key{DEL}} instead deletes | 367 | If, however, the region is active, @kbd{@key{DEL}} instead deletes |
| 368 | the text in the region. @xref{Mark}, for a description of the region. | 368 | the text in the region. @xref{Mark}, for a description of the region. |
| 369 | 369 | ||
| 370 | On most keyboards, @key{DEL} is labelled @key{Backspace}, but we | 370 | On most keyboards, @key{DEL} is labeled @key{Backspace}, but we |
| 371 | refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} | 371 | refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} |
| 372 | with the @key{Delete} key; we will discuss @key{Delete} momentarily.) | 372 | with the @key{Delete} key; we will discuss @key{Delete} momentarily.) |
| 373 | On some text-only terminals, Emacs may not recognize the @key{DEL} key | 373 | On some text-only terminals, Emacs may not recognize the @key{DEL} key |
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index b82f3fac7d4..302693aecef 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -7,11 +7,11 @@ | |||
| 7 | 7 | ||
| 8 | @cindex buffers | 8 | @cindex buffers |
| 9 | The text you are editing in Emacs resides in an object called a | 9 | The text you are editing in Emacs resides in an object called a |
| 10 | @dfn{buffer}. Each time you visit a file, a buffer is created to hold the | 10 | @dfn{buffer}. Each time you visit a file, a buffer is used to hold |
| 11 | file's text. Each time you invoke Dired, a buffer is created to hold the | 11 | the file's text. Each time you invoke Dired, a buffer is used to hold |
| 12 | directory listing. If you send a message with @kbd{C-x m}, a buffer named | 12 | the directory listing. If you send a message with @kbd{C-x m}, a |
| 13 | @samp{*mail*} is used to hold the text of the message. When you ask for a | 13 | buffer is used to hold the text of the message. When you ask for a |
| 14 | command's documentation, that appears in a buffer called @samp{*Help*}. | 14 | command's documentation, that appears in a buffer named @samp{*Help*}. |
| 15 | 15 | ||
| 16 | Each buffer has a unique name, which can be of any length. When a | 16 | Each buffer has a unique name, which can be of any length. When a |
| 17 | buffer is displayed in a window, its name is shown in the mode line | 17 | buffer is displayed in a window, its name is shown in the mode line |
| @@ -19,35 +19,34 @@ buffer is displayed in a window, its name is shown in the mode line | |||
| 19 | matters in buffer names. Most buffers are made by visiting files, and | 19 | matters in buffer names. Most buffers are made by visiting files, and |
| 20 | their names are derived from the files' names; however, you can also | 20 | their names are derived from the files' names; however, you can also |
| 21 | create an empty buffer with any name you want. A newly started Emacs | 21 | create an empty buffer with any name you want. A newly started Emacs |
| 22 | has a buffer named @samp{*scratch*}, which is not associated with any | 22 | has several buffers, including one named @samp{*scratch*}, which can |
| 23 | file and can be used for evaluating Lisp expressions in Emacs | 23 | be used for evaluating Lisp expressions and is not associated with any |
| 24 | (@pxref{Lisp Interaction}). | 24 | file (@pxref{Lisp Interaction}). |
| 25 | 25 | ||
| 26 | @cindex selected buffer | 26 | @cindex selected buffer |
| 27 | @cindex current buffer | 27 | @cindex current buffer |
| 28 | At any time, one and only one buffer is @dfn{current}. This is also | 28 | At any time, one and only one buffer is @dfn{selected}; we call it |
| 29 | called the @dfn{selected buffer}. We often say that a command | 29 | the @dfn{current buffer}. We sometimes say that a command operates on |
| 30 | operates on ``the buffer''; this really means that the command | 30 | ``the buffer''; this really means that it operates on the current |
| 31 | operates on the current buffer (most commands do). When there is only | 31 | buffer. When there is only one Emacs window, the buffer displayed in |
| 32 | one Emacs window, the buffer displayed in that window is current. | 32 | that window is current. When there are multiple windows, the buffer |
| 33 | When there are multiple windows present, the buffer displayed in the | 33 | displayed in the @dfn{selected window} is current. @xref{Windows}. |
| 34 | @dfn{selected window} is current. @xref{Windows}. | 34 | |
| 35 | 35 | Aside from its textual contents, each buffer records several pieces | |
| 36 | Each buffer records individually what file it is visiting (if any), | 36 | of information, such as what file it is visiting (if any), whether it |
| 37 | whether it is modified, and what major mode and minor modes are in | 37 | is modified, and what major mode and minor modes are in effect |
| 38 | effect (@pxref{Major Modes}). Any Emacs variable can be made | 38 | (@pxref{Modes}). These are stored in @dfn{buffer-local |
| 39 | @dfn{local to} a particular buffer, meaning its value in that buffer | 39 | variables}---variables that can have a different value in each buffer. |
| 40 | can be different from the value in other buffers. @xref{Locals}. | 40 | @xref{Locals}. |
| 41 | 41 | ||
| 42 | @cindex buffer size, maximum | 42 | @cindex buffer size, maximum |
| 43 | A buffer's size cannot be larger than some maximum, which is defined | 43 | A buffer's size cannot be larger than some maximum, which is defined |
| 44 | by the largest buffer position representable by the @dfn{Emacs | 44 | by the largest buffer position representable by @dfn{Emacs integers}. |
| 45 | integer} data type. This is because Emacs tracks buffer positions | 45 | This is because Emacs tracks buffer positions using that data type. |
| 46 | using that data type. For typical 64-bit machines, the maximum buffer size | 46 | For typical 64-bit machines, this maximum buffer size is @math{2^61 - |
| 47 | enforced by the data types is @math{2^61 - 2} bytes, or about 2 EiB. | 47 | 2} bytes, or about 2 EiB. For typical 32-bit machines, the maximum is |
| 48 | For typical 32-bit machines, the maximum is @math{2^29 - 2} bytes, or | 48 | usually @math{2^29 - 2} bytes, or about 512 MiB. Buffer sizes are |
| 49 | about 512 MiB. Buffer sizes are also limited by the size of Emacs's | 49 | also limited by the amount of memory present in the system. |
| 50 | virtual memory. | ||
| 51 | 50 | ||
| 52 | @menu | 51 | @menu |
| 53 | * Select Buffer:: Creating a new buffer or reselecting an old one. | 52 | * Select Buffer:: Creating a new buffer or reselecting an old one. |
| @@ -76,9 +75,9 @@ Similar, but select @var{buffer} in another window | |||
| 76 | Similar, but select @var{buffer} in a separate frame | 75 | Similar, but select @var{buffer} in a separate frame |
| 77 | (@code{switch-to-buffer-other-frame}). | 76 | (@code{switch-to-buffer-other-frame}). |
| 78 | @item C-x @key{LEFT} | 77 | @item C-x @key{LEFT} |
| 79 | Select the previous buffer in the list of existing buffers. | 78 | Select the previous buffer in the buffer list (@code{previous-buffer}). |
| 80 | @item C-x @key{RIGHT} | 79 | @item C-x @key{RIGHT} |
| 81 | Select the next buffer in the list of existing buffers. | 80 | Select the next buffer in the buffer list (@code{next-buffer}). |
| 82 | @item C-u M-g M-g | 81 | @item C-u M-g M-g |
| 83 | @itemx C-u M-g g | 82 | @itemx C-u M-g g |
| 84 | Read a number @var{n} and move to line @var{n} in the most recently | 83 | Read a number @var{n} and move to line @var{n} in the most recently |
| @@ -87,28 +86,21 @@ selected buffer other than the current buffer. | |||
| 87 | 86 | ||
| 88 | @kindex C-x b | 87 | @kindex C-x b |
| 89 | @findex switch-to-buffer | 88 | @findex switch-to-buffer |
| 90 | To select the buffer named @var{bufname}, type @kbd{C-x b | 89 | The @kbd{C-x b} (@code{switch-to-buffer}) command reads a buffer |
| 91 | @var{bufname} @key{RET}}. This runs the command | 90 | name using the minibuffer. Then it makes that buffer current, and |
| 92 | @code{switch-to-buffer} with argument @var{bufname}. While entering | 91 | displays it in the currently-selected window. An empty input |
| 93 | the buffer name, you can use the usual minibuffer completion and | 92 | specifies the buffer that was current most recently among those not |
| 94 | history commands (@pxref{Minibuffer}). An empty input specifies the | 93 | now displayed in any window. If you specify a buffer that does not |
| 95 | buffer that was current most recently among those not now displayed in | 94 | exist, @kbd{C-x b} creates a new, empty buffer that is not visiting |
| 96 | any window. | 95 | any file, and selects it for editing. |
| 97 | 96 | ||
| 98 | @cindex minibuffer confirmation | 97 | While entering the buffer name, you can use the usual completion and |
| 99 | @cindex confirming in the minibuffer | 98 | history commands (@pxref{Minibuffer}). Note that @kbd{C-x b}, and |
| 100 | If you specify a buffer that does not exist, @kbd{C-x b} creates a | 99 | related commands, use ``permissive completion with confirmation'' for |
| 101 | new, empty buffer that is not visiting any file, and selects it for | 100 | minibuffer completion: if you type @key{RET} immediately after |
| 102 | editing. First, however, Emacs might prompt you for confirmation, in | 101 | completing up to a nonexistent buffer name, Emacs prints |
| 103 | case you entered the wrong buffer name. Emacs asks for confirmation | 102 | @samp{[Confirm]} and you must type a second @key{RET} to submit that |
| 104 | only if the last key you typed, before submitting the minibuffer input | 103 | buffer name. @xref{Completion Exit}, for details. |
| 105 | with @key{RET}, was @key{TAB} (@code{minibuffer-complete}). This | ||
| 106 | catches a common mistake, in which one types @key{RET} before | ||
| 107 | realizing that @key{TAB} did not complete far enough to yield the | ||
| 108 | desired buffer name (@pxref{Completion}). Emacs asks for confirmation | ||
| 109 | by putting the message @samp{[Confirm]} in the minibuffer; type | ||
| 110 | @key{RET} again to confirm and visit the buffer. @xref{Visiting}, for | ||
| 111 | information about modifying this behavior. | ||
| 112 | 104 | ||
| 113 | One reason to create a new buffer is to use it for making temporary | 105 | One reason to create a new buffer is to use it for making temporary |
| 114 | notes. If you try to save it, Emacs asks for the file name to use. | 106 | notes. If you try to save it, Emacs asks for the file name to use. |
| @@ -237,15 +229,11 @@ have special commands to operate on the text; also by visiting a file | |||
| 237 | whose access control says you cannot write it. | 229 | whose access control says you cannot write it. |
| 238 | 230 | ||
| 239 | @findex toggle-read-only | 231 | @findex toggle-read-only |
| 240 | If you wish to make changes in a read-only buffer, use the command | 232 | The command @kbd{C-x C-q} (@code{toggle-read-only}) makes a read-only |
| 241 | @kbd{C-x C-q} (@code{toggle-read-only}). It makes a read-only buffer | 233 | buffer writable, and makes a writable buffer read-only. This works by |
| 242 | writable, and makes a writable buffer read-only. This | 234 | setting the variable @code{buffer-read-only}, which has a local value |
| 243 | works by setting the variable @code{buffer-read-only}, which has a local | 235 | in each buffer and makes the buffer read-only if its value is |
| 244 | value in each buffer and makes the buffer read-only if its value is | 236 | non-@code{nil}. |
| 245 | non-@code{nil}. If you have files under version control, you may find | ||
| 246 | it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only} | ||
| 247 | instead. This will guard you against an operation that will confuse | ||
| 248 | most modern version-conmtrol systems. @xref{Version Control}. | ||
| 249 | 237 | ||
| 250 | @findex rename-buffer | 238 | @findex rename-buffer |
| 251 | @kbd{M-x rename-buffer} changes the name of the current buffer. You | 239 | @kbd{M-x rename-buffer} changes the name of the current buffer. You |
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 71a2dba7d08..4a09d6e3d9c 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi | |||
| @@ -893,11 +893,12 @@ Move to a date specified in the Ethiopic calendar | |||
| 893 | (@code{calendar-ethiopic-goto-date}). | 893 | (@code{calendar-ethiopic-goto-date}). |
| 894 | @end table | 894 | @end table |
| 895 | 895 | ||
| 896 | These commands ask you for a date on the other calendar, move point to | 896 | These commands ask you for a date on the other calendar, move point |
| 897 | the Gregorian calendar date equivalent to that date, and display the | 897 | to the Gregorian calendar date equivalent to that date, and display |
| 898 | other calendar's date in the echo area. Emacs uses strict completion | 898 | the other calendar's date in the echo area. Emacs uses strict |
| 899 | (@pxref{Strict Completion}) whenever it asks you to type a month name, so you | 899 | completion (@pxref{Completion Exit}) whenever it asks you to type a |
| 900 | don't have to worry about the spelling of Hebrew, Islamic, or French names. | 900 | month name, so you don't have to worry about the spelling of Hebrew, |
| 901 | Islamic, or French names. | ||
| 901 | 902 | ||
| 902 | @c FIXME move? | 903 | @c FIXME move? |
| 903 | @findex calendar-hebrew-list-yahrzeits | 904 | @findex calendar-hebrew-list-yahrzeits |
| @@ -993,7 +994,7 @@ occurrence of that combination. Use @kbd{g m n c} to move point to the | |||
| 993 | next occurrence of a combination. These commands signal an error if the | 994 | next occurrence of a combination. These commands signal an error if the |
| 994 | haab/tzolkin date combination you have typed is impossible. | 995 | haab/tzolkin date combination you have typed is impossible. |
| 995 | 996 | ||
| 996 | Emacs uses strict completion (@pxref{Strict Completion}) whenever it | 997 | Emacs uses strict completion (@pxref{Completion Exit}) whenever it |
| 997 | asks you to type a Mayan name, so you don't have to worry about | 998 | asks you to type a Mayan name, so you don't have to worry about |
| 998 | spelling. | 999 | spelling. |
| 999 | 1000 | ||
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index de6e7539c27..817cfc369d1 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi | |||
| @@ -46,7 +46,7 @@ are certain characters found on non-English keyboards | |||
| 46 | @cindex M- | 46 | @cindex M- |
| 47 | Emacs also recognizes control characters that are entered using | 47 | Emacs also recognizes control characters that are entered using |
| 48 | @dfn{modifier keys}. Two commonly-used modifier keys are | 48 | @dfn{modifier keys}. Two commonly-used modifier keys are |
| 49 | @key{Control} (usually labelled @key{Ctrl}), and @key{Meta} (usually | 49 | @key{Control} (usually labeled @key{Ctrl}), and @key{Meta} (usually |
| 50 | labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for | 50 | labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for |
| 51 | historical reasons.}. For example, @kbd{Control-a} is entered by | 51 | historical reasons.}. For example, @kbd{Control-a} is entered by |
| 52 | holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer | 52 | holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 6af77374d07..d87c22ec28e 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -770,7 +770,7 @@ here's how to set up a hook to turn on Auto Fill mode when entering | |||
| 770 | Text mode and other modes based on Text mode: | 770 | Text mode and other modes based on Text mode: |
| 771 | 771 | ||
| 772 | @example | 772 | @example |
| 773 | (add-hook 'text-mode-hook 'turn-on-auto-fill) | 773 | (add-hook 'text-mode-hook 'auto-fill-mode) |
| 774 | @end example | 774 | @end example |
| 775 | 775 | ||
| 776 | Here is another example, showing how to use a hook to customize the | 776 | Here is another example, showing how to use a hook to customize the |
| @@ -2174,8 +2174,7 @@ Turn off Line Number mode, a global minor mode. | |||
| 2174 | Turn on Auto Fill mode automatically in Text mode and related modes. | 2174 | Turn on Auto Fill mode automatically in Text mode and related modes. |
| 2175 | 2175 | ||
| 2176 | @example | 2176 | @example |
| 2177 | (add-hook 'text-mode-hook | 2177 | (add-hook 'text-mode-hook 'auto-fill-mode) |
| 2178 | '(lambda () (auto-fill-mode 1))) | ||
| 2179 | @end example | 2178 | @end example |
| 2180 | 2179 | ||
| 2181 | This shows how to add a hook function to a normal hook variable | 2180 | This shows how to add a hook function to a normal hook variable |
| @@ -2183,19 +2182,9 @@ This shows how to add a hook function to a normal hook variable | |||
| 2183 | @code{lambda}, with a single-quote in front of it to make it a list | 2182 | @code{lambda}, with a single-quote in front of it to make it a list |
| 2184 | constant rather than an expression. | 2183 | constant rather than an expression. |
| 2185 | 2184 | ||
| 2186 | It's beyond the scope of this manual to explain Lisp functions, but for | 2185 | It's beyond the scope of this manual to explain Lisp functions, but |
| 2187 | this example it is enough to know that the effect is to execute | 2186 | for this example it is enough to know that the effect is to execute |
| 2188 | @code{(auto-fill-mode 1)} when Text mode is entered. You can replace | 2187 | the @code{auto-fill-mode} function when Text mode is entered. |
| 2189 | that with any other expression that you like, or with several | ||
| 2190 | expressions in a row. | ||
| 2191 | |||
| 2192 | Emacs comes with a function named @code{turn-on-auto-fill} whose | ||
| 2193 | definition is @code{(lambda () (auto-fill-mode 1))}. Thus, a simpler | ||
| 2194 | way to write the above example is as follows: | ||
| 2195 | |||
| 2196 | @example | ||
| 2197 | (add-hook 'text-mode-hook 'turn-on-auto-fill) | ||
| 2198 | @end example | ||
| 2199 | 2188 | ||
| 2200 | @item | 2189 | @item |
| 2201 | Load the installed Lisp library named @file{foo} (actually a file | 2190 | Load the installed Lisp library named @file{foo} (actually a file |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 68b2209ffba..8995b1242b1 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -13,6 +13,7 @@ the text is displayed. | |||
| 13 | 13 | ||
| 14 | @menu | 14 | @menu |
| 15 | * Scrolling:: Commands to move text up and down in a window. | 15 | * Scrolling:: Commands to move text up and down in a window. |
| 16 | * Recentering:: A scroll command that centers the current line. | ||
| 16 | * Auto Scrolling:: Redisplay scrolls text automatically when needed. | 17 | * Auto Scrolling:: Redisplay scrolls text automatically when needed. |
| 17 | * Horizontal Scrolling:: Moving text left and right in a window. | 18 | * Horizontal Scrolling:: Moving text left and right in a window. |
| 18 | * Narrowing:: Restricting display and editing to a portion | 19 | * Narrowing:: Restricting display and editing to a portion |
| @@ -48,15 +49,15 @@ portion of the buffer is displayed. | |||
| 48 | Scrolling ``forward'' or ``up'' advances the portion of the buffer | 49 | Scrolling ``forward'' or ``up'' advances the portion of the buffer |
| 49 | displayed in the window; equivalently, it moves the buffer text | 50 | displayed in the window; equivalently, it moves the buffer text |
| 50 | upwards relative to the window. Scrolling ``backward'' or ``down'' | 51 | upwards relative to the window. Scrolling ``backward'' or ``down'' |
| 51 | moves the displayed portion backwards, and moves the text downwards | 52 | displays an earlier portion of the buffer, and moves the text |
| 52 | relative to the window. In Emacs, scrolling ``up'' or ``down'' refers | 53 | downwards relative to the window. |
| 53 | to the direction that the text moves in the window, @emph{not} the | 54 | |
| 54 | direction that the window moves relative to the text; this terminology | 55 | In Emacs, scrolling ``up'' or ``down'' refers to the direction that |
| 55 | was taken up by Emacs before the modern meaning of ``scrolling up'' | 56 | the text moves in the window, @emph{not} the direction that the window |
| 56 | and ``scrolling down'' became widely adopted. Hence the strange | 57 | moves relative to the text. This terminology was adopted by Emacs |
| 57 | result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this | 58 | before the modern meaning of ``scrolling up'' and ``scrolling down'' |
| 58 | manual, we refer to scrolling ``forward'' and ``backward'' where | 59 | became widespread. Hence, the strange result that @key{PageDown} |
| 59 | possible, in order to minimize confusion. | 60 | scrolls ``up'' in the Emacs sense. |
| 60 | 61 | ||
| 61 | The portion of a buffer displayed in a window always contains point. | 62 | The portion of a buffer displayed in a window always contains point. |
| 62 | If you move point past the bottom or top of the window, scrolling | 63 | If you move point past the bottom or top of the window, scrolling |
| @@ -64,11 +65,6 @@ occurs automatically to bring it back onscreen (@pxref{Auto | |||
| 64 | Scrolling}). You can also scroll explicitly with these commands: | 65 | Scrolling}). You can also scroll explicitly with these commands: |
| 65 | 66 | ||
| 66 | @table @kbd | 67 | @table @kbd |
| 67 | @item C-l | ||
| 68 | Scroll the selected window so that the current line is the center-most | ||
| 69 | text line; on subsequent consecutive invocations, make the current | ||
| 70 | line the top-most line, the bottom-most line, and so on in cyclic | ||
| 71 | order; also, maybe redisplay the screen (@code{recenter-top-bottom}). | ||
| 72 | @item C-v | 68 | @item C-v |
| 73 | @itemx @key{next} | 69 | @itemx @key{next} |
| 74 | @itemx @key{PageDown} | 70 | @itemx @key{PageDown} |
| @@ -77,6 +73,86 @@ Scroll forward by nearly a full window (@code{scroll-up-command}). | |||
| 77 | @itemx @key{prior} | 73 | @itemx @key{prior} |
| 78 | @itemx @key{PageUp} | 74 | @itemx @key{PageUp} |
| 79 | Scroll backward (@code{scroll-down-command}). | 75 | Scroll backward (@code{scroll-down-command}). |
| 76 | @end table | ||
| 77 | |||
| 78 | @kindex C-v | ||
| 79 | @kindex M-v | ||
| 80 | @kindex next | ||
| 81 | @kindex prior | ||
| 82 | @kindex PageDown | ||
| 83 | @kindex PageUp | ||
| 84 | @findex scroll-up-command | ||
| 85 | @findex scroll-down-command | ||
| 86 | @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the | ||
| 87 | whole window height. The effect is to take the two lines at the | ||
| 88 | bottom of the window and put them at the top, followed by lines that | ||
| 89 | were not previously visible. If point was in the text that scrolled | ||
| 90 | off the top, it ends up on the window's new topmost line. The | ||
| 91 | @key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}. | ||
| 92 | |||
| 93 | @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar | ||
| 94 | way. The @key{prior} (or @key{PageUp}) key is equivalent to | ||
| 95 | @kbd{M-v}. | ||
| 96 | |||
| 97 | @vindex next-screen-context-lines | ||
| 98 | The number of lines of overlap left by these scroll commands is | ||
| 99 | controlled by the variable @code{next-screen-context-lines}, whose | ||
| 100 | default value is 2. You can supply the commands with a numeric prefix | ||
| 101 | argument, @var{n}, to scroll by @var{n} lines; Emacs attempts to leave | ||
| 102 | point unchanged, so that the text and point move up or down together. | ||
| 103 | @kbd{C-v} with a negative argument is like @kbd{M-v} and vice versa. | ||
| 104 | |||
| 105 | @vindex scroll-error-top-bottom | ||
| 106 | By default, these commands signal an error (by beeping or flashing | ||
| 107 | the screen) if no more scrolling is possible, because the window has | ||
| 108 | reached the beginning or end of the buffer. If you change the | ||
| 109 | variable @code{scroll-error-top-bottom} to @code{t}, the command moves | ||
| 110 | point to the farthest possible position. If point is already there, | ||
| 111 | the command signals an error. | ||
| 112 | |||
| 113 | @vindex scroll-preserve-screen-position | ||
| 114 | @cindex @code{scroll-command} property | ||
| 115 | Some users like scroll commands to keep point at the same screen | ||
| 116 | position, so that scrolling back to the same screen conveniently | ||
| 117 | returns point to its original position. You can enable this behavior | ||
| 118 | via the variable @code{scroll-preserve-screen-position}. If the value | ||
| 119 | is @code{t}, Emacs adjusts point to keep the cursor at the same screen | ||
| 120 | position whenever a scroll command moves it off-window, rather than | ||
| 121 | moving it to the topmost or bottommost line. With any other | ||
| 122 | non-@code{nil} value, Emacs adjusts point this way even if the scroll | ||
| 123 | command leaves point in the window. This variable affects all the | ||
| 124 | scroll commands documented in this section, as well as scrolling with | ||
| 125 | the mouse wheel (@pxref{Wheeled Mice}); in general, it affects any | ||
| 126 | command that has a non-@code{nil} @code{scroll-command} property. | ||
| 127 | @xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}. | ||
| 128 | |||
| 129 | @vindex scroll-up | ||
| 130 | @vindex scroll-down | ||
| 131 | @findex scroll-up-line | ||
| 132 | @findex scroll-down-line | ||
| 133 | The commands @kbd{M-x scroll-up} and @kbd{M-x scroll-down} behave | ||
| 134 | similarly to @code{scroll-up-command} and @code{scroll-down-command}, | ||
| 135 | except they do not obey @code{scroll-error-top-bottom}. Prior to | ||
| 136 | Emacs 24, these were the default commands for scrolling up and down. | ||
| 137 | The commands @kbd{M-x scroll-up-line} and @kbd{M-x scroll-down-line} | ||
| 138 | scroll the current window by one line at a time. If you intend to use | ||
| 139 | any of these commands, you might want to give them key bindings | ||
| 140 | (@pxref{Init Rebinding}). | ||
| 141 | |||
| 142 | @node Recentering | ||
| 143 | @section Recentering | ||
| 144 | |||
| 145 | @table @kbd | ||
| 146 | @item C-l | ||
| 147 | Scroll the selected window so the current line is the center-most text | ||
| 148 | line; on subsequent consecutive invocations, make the current line the | ||
| 149 | top line, the bottom line, and so on in cyclic order. Possibly | ||
| 150 | redisplay the screen too (@code{recenter-top-bottom}). | ||
| 151 | |||
| 152 | @item M-x recenter | ||
| 153 | Scroll the selected window so the current line is the center-most text | ||
| 154 | line. Possibly redisplay the screen too. | ||
| 155 | |||
| 80 | @item C-M-l | 156 | @item C-M-l |
| 81 | Scroll heuristically to bring useful information onto the screen | 157 | Scroll heuristically to bring useful information onto the screen |
| 82 | (@code{reposition-window}). | 158 | (@code{reposition-window}). |
| @@ -107,14 +183,13 @@ non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n} | |||
| 107 | screen lines between point and the top or bottom of the window | 183 | screen lines between point and the top or bottom of the window |
| 108 | (@pxref{Auto Scrolling}). | 184 | (@pxref{Auto Scrolling}). |
| 109 | 185 | ||
| 110 | You can also supply @kbd{C-l} with a prefix argument. With a plain | 186 | You can also give @kbd{C-l} a prefix argument. A plain prefix |
| 111 | prefix argument, @kbd{C-u C-l}, Emacs simply recenters point. With a | 187 | argument, @kbd{C-u C-l}, simply recenters point. A positive argument |
| 112 | positive argument @var{n}, it scrolls to place point @var{n} lines | 188 | @var{n} puts point @var{n} lines down from the top of the window. An |
| 113 | down from the top of the window. An argument of zero puts point on | 189 | argument of zero puts point on the topmost line. A negative argument |
| 114 | the topmost line. A negative argument @var{-n} puts point @var{n} | 190 | @var{-n} puts point @var{n} lines from the bottom of the window. When |
| 115 | lines from the bottom of the window. When given an argument, | 191 | given an argument, @kbd{C-l} does not clear the screen or cycle |
| 116 | @kbd{C-l} does not clear the screen or cycle through different screen | 192 | through different screen positions. |
| 117 | positions. | ||
| 118 | 193 | ||
| 119 | @vindex recenter-redisplay | 194 | @vindex recenter-redisplay |
| 120 | If the variable @code{recenter-redisplay} has a non-@code{nil} | 195 | If the variable @code{recenter-redisplay} has a non-@code{nil} |
| @@ -127,62 +202,6 @@ becomes garbled for any reason (@pxref{Screen Garbled}). | |||
| 127 | The more primitive command @kbd{M-x recenter} behaves like | 202 | The more primitive command @kbd{M-x recenter} behaves like |
| 128 | @code{recenter-top-bottom}, but does not cycle among screen positions. | 203 | @code{recenter-top-bottom}, but does not cycle among screen positions. |
| 129 | 204 | ||
| 130 | @kindex C-v | ||
| 131 | @kindex M-v | ||
| 132 | @kindex next | ||
| 133 | @kindex prior | ||
| 134 | @kindex PageDown | ||
| 135 | @kindex PageUp | ||
| 136 | @findex scroll-up-command | ||
| 137 | @findex scroll-down-command | ||
| 138 | @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the | ||
| 139 | whole window height. The effect is to take the two lines at the | ||
| 140 | bottom of the window and put them at the top, followed by lines that | ||
| 141 | were not previously visible. If point was in the text that scrolled | ||
| 142 | off the top, it ends up on the window's new topmost line. | ||
| 143 | |||
| 144 | Similarly, @kbd{M-v} (@code{scroll-down-command}) scrolls backward. | ||
| 145 | |||
| 146 | We refer to @kbd{C-v} and @kbd{M-v} as @dfn{full-screen scroll | ||
| 147 | commands}. The function key @key{next}, or @key{PageDown}, is | ||
| 148 | equivalent to @kbd{C-v}; the function key @key{prior}, or | ||
| 149 | @key{PageUp}, is equivalent to @kbd{M-v}. | ||
| 150 | |||
| 151 | @vindex next-screen-context-lines | ||
| 152 | The variable @code{next-screen-context-lines} controls the number of | ||
| 153 | lines of overlap left by the full-screen scroll commands; by default, | ||
| 154 | it is 2. You can supply these commands with a numeric prefix argument | ||
| 155 | @var{n}. This scrolls the window by @var{n} lines, while attempting | ||
| 156 | to leave point unchanged (so that the text and point move up or down | ||
| 157 | together). @kbd{C-v} with a negative argument is like @kbd{M-v} and | ||
| 158 | vice versa. | ||
| 159 | |||
| 160 | @vindex scroll-error-top-bottom | ||
| 161 | By default, the full-screen scroll commands signal an error (by | ||
| 162 | beeping or flashing the screen) if no more scrolling is possible, | ||
| 163 | because the window has reached the beginning or end of the buffer. If | ||
| 164 | you change the variable @code{scroll-error-top-bottom} to @code{t}, | ||
| 165 | Emacs instead moves point to the farthest possible position. If point | ||
| 166 | is already there, the command signals an error. | ||
| 167 | |||
| 168 | @vindex scroll-preserve-screen-position | ||
| 169 | Some users like scroll commands to keep point at the same screen | ||
| 170 | position. Then, scrolling back to the same screen also conveniently | ||
| 171 | returns point to its original position. You can enable this via the | ||
| 172 | variable @code{scroll-preserve-screen-position}. If the value is | ||
| 173 | @code{t}, Emacs adjusts point to keep it at the same vertical position | ||
| 174 | within the window, rather than the window edge, whenever a scroll | ||
| 175 | command moves it off the window. With any other non-@code{nil} value, | ||
| 176 | Emacs adjusts point this way even if the scroll command leaves point | ||
| 177 | in the window. | ||
| 178 | |||
| 179 | @vindex scroll-up | ||
| 180 | @vindex scroll-down | ||
| 181 | The commands @code{scroll-up} and @code{scroll-down} behave | ||
| 182 | similarly to @code{scroll-up-command} and @code{scroll-down-command}, | ||
| 183 | except they do not obey @code{scroll-error-top-bottom}. Prior to | ||
| 184 | Emacs 24, these were the default commands for scrolling up and down. | ||
| 185 | |||
| 186 | @kindex C-M-l | 205 | @kindex C-M-l |
| 187 | @findex reposition-window | 206 | @findex reposition-window |
| 188 | @kbd{C-M-l} (@code{reposition-window}) scrolls the current window | 207 | @kbd{C-M-l} (@code{reposition-window}) scrolls the current window |
| @@ -554,7 +573,7 @@ Whitespace}). | |||
| 554 | The face for displaying control characters and escape sequences | 573 | The face for displaying control characters and escape sequences |
| 555 | (@pxref{Text Display}). | 574 | (@pxref{Text Display}). |
| 556 | @item nobreak-space | 575 | @item nobreak-space |
| 557 | The face for displaying ``non-breaking'' space characters (@pxref{Text | 576 | The face for displaying ``no-break'' space characters (@pxref{Text |
| 558 | Display}). | 577 | Display}). |
| 559 | @end table | 578 | @end table |
| 560 | 579 | ||
| @@ -599,7 +618,8 @@ displays. (The fringes are the narrow portions of the Emacs frame | |||
| 599 | between the text area and the window's right and left borders.) | 618 | between the text area and the window's right and left borders.) |
| 600 | @xref{Fringes}. | 619 | @xref{Fringes}. |
| 601 | @item cursor | 620 | @item cursor |
| 602 | This face determines the color of the text cursor. | 621 | The @code{:background} attribute of this face specifies the color of |
| 622 | the text cursor. @xref{Cursor Display}. | ||
| 603 | @item tooltip | 623 | @item tooltip |
| 604 | This face is used for tooltip text. By default, if Emacs is built | 624 | This face is used for tooltip text. By default, if Emacs is built |
| 605 | with GTK support, tooltips are drawn via GTK and this face has no | 625 | with GTK support, tooltips are drawn via GTK and this face has no |
| @@ -702,16 +722,14 @@ file: | |||
| 702 | (global-font-lock-mode 0) | 722 | (global-font-lock-mode 0) |
| 703 | @end example | 723 | @end example |
| 704 | 724 | ||
| 705 | @findex turn-on-font-lock | ||
| 706 | @noindent | 725 | @noindent |
| 707 | If you have disabled Global Font Lock mode, you can still enable Font | 726 | If you have disabled Global Font Lock mode, you can still enable Font |
| 708 | Lock for specific major modes by adding the function | 727 | Lock for specific major modes by adding the function |
| 709 | @code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For | 728 | @code{font-lock-mode} to the mode hooks (@pxref{Hooks}). For example, |
| 710 | example, to enable Font Lock mode for editing C files, you can do | 729 | to enable Font Lock mode for editing C files, you can do this: |
| 711 | this: | ||
| 712 | 730 | ||
| 713 | @example | 731 | @example |
| 714 | (add-hook 'c-mode-hook 'turn-on-font-lock) | 732 | (add-hook 'c-mode-hook 'font-lock-mode) |
| 715 | @end example | 733 | @end example |
| 716 | 734 | ||
| 717 | Font Lock mode uses several specifically named faces to do its job, | 735 | Font Lock mode uses several specifically named faces to do its job, |
| @@ -901,9 +919,14 @@ mode's symbol is a member of the list @code{hi-lock-exclude-modes}. | |||
| 901 | @section Window Fringes | 919 | @section Window Fringes |
| 902 | @cindex fringes | 920 | @cindex fringes |
| 903 | 921 | ||
| 904 | On a graphical display, each Emacs window normally has narrow | 922 | @findex set-fringe-style |
| 923 | @findex fringe-mode | ||
| 924 | On graphical displays, each Emacs window normally has narrow | ||
| 905 | @dfn{fringes} on the left and right edges. The fringes are used to | 925 | @dfn{fringes} on the left and right edges. The fringes are used to |
| 906 | display symbols that provide information about the text in the window. | 926 | display symbols that provide information about the text in the window. |
| 927 | You can type @kbd{M-x fringe-mode} to disable the fringes, or modify | ||
| 928 | their width. This command affects fringes in all frames; to modify | ||
| 929 | fringes on the selected frame only, use @kbd{M-x set-fringe-style}. | ||
| 907 | 930 | ||
| 908 | The most common use of the fringes is to indicate a continuation | 931 | The most common use of the fringes is to indicate a continuation |
| 909 | line (@pxref{Continuation Lines}). When one line of text is split | 932 | line (@pxref{Continuation Lines}). When one line of text is split |
| @@ -924,17 +947,18 @@ scrolls the display horizontally in the direction of the arrow. | |||
| 924 | boundaries (@pxref{Displaying Boundaries}), and where a program you | 947 | boundaries (@pxref{Displaying Boundaries}), and where a program you |
| 925 | are debugging is executing (@pxref{Debuggers}). | 948 | are debugging is executing (@pxref{Debuggers}). |
| 926 | 949 | ||
| 927 | @findex set-fringe-style | 950 | @vindex overflow-newline-into-fringe |
| 928 | @findex fringe-mode | 951 | The fringe is also used for drawing the cursor, if the current line |
| 929 | You can enable and disable the fringes for all frames using | 952 | is exactly as wide as the window and point is at the end of the line. |
| 930 | @kbd{M-x fringe-mode}. To enable and disable the fringes | 953 | To disable this, change the variable |
| 931 | for the selected frame, use @kbd{M-x set-fringe-style}. | 954 | @code{overflow-newline-into-fringe} to @code{nil}; this causes Emacs |
| 955 | to continue or truncate lines that are exactly as wide as the window. | ||
| 932 | 956 | ||
| 933 | @node Displaying Boundaries | 957 | @node Displaying Boundaries |
| 934 | @section Displaying Boundaries | 958 | @section Displaying Boundaries |
| 935 | 959 | ||
| 936 | @vindex indicate-buffer-boundaries | 960 | @vindex indicate-buffer-boundaries |
| 937 | On a graphical display, Emacs can indicate the buffer boundaries in | 961 | On graphical displays, Emacs can indicate the buffer boundaries in |
| 938 | the fringes. If you enable this feature, the first line and the last | 962 | the fringes. If you enable this feature, the first line and the last |
| 939 | line are marked with angle images in the fringes. This can be | 963 | line are marked with angle images in the fringes. This can be |
| 940 | combined with up and down arrow images which say whether it is | 964 | combined with up and down arrow images which say whether it is |
| @@ -1127,14 +1151,15 @@ set the variable @code{display-time-24hr-format} to @code{t}. | |||
| 1127 | @vindex display-time-mail-file | 1151 | @vindex display-time-mail-file |
| 1128 | @vindex display-time-mail-directory | 1152 | @vindex display-time-mail-directory |
| 1129 | The word @samp{Mail} appears after the load level if there is mail | 1153 | The word @samp{Mail} appears after the load level if there is mail |
| 1130 | for you that you have not read yet. On a graphical display you can use | 1154 | for you that you have not read yet. On graphical displays, you can |
| 1131 | an icon instead of @samp{Mail} by customizing | 1155 | use an icon instead of @samp{Mail} by customizing |
| 1132 | @code{display-time-use-mail-icon}; this may save some space on the mode | 1156 | @code{display-time-use-mail-icon}; this may save some space on the |
| 1133 | line. You can customize @code{display-time-mail-face} to make the mail | 1157 | mode line. You can customize @code{display-time-mail-face} to make |
| 1134 | indicator prominent. Use @code{display-time-mail-file} to specify | 1158 | the mail indicator prominent. Use @code{display-time-mail-file} to |
| 1135 | the mail file to check, or set @code{display-time-mail-directory} | 1159 | specify the mail file to check, or set |
| 1136 | to specify the directory to check for incoming mail (any nonempty regular | 1160 | @code{display-time-mail-directory} to specify the directory to check |
| 1137 | file in the directory is considered as ``newly arrived mail''). | 1161 | for incoming mail (any nonempty regular file in the directory is |
| 1162 | considered as ``newly arrived mail''). | ||
| 1138 | 1163 | ||
| 1139 | @cindex mail (on mode line) | 1164 | @cindex mail (on mode line) |
| 1140 | @findex display-battery-mode | 1165 | @findex display-battery-mode |
| @@ -1152,7 +1177,7 @@ percentage of the total charge. | |||
| 1152 | @cindex mode line, 3D appearance | 1177 | @cindex mode line, 3D appearance |
| 1153 | @cindex attributes of mode line, changing | 1178 | @cindex attributes of mode line, changing |
| 1154 | @cindex non-integral number of lines in a window | 1179 | @cindex non-integral number of lines in a window |
| 1155 | On a graphical display, the mode line is drawn as a 3D box. If you | 1180 | On graphical displays, the mode line is drawn as a 3D box. If you |
| 1156 | don't like this effect, you can disable it by customizing the | 1181 | don't like this effect, you can disable it by customizing the |
| 1157 | @code{mode-line} face and setting its @code{box} attribute to | 1182 | @code{mode-line} face and setting its @code{box} attribute to |
| 1158 | @code{nil}. @xref{Face Customization}. | 1183 | @code{nil}. @xref{Face Customization}. |
| @@ -1218,17 +1243,23 @@ If you change the buffer-local variable @code{ctl-arrow} to | |||
| 1218 | octal escape sequences instead of caret escape sequences. | 1243 | octal escape sequences instead of caret escape sequences. |
| 1219 | 1244 | ||
| 1220 | @vindex nobreak-char-display | 1245 | @vindex nobreak-char-display |
| 1221 | @cindex non-breaking space, display | 1246 | @cindex non-breaking space |
| 1222 | @cindex non-breaking hyphen, display | 1247 | @cindex non-breaking hyphen |
| 1223 | @cindex soft hyphen, display | 1248 | @cindex soft hyphen |
| 1224 | There are two special ``non-breaking'' versions of the space and | 1249 | Some non-@acronym{ASCII} characters have the same appearance as an |
| 1225 | hyphen characters, which are used where a line should not be broken. | 1250 | @acronym{ASCII} space or hyphen (minus) character. Such characters |
| 1226 | Emacs normally displays these characters with special faces | 1251 | can cause problems if they are entered into a buffer without your |
| 1227 | (respectively, @code{nobreak-space} and @code{escape-glyph}) to | 1252 | realization, e.g. by yanking; for instance, source code compilers |
| 1228 | distinguish them from ordinary spaces and hyphens. You can turn off | 1253 | typically do not treat non-@acronym{ASCII} spaces as whitespace |
| 1229 | this feature by setting the variable @code{nobreak-char-display} to | 1254 | characters. To deal with this problem, Emacs displays such characters |
| 1230 | @code{nil}. If you set the variable to any other value, that means to | 1255 | specially: it displays @code{U+00A0} (no-break space) with the |
| 1231 | prefix these characters with an escape character. | 1256 | @code{nobreak-space} face, and it displays @code{U+00AD} (soft |
| 1257 | hyphen), @code{U+2010} (hyphen), and @code{U+2011} (non-breaking | ||
| 1258 | hyphen) with the @code{escape-glyph} face. To disable this, change | ||
| 1259 | the variable @code{nobreak-char-display} to @code{nil}. If you give | ||
| 1260 | this variable a non-@code{nil} and non-@code{t} value, Emacs instead | ||
| 1261 | displays such characters as a highlighted backslash followed by a | ||
| 1262 | space or hyphen. | ||
| 1232 | 1263 | ||
| 1233 | You can customize the way any particular character code is displayed | 1264 | You can customize the way any particular character code is displayed |
| 1234 | by means of a display table. @xref{Display Tables,, Display Tables, | 1265 | by means of a display table. @xref{Display Tables,, Display Tables, |
| @@ -1246,48 +1277,61 @@ for details. | |||
| 1246 | 1277 | ||
| 1247 | @node Cursor Display | 1278 | @node Cursor Display |
| 1248 | @section Displaying the Cursor | 1279 | @section Displaying the Cursor |
| 1249 | 1280 | @cindex text cursor | |
| 1250 | @findex blink-cursor-mode | ||
| 1251 | @vindex blink-cursor-alist | ||
| 1252 | @cindex cursor, locating visually | ||
| 1253 | @cindex cursor, blinking | ||
| 1254 | You can customize the cursor's color, and whether it blinks, using | ||
| 1255 | the @code{cursor} Custom group (@pxref{Easy Customization}). On | ||
| 1256 | a graphical display, the command @kbd{M-x blink-cursor-mode} enables | ||
| 1257 | or disables the blinking of the cursor. (On text terminals, the | ||
| 1258 | terminal itself blinks the cursor, and Emacs has no control over it.) | ||
| 1259 | You can control how the cursor appears when it blinks off by setting | ||
| 1260 | the variable @code{blink-cursor-alist}. | ||
| 1261 | |||
| 1262 | @vindex cursor-type | ||
| 1263 | You can change the shape of the cursor from the default ``box'' look | ||
| 1264 | to a bar by altering the @code{cursor-type} variable. | ||
| 1265 | 1281 | ||
| 1266 | @vindex visible-cursor | 1282 | @vindex visible-cursor |
| 1267 | Some text terminals offer two different cursors: the normal cursor | 1283 | On a text terminal, the cursor's appearance is controlled by the |
| 1268 | and the very visible cursor, where the latter may be e.g. bigger or | 1284 | terminal, largely out of the control of Emacs. Some terminals offer |
| 1269 | blinking. By default Emacs uses the very visible cursor, and switches | 1285 | two different cursors: a ``visible'' static cursor, and a ``very |
| 1270 | to it when you start or resume Emacs. If the variable | 1286 | visible'' blinking cursor. By default, Emacs uses the very visible |
| 1271 | @code{visible-cursor} is @code{nil} when Emacs starts or resumes, it | 1287 | cursor, and switches to it when you start or resume Emacs. If the |
| 1272 | doesn't switch, so it uses the normal cursor. | 1288 | variable @code{visible-cursor} is @code{nil} when Emacs starts or |
| 1289 | resumes, it uses the normal cursor. | ||
| 1290 | |||
| 1291 | @cindex cursor face | ||
| 1292 | @vindex cursor-type | ||
| 1293 | On a graphical display, many more properties of the text cursor can | ||
| 1294 | be altered. To customize its color, change the @code{:background} | ||
| 1295 | attribute of the face named @code{cursor} (@pxref{Face | ||
| 1296 | Customization}). (The other attributes of this face have no effect; | ||
| 1297 | the text shown under the cursor is drawn using the frame's background | ||
| 1298 | color.) To change its shape, customize the buffer-local variable | ||
| 1299 | @code{cursor-type}; possible values are @code{box} (the default), | ||
| 1300 | @code{hollow} (a hollow box), @code{bar} (a vertical bar), @code{(bar | ||
| 1301 | . @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar} (a | ||
| 1302 | horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n} | ||
| 1303 | pixels tall), or @code{nil} (no cursor at all). | ||
| 1273 | 1304 | ||
| 1274 | @cindex cursor in non-selected windows | 1305 | @findex blink-cursor-mode |
| 1275 | @vindex cursor-in-non-selected-windows | 1306 | @cindex cursor, blinking |
| 1276 | Normally, the cursor appears in non-selected windows without | 1307 | @cindex blinking cursor |
| 1277 | blinking, with the same appearance as when the blinking cursor blinks | 1308 | @vindex blink-cursor-alist |
| 1278 | ``off.'' For a box cursor, this is a hollow box; for a bar cursor, | 1309 | To disable cursor blinking, change the variable |
| 1279 | this is a thinner bar. To turn off cursors in non-selected windows, | 1310 | @code{blink-cursor-mode} to @code{nil} (@pxref{Easy Customization}), |
| 1280 | customize the variable @code{cursor-in-non-selected-windows} and | 1311 | or add the line @code{(blink-cursor-mode 0)} to your init file. |
| 1281 | assign it a @code{nil} value. | 1312 | Alternatively, you can change how the cursor looks when it ``blinks |
| 1313 | off'' by customizing the list variable @code{blink-cursor-alist}. | ||
| 1314 | Each element in the list should have the form @code{(@var{on-type} | ||
| 1315 | . @var{off-type})}; this means that if the cursor is displayed as | ||
| 1316 | @var{on-type} when it blinks on (where @var{on-type} is one of the | ||
| 1317 | cursor types described above), then it is displayed as @var{off-type} | ||
| 1318 | when it blinks off. | ||
| 1282 | 1319 | ||
| 1283 | @vindex x-stretch-cursor | 1320 | @vindex x-stretch-cursor |
| 1284 | @cindex wide block cursor | 1321 | @cindex wide block cursor |
| 1285 | On graphical displays, Emacs can optionally draw the block cursor | 1322 | Some characters, such as tab characters, are ``extra wide''. When |
| 1286 | as wide as the character under the cursor---for example, if the cursor | 1323 | the cursor is positioned over such a character, it is normally drawn |
| 1287 | is on a tab character, it would cover the full width occupied by that | 1324 | with the default character width. You can make the cursor stretch to |
| 1288 | tab character. To enable this feature, set the variable | 1325 | cover wide characters, by changing the variable |
| 1289 | @code{x-stretch-cursor} to a non-@code{nil} value. | 1326 | @code{x-stretch-cursor} to a non-@code{nil} value. |
| 1290 | 1327 | ||
| 1328 | @cindex cursor in non-selected windows | ||
| 1329 | @vindex cursor-in-non-selected-windows | ||
| 1330 | The cursor normally appears in non-selected windows as a | ||
| 1331 | non-blinking hollow box. (For a bar cursor, it instead appears as a | ||
| 1332 | thinner bar.) To turn off cursors in non-selected windows, change the | ||
| 1333 | variable @code{cursor-in-non-selected-windows} to @code{nil}. | ||
| 1334 | |||
| 1291 | @findex hl-line-mode | 1335 | @findex hl-line-mode |
| 1292 | @findex global-hl-line-mode | 1336 | @findex global-hl-line-mode |
| 1293 | @cindex highlight current line | 1337 | @cindex highlight current line |
| @@ -1297,18 +1341,17 @@ hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x | |||
| 1297 | global-hl-line-mode} enables or disables the same mode globally. | 1341 | global-hl-line-mode} enables or disables the same mode globally. |
| 1298 | 1342 | ||
| 1299 | @node Line Truncation | 1343 | @node Line Truncation |
| 1300 | @section Truncation of Lines | 1344 | @section Line Truncation |
| 1301 | 1345 | ||
| 1302 | @cindex truncation | 1346 | @cindex truncation |
| 1303 | @cindex line truncation, and fringes | 1347 | @cindex line truncation, and fringes |
| 1304 | As an alternative to continuation (@pxref{Continuation Lines}), Emacs | 1348 | As an alternative to continuation (@pxref{Continuation Lines}), |
| 1305 | can display long lines by @dfn{truncation}. This means that all the | 1349 | Emacs can display long lines by @dfn{truncation}. This means that all |
| 1306 | characters that do not fit in the width of the screen or window do not | 1350 | the characters that do not fit in the width of the screen or window do |
| 1307 | appear at all. On graphical displays, a small straight arrow in the | 1351 | not appear at all. On graphical displays, a small straight arrow in |
| 1308 | fringe indicates truncation at either end of the line. On text-only | 1352 | the fringe indicates truncation at either end of the line. On |
| 1309 | terminals, @samp{$} appears in the leftmost column when there is text | 1353 | text-only terminals, this is indicated with @samp{$} signs in the |
| 1310 | truncated to the left, and in the rightmost column when there is text | 1354 | leftmost and/or rightmost columns. |
| 1311 | truncated to the right. | ||
| 1312 | 1355 | ||
| 1313 | @vindex truncate-lines | 1356 | @vindex truncate-lines |
| 1314 | @findex toggle-truncate-lines | 1357 | @findex toggle-truncate-lines |
| @@ -1320,21 +1363,12 @@ toggle-truncate-lines}. This works by locally changing the variable | |||
| 1320 | are truncated; if it is @code{nil}, they are continued onto multiple | 1363 | are truncated; if it is @code{nil}, they are continued onto multiple |
| 1321 | screen lines. Setting the variable @code{truncate-lines} in any way | 1364 | screen lines. Setting the variable @code{truncate-lines} in any way |
| 1322 | makes it local to the current buffer; until that time, the default | 1365 | makes it local to the current buffer; until that time, the default |
| 1323 | value is in effect. The default value is normally @code{nil}. | 1366 | value, which is normally @code{nil}, is in effect. |
| 1324 | 1367 | ||
| 1325 | @c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. | 1368 | @vindex truncate-partial-width-windows |
| 1326 | If the variable @code{truncate-partial-width-windows} is | 1369 | If a split window becomes too narrow, Emacs may automatically enable |
| 1327 | non-@code{nil}, it forces truncation rather than continuation in any | 1370 | line truncation. @xref{Split Window}, for the variable |
| 1328 | window less than the full width of the screen or frame, regardless of | 1371 | @code{truncate-partial-width-windows} which controls this. |
| 1329 | the value of @code{truncate-lines}. See also @ref{Display,, Display, | ||
| 1330 | elisp, The Emacs Lisp Reference Manual}. | ||
| 1331 | |||
| 1332 | @vindex overflow-newline-into-fringe | ||
| 1333 | If the variable @code{overflow-newline-into-fringe} is | ||
| 1334 | non-@code{nil} on a graphical display, then Emacs does not continue or | ||
| 1335 | truncate a line which is exactly as wide as the window. Instead, the | ||
| 1336 | newline overflows into the right fringe, and the cursor appears in the | ||
| 1337 | fringe when positioned on that newline. | ||
| 1338 | 1372 | ||
| 1339 | @node Visual Line Mode | 1373 | @node Visual Line Mode |
| 1340 | @section Visual Line Mode | 1374 | @section Visual Line Mode |
| @@ -1387,11 +1421,8 @@ variable @code{visual-line-fringe-indicators}. | |||
| 1387 | @node Display Custom | 1421 | @node Display Custom |
| 1388 | @section Customization of Display | 1422 | @section Customization of Display |
| 1389 | 1423 | ||
| 1390 | This section describes variables (@pxref{Variables}) that you can | 1424 | This section describes variables that control miscellaneous aspects |
| 1391 | change to customize how Emacs displays. Beginning users can skip | 1425 | of the appearance of the Emacs screen. Beginning users can skip it. |
| 1392 | it. | ||
| 1393 | @c the reason for that pxref is because an xref early in the | ||
| 1394 | @c ``echo area'' section leads here. | ||
| 1395 | 1426 | ||
| 1396 | @vindex visible-bell | 1427 | @vindex visible-bell |
| 1397 | If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts | 1428 | If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts |
| @@ -1403,19 +1434,7 @@ to make the screen blink. | |||
| 1403 | The variable @code{echo-keystrokes} controls the echoing of multi-character | 1434 | The variable @code{echo-keystrokes} controls the echoing of multi-character |
| 1404 | keys; its value is the number of seconds of pause required to cause echoing | 1435 | keys; its value is the number of seconds of pause required to cause echoing |
| 1405 | to start, or zero, meaning don't echo at all. The value takes effect when | 1436 | to start, or zero, meaning don't echo at all. The value takes effect when |
| 1406 | there is someting to echo. @xref{Echo Area}. | 1437 | there is something to echo. @xref{Echo Area}. |
| 1407 | |||
| 1408 | @vindex baud-rate | ||
| 1409 | The variable @anchor{baud-rate}@code{baud-rate} holds the output | ||
| 1410 | speed of the terminal. Setting this variable does not change the | ||
| 1411 | speed of actual data transmission, but the value is used for | ||
| 1412 | calculations. On text-only terminals, it affects padding, and | ||
| 1413 | decisions about whether to scroll part of the screen or redraw it | ||
| 1414 | instead. It also affects the behavior of incremental search. On | ||
| 1415 | graphical displays, @code{baud-rate} is only used to determine how | ||
| 1416 | frequently to look for pending input during display updating. A | ||
| 1417 | higher value of @code{baud-rate} means that check for pending input | ||
| 1418 | will be done less frequently. | ||
| 1419 | 1438 | ||
| 1420 | @cindex mouse pointer | 1439 | @cindex mouse pointer |
| 1421 | @cindex hourglass pointer display | 1440 | @cindex hourglass pointer display |
| @@ -1458,15 +1477,3 @@ itself, in pixels; the default is 2. | |||
| 1458 | result in text that is hard to read. Call the function | 1477 | result in text that is hard to read. Call the function |
| 1459 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} | 1478 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} |
| 1460 | argument to suppress the effect of bold-face in this case. | 1479 | argument to suppress the effect of bold-face in this case. |
| 1461 | |||
| 1462 | @vindex no-redraw-on-reenter | ||
| 1463 | On a text-only terminal, when you reenter Emacs after suspending, Emacs | ||
| 1464 | normally clears the screen and redraws the entire display. On some | ||
| 1465 | terminals with more than one page of memory, it is possible to arrange | ||
| 1466 | the termcap entry so that the @samp{ti} and @samp{te} strings (output | ||
| 1467 | to the terminal when Emacs is entered and exited, respectively) switch | ||
| 1468 | between pages of memory so as to use one page for Emacs and another | ||
| 1469 | page for other output. On such terminals, you might want to set the variable | ||
| 1470 | @code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to | ||
| 1471 | assume, when resumed, that the screen page it is using still contains | ||
| 1472 | what Emacs last wrote there. | ||
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 44f1aed134e..b25c09aa29d 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -281,7 +281,7 @@ Completion | |||
| 281 | 281 | ||
| 282 | * Completion Example:: Examples of using completion. | 282 | * Completion Example:: Examples of using completion. |
| 283 | * Completion Commands:: A list of completion commands. | 283 | * Completion Commands:: A list of completion commands. |
| 284 | * Strict Completion:: Different types of completion. | 284 | * Completion Exit:: Completion and minibuffer text submission. |
| 285 | * Completion Styles:: How completion matches are chosen. | 285 | * Completion Styles:: How completion matches are chosen. |
| 286 | * Completion Options:: Options for completion. | 286 | * Completion Options:: Options for completion. |
| 287 | 287 | ||
| @@ -342,6 +342,7 @@ Registers | |||
| 342 | Controlling the Display | 342 | Controlling the Display |
| 343 | 343 | ||
| 344 | * Scrolling:: Commands to move text up and down in a window. | 344 | * Scrolling:: Commands to move text up and down in a window. |
| 345 | * Recentering:: A scrolling command that centers the current line. | ||
| 345 | * Auto Scrolling:: Redisplay scrolls text automatically when needed. | 346 | * Auto Scrolling:: Redisplay scrolls text automatically when needed. |
| 346 | * Horizontal Scrolling:: Moving text left and right in a window. | 347 | * Horizontal Scrolling:: Moving text left and right in a window. |
| 347 | * Narrowing:: Restricting display and editing to a portion | 348 | * Narrowing:: Restricting display and editing to a portion |
| @@ -388,7 +389,6 @@ Incremental Search | |||
| 388 | or else edit the search string. | 389 | or else edit the search string. |
| 389 | * Isearch Scroll:: Scrolling during an incremental search. | 390 | * Isearch Scroll:: Scrolling during an incremental search. |
| 390 | * Isearch Minibuffer:: Incremental search of the minibuffer history. | 391 | * Isearch Minibuffer:: Incremental search of the minibuffer history. |
| 391 | * Slow Isearch:: Incremental search features for slow terminals. | ||
| 392 | 392 | ||
| 393 | Replacement Commands | 393 | Replacement Commands |
| 394 | 394 | ||
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 433bf617598..2317f876b08 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -47,58 +47,58 @@ on file directories. | |||
| 47 | @section File Names | 47 | @section File Names |
| 48 | @cindex file names | 48 | @cindex file names |
| 49 | 49 | ||
| 50 | Many Emacs commands that operate on a file require you to specify | ||
| 51 | the file name, using the minibuffer (@pxref{Minibuffer}). You can use | ||
| 52 | @dfn{completion} to specify long file names (@pxref{Completion}). | ||
| 53 | Note that file name completion ignores file names whose extensions | ||
| 54 | appear in the variable @code{completion-ignored-extensions} | ||
| 55 | (@pxref{Completion Options}). | ||
| 56 | |||
| 57 | @cindex default file name | 50 | @cindex default file name |
| 58 | For most operations, there is a @dfn{default file name} which is | 51 | Many Emacs commands that operate on a file require you to specify |
| 59 | used if you type just @key{RET} to enter an empty argument. Normally, | 52 | the file name, using the minibuffer (@pxref{Minibuffer File}). |
| 60 | the default file name is the name of the file visited in the current | 53 | |
| 61 | buffer. | 54 | While in the minibuffer, you can use the usual completion and |
| 55 | history commands (@pxref{Minibuffer}). Note that file name completion | ||
| 56 | ignores file names whose extensions appear in the variable | ||
| 57 | @code{completion-ignored-extensions} (@pxref{Completion Options}). | ||
| 58 | Note also that most commands use ``permissive completion with | ||
| 59 | confirmation'' for reading file names: you are allowed to submit a | ||
| 60 | nonexistent file name, but if you type @key{RET} immediately after | ||
| 61 | completing up to a nonexistent file name, Emacs prints | ||
| 62 | @samp{[Confirm]} and you must type a second @key{RET} to confirm. | ||
| 63 | @xref{Completion Exit}, for details. | ||
| 62 | 64 | ||
| 63 | @cindex default directory | 65 | @cindex default directory |
| 64 | @vindex default-directory | 66 | @vindex default-directory |
| 65 | @vindex insert-default-directory | 67 | @vindex insert-default-directory |
| 66 | Each buffer has a @dfn{default directory} which is normally the same | 68 | Each buffer has a @dfn{default directory}, stored in the |
| 67 | as the directory of the file visited in that buffer. For example, if | 69 | buffer-local variable @code{default-directory}. Whenever Emacs reads |
| 68 | the default file name is @file{/u/rms/gnu/gnu.tasks}, the default | 70 | a file name using the minibuffer, it usually inserts the default |
| 69 | directory is normally @file{/u/rms/gnu/}. The default directory is | 71 | directory into the minibuffer as the initial contents. You can |
| 70 | kept in the variable @code{default-directory}, which has a separate | 72 | inhibit this insertion by changing the variable |
| 71 | value in every buffer. When a command reads a file name using the | 73 | @code{insert-default-directory} to @code{nil} (@pxref{Minibuffer |
| 72 | minibuffer, the default directory usually serves as the initial | 74 | File}). Regardless, Emacs always assumes that any relative file name |
| 73 | contents of the minibuffer. To inhibit the insertion of the default | 75 | is relative to the default directory, e.g. entering a file name |
| 74 | directory, set the variable @code{insert-default-directory} to | 76 | without a directory specifies a file in the default directory. |
| 75 | @code{nil}. | ||
| 76 | 77 | ||
| 77 | If you enter a file name without a directory, that specifies a file | 78 | @findex cd |
| 78 | in the default directory. If you specify a directory in a relative | 79 | @findex pwd |
| 79 | fashion, with a name that does not start with a slash, it is | 80 | When you visit a file, Emacs sets @code{default-directory} in the |
| 80 | interpreted with respect to the default directory. For example, | 81 | visiting buffer to the directory of its file. When you create a new |
| 81 | suppose the default directory is @file{/u/rms/gnu/}. Entering just | 82 | buffer that is not visiting a file, via a command like @kbd{C-x b}, |
| 82 | @samp{foo} in the minibuffer, with a directory omitted, specifies the | 83 | its default directory is usually copied from the buffer that was |
| 83 | file @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies | 84 | current at the time (@pxref{Select Buffer}). You can use the command |
| 85 | @kbd{M-x pwd} to see the value of @code{default-directory} in the | ||
| 86 | current buffer. The command @kbd{M-x cd} prompts for a directory | ||
| 87 | name, and sets the buffer's @code{default-directory} to that directory | ||
| 88 | (doing this does not change the buffer's file name, if any). | ||
| 89 | |||
| 90 | As an example, when you visit the file @file{/u/rms/gnu/gnu.tasks}, | ||
| 91 | the default directory is set to @file{/u/rms/gnu/}. If you invoke a | ||
| 92 | command that reads a file name, entering just @samp{foo} in the | ||
| 93 | minibuffer, with a directory omitted, specifies the file | ||
| 94 | @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies | ||
| 84 | @file{/u/rms/.login}; and entering @samp{new/foo} specifies | 95 | @file{/u/rms/.login}; and entering @samp{new/foo} specifies |
| 85 | @file{/u/rms/gnu/new/foo}. | 96 | @file{/u/rms/gnu/new/foo}. |
| 86 | 97 | ||
| 87 | When typing a file name into the minibuffer, you can make use of a | 98 | When typing a file name into the minibuffer, you can make use of a |
| 88 | couple of shortcuts: a double slash is interpreted as ``ignore | 99 | couple of shortcuts: a double slash is interpreted as ``ignore |
| 89 | everything before the second slash in the pair,'' and @samp{~/} is | 100 | everything before the second slash in the pair,'' and @samp{~/} is |
| 90 | interpreted as your home directory. @xref{Minibuffer File}, for more | 101 | interpreted as your home directory. @xref{Minibuffer File}. |
| 91 | information about these shortcuts. | ||
| 92 | |||
| 93 | @findex cd | ||
| 94 | @findex pwd | ||
| 95 | The command @kbd{M-x pwd} displays the default directory, and the | ||
| 96 | command @kbd{M-x cd} sets it to a value read using the minibuffer. A | ||
| 97 | buffer's default directory changes only when the @code{cd} command is | ||
| 98 | used. A file-visiting buffer's default directory is initialized to | ||
| 99 | the directory of the file it visits. If you create a buffer with | ||
| 100 | @kbd{C-x b}, its default directory is copied from that of the buffer | ||
| 101 | that was current at the time (@pxref{Select Buffer}). | ||
| 102 | 102 | ||
| 103 | @cindex environment variables in file names | 103 | @cindex environment variables in file names |
| 104 | @cindex expansion of environment variables | 104 | @cindex expansion of environment variables |
| @@ -113,10 +113,8 @@ the @samp{$}; alternatively, it can be enclosed in braces after the | |||
| 113 | @file{/u/$@{FOO@}/test.c} are abbreviations for | 113 | @file{/u/$@{FOO@}/test.c} are abbreviations for |
| 114 | @file{/u/rms/hacks/test.c}. If the environment variable is not | 114 | @file{/u/rms/hacks/test.c}. If the environment variable is not |
| 115 | defined, no substitution occurs, so that the character @samp{$} stands | 115 | defined, no substitution occurs, so that the character @samp{$} stands |
| 116 | for itself. | 116 | for itself. Note that environment variables affect Emacs only if they |
| 117 | 117 | are applied before Emacs is started. | |
| 118 | Note that environment variables affect Emacs only if they are | ||
| 119 | applied before Emacs is started. | ||
| 120 | 118 | ||
| 121 | To access a file with @samp{$} in its name, if the @samp{$} causes | 119 | To access a file with @samp{$} in its name, if the @samp{$} causes |
| 122 | expansion, type @samp{$$}. This pair is converted to a single | 120 | expansion, type @samp{$$}. This pair is converted to a single |
| @@ -125,8 +123,7 @@ a single @samp{$}. Alternatively, quote the whole file name with | |||
| 125 | @samp{/:} (@pxref{Quoted File Names}). File names which begin with a | 123 | @samp{/:} (@pxref{Quoted File Names}). File names which begin with a |
| 126 | literal @samp{~} should also be quoted with @samp{/:}. | 124 | literal @samp{~} should also be quoted with @samp{/:}. |
| 127 | 125 | ||
| 128 | You can include non-@acronym{ASCII} characters in file names if you set the | 126 | You can include non-@acronym{ASCII} characters in file names. |
| 129 | variable @code{file-name-coding-system} to a non-@code{nil} value. | ||
| 130 | @xref{File Name Coding}. | 127 | @xref{File Name Coding}. |
| 131 | 128 | ||
| 132 | @node Visiting | 129 | @node Visiting |
| @@ -159,48 +156,43 @@ Visit a file with no conversion of the contents. | |||
| 159 | buffer so you can edit them. Emacs makes a new buffer for each file | 156 | buffer so you can edit them. Emacs makes a new buffer for each file |
| 160 | that you visit. | 157 | that you visit. |
| 161 | 158 | ||
| 162 | Emacs normally constructs the buffer name from the file name, | 159 | @kindex C-x C-f |
| 163 | omitting the directory name. For example, a file named | 160 | @findex find-file |
| 164 | @file{/usr/rms/emacs.tex} is visited in a buffer named | 161 | To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the |
| 165 | @samp{emacs.tex}. If there is already a buffer with that name, Emacs | 162 | minibuffer to enter the name of the desired file. While in the |
| 166 | constructs a unique name; the normal method is to append @samp{<2>}, | 163 | minibuffer, you can abort the command by typing @kbd{C-g}. @xref{File |
| 167 | @samp{<3>}, and so on, but you can select other methods. | 164 | Names}, for details about entering file names into minibuffers. |
| 165 | |||
| 166 | If the specified file exists but the system does not allow you to | ||
| 167 | read it, an error message is displayed in the echo area. Otherwise, | ||
| 168 | you can tell that @kbd{C-x C-f} has completed successfully by the | ||
| 169 | appearance of new text on the screen, and by the buffer name shown in | ||
| 170 | the mode line (@pxref{Mode Line}). Emacs normally constructs the | ||
| 171 | buffer name from the file name, omitting the directory name. For | ||
| 172 | example, a file named @file{/usr/rms/emacs.tex} is visited in a buffer | ||
| 173 | named @samp{emacs.tex}. If there is already a buffer with that name, | ||
| 174 | Emacs constructs a unique name; the normal method is to append | ||
| 175 | @samp{<2>}, @samp{<3>}, and so on, but you can select other methods. | ||
| 168 | @xref{Uniquify}. | 176 | @xref{Uniquify}. |
| 169 | 177 | ||
| 170 | Each window's mode line shows the name of the buffer that is being | 178 | @cindex creating files |
| 171 | displayed in that window, so you can always tell what buffer you are | 179 | To create a new file, just visit it using the same command, @kbd{C-x |
| 172 | editing. @pxref{Mode Line}. | 180 | C-f}. Emacs displays @samp{(New file)} in the echo area, but in other |
| 173 | 181 | respects behaves as if you had visited an existing empty file. | |
| 174 | The changes you make with editing commands are made in the Emacs | ||
| 175 | buffer. They do not take effect in the file that you visited, or any | ||
| 176 | permanent place, until you @dfn{save} the buffer (@pxref{Saving}). | ||
| 177 | 182 | ||
| 178 | @cindex modified (buffer) | 183 | @cindex modified (buffer) |
| 179 | If a buffer contains changes that have not been saved, we say the | 184 | After visiting a file, the changes you make with editing commands are |
| 180 | buffer is @dfn{modified}. This implies that some changes will be lost | 185 | made in the Emacs buffer. They do not take effect in the visited |
| 181 | if the buffer is not saved. The mode line displays two stars near the | 186 | file, until you @dfn{save} the buffer (@pxref{Saving}). If a buffer |
| 182 | left margin to indicate that the buffer is modified. | 187 | contains changes that have not been saved, we say the buffer is |
| 183 | 188 | @dfn{modified}. This implies that some changes will be lost if the | |
| 184 | @kindex C-x C-f | 189 | buffer is not saved. The mode line displays two stars near the left |
| 185 | @findex find-file | 190 | margin to indicate that the buffer is modified. |
| 186 | To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the | 191 | |
| 187 | minibuffer to enter the name of the desired file. The usual | 192 | If you visit a file that is already in Emacs, @kbd{C-x C-f} switches |
| 188 | defaulting and completion behavior is available in this minibuffer | 193 | to the existing buffer instead of making another copy. Before doing |
| 189 | (@pxref{Minibuffer File}). Note, also, that completion ignores | 194 | so, it checks whether the file has changed since you last visited or |
| 190 | certain file names (@pxref{Completion Options}). While in the | 195 | saved it. If the file has changed, Emacs offers to reread it. |
| 191 | minibuffer, you can abort @kbd{C-x C-f} by typing @kbd{C-g}. | ||
| 192 | |||
| 193 | Your can tell that @kbd{C-x C-f} has completed successfully by the | ||
| 194 | appearance of new text on the screen and a new buffer name in the mode | ||
| 195 | line. If the specified file does not exist and you could not create | ||
| 196 | it, or exists but you can't read it, an error message is displayed in | ||
| 197 | the echo area. | ||
| 198 | |||
| 199 | If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make | ||
| 200 | another copy. It selects the existing buffer containing that file. | ||
| 201 | However, before doing so, it checks whether the file itself has changed | ||
| 202 | since you visited or saved it last. If the file has changed, Emacs offers | ||
| 203 | to reread it. | ||
| 204 | 196 | ||
| 205 | @vindex large-file-warning-threshold | 197 | @vindex large-file-warning-threshold |
| 206 | @cindex file, warning when size is large | 198 | @cindex file, warning when size is large |
| @@ -211,10 +203,10 @@ to reread it. | |||
| 211 | about 10 megabytes), Emacs asks you for confirmation first. You can | 203 | about 10 megabytes), Emacs asks you for confirmation first. You can |
| 212 | answer @kbd{y} to proceed with visiting the file. Note, however, that | 204 | answer @kbd{y} to proceed with visiting the file. Note, however, that |
| 213 | Emacs cannot visit files that are larger than the maximum Emacs buffer | 205 | Emacs cannot visit files that are larger than the maximum Emacs buffer |
| 214 | size, which is limited by the amount of memory Emacs can allocate | 206 | size, which is limited by the amount of memory Emacs can allocate and |
| 215 | and by the integers that Emacs can represent | 207 | by the integers that Emacs can represent (@pxref{Buffers}). If you |
| 216 | (@pxref{Buffers}). If you try, Emacs will display an error message | 208 | try, Emacs displays an error message saying that the maximum buffer |
| 217 | saying that the maximum buffer size has been exceeded. | 209 | size has been exceeded. |
| 218 | 210 | ||
| 219 | @cindex wildcard characters in file names | 211 | @cindex wildcard characters in file names |
| 220 | @vindex find-file-wildcards | 212 | @vindex find-file-wildcards |
| @@ -228,63 +220,21 @@ File Names}, for information on how to visit a file whose name | |||
| 228 | actually contains wildcard characters. You can disable the wildcard | 220 | actually contains wildcard characters. You can disable the wildcard |
| 229 | feature by customizing @code{find-file-wildcards}. | 221 | feature by customizing @code{find-file-wildcards}. |
| 230 | 222 | ||
| 231 | @cindex file selection dialog | ||
| 232 | On graphical displays, there are two additional methods for visiting | ||
| 233 | files. Firstly, when Emacs is built with a suitable GUI toolkit, | ||
| 234 | commands invoked with the mouse (by clicking on the menu bar or tool | ||
| 235 | bar) use the toolkit's standard ``File Selection'' dialog instead of | ||
| 236 | prompting for the file name in the minibuffer. On GNU/Linux and Unix | ||
| 237 | platforms, Emacs does this when built with GTK, LessTif, and Motif | ||
| 238 | toolkits; on MS-Windows and Mac, the GUI version does that by default. | ||
| 239 | For information on how to customize this, see @ref{Dialog Boxes}. | ||
| 240 | |||
| 241 | Secondly, Emacs supports ``drag and drop'': dropping a file into an | ||
| 242 | ordinary Emacs window visits the file using that window. As an | ||
| 243 | exception, dropping a file into a window displaying a Dired buffer | ||
| 244 | moves or copies the file into the displayed directory. For details, | ||
| 245 | see @ref{Drag and Drop}, and @ref{Misc Dired Features}. | ||
| 246 | |||
| 247 | @cindex creating files | ||
| 248 | What if you want to create a new file? Just visit it. Emacs | ||
| 249 | displays @samp{(New file)} in the echo area, but in other respects | ||
| 250 | behaves as if you had visited an existing empty file. If you make | ||
| 251 | changes and save them, the file is created. | ||
| 252 | |||
| 253 | @cindex minibuffer confirmation | ||
| 254 | @cindex confirming in the minibuffer | ||
| 255 | @vindex confirm-nonexistent-file-or-buffer | ||
| 256 | When @key{TAB} completion results in a nonexistent file name and you | ||
| 257 | type @key{RET} immediately to visit it, Emacs asks for confirmation; | ||
| 258 | this is because it's possible that you expected completion to go | ||
| 259 | further and give you an existing file's name. The string | ||
| 260 | @samp{[Confirm]} appears for a short time after the file name to | ||
| 261 | indicate the need to confirm in this way. Type @key{RET} to confirm | ||
| 262 | and visit the nonexistent file. The variable | ||
| 263 | @code{confirm-nonexistent-file-or-buffer} controls whether Emacs asks | ||
| 264 | for confirmation before visiting a new file. The default value, | ||
| 265 | @code{after-completion}, gives the behavior we have just described. | ||
| 266 | If the value is @code{nil}, Emacs never asks for confirmation; for any | ||
| 267 | other non-@code{nil} value, Emacs always asks for confirmation. This | ||
| 268 | variable also affects the @code{switch-to-buffer} command | ||
| 269 | (@pxref{Select Buffer}). @xref{Completion}, for more information | ||
| 270 | about completion. | ||
| 271 | |||
| 272 | @kindex C-x C-v | 223 | @kindex C-x C-v |
| 273 | @findex find-alternate-file | 224 | @findex find-alternate-file |
| 274 | If you visit a nonexistent file unintentionally (because you typed | 225 | If you visit the wrong file unintentionally by typing its name |
| 275 | the wrong file name), type @kbd{C-x C-v} (@code{find-alternate-file}) | 226 | incorrectly, type @kbd{C-x C-v} (@code{find-alternate-file}) to visit |
| 276 | to visit the file you really wanted. @kbd{C-x C-v} is similar to | 227 | the file you really wanted. @kbd{C-x C-v} is similar to @kbd{C-x |
| 277 | @kbd{C-x C-f}, but it kills the current buffer (after first offering | 228 | C-f}, but it kills the current buffer (after first offering to save it |
| 278 | to save it if it is modified). When @kbd{C-x C-v} reads the file name | 229 | if it is modified). When @kbd{C-x C-v} reads the file name to visit, |
| 279 | to visit, it inserts the entire default file name in the buffer, with | 230 | it inserts the entire default file name in the buffer, with point just |
| 280 | point just after the directory part; this is convenient if you made a | 231 | after the directory part; this is convenient if you made a slight |
| 281 | slight error in typing the name. | 232 | error in typing the name. |
| 282 | 233 | ||
| 283 | @vindex find-file-run-dired | 234 | @vindex find-file-run-dired |
| 284 | If you ``visit'' a file that is actually a directory, Emacs invokes | 235 | If you ``visit'' a file that is actually a directory, Emacs invokes |
| 285 | Dired, the Emacs directory browser; this lets you ``edit'' the | 236 | Dired, the Emacs directory browser. @xref{Dired}. You can disable |
| 286 | contents of the directory. @xref{Dired}. You can disable this | 237 | this behavior by setting the variable @code{find-file-run-dired} to |
| 287 | behavior by setting the variable @code{find-file-run-dired} to | ||
| 288 | @code{nil}; in that case, it is an error to try to visit a directory. | 238 | @code{nil}; in that case, it is an error to try to visit a directory. |
| 289 | 239 | ||
| 290 | Files which are actually collections of other files, or @dfn{file | 240 | Files which are actually collections of other files, or @dfn{file |
| @@ -321,17 +271,28 @@ new frame, or makes visible any existing frame showing the file you | |||
| 321 | seek. This feature is available only when you are using a window | 271 | seek. This feature is available only when you are using a window |
| 322 | system. @xref{Frames}. | 272 | system. @xref{Frames}. |
| 323 | 273 | ||
| 324 | Emacs recognizes from the contents of a file which end-of-line | 274 | @cindex file selection dialog |
| 325 | convention it uses to separate lines---newline (used on GNU/Linux and | 275 | On graphical displays, there are two additional methods for visiting |
| 326 | on Unix), carriage-return linefeed (used on Microsoft systems), or | 276 | files. Firstly, when Emacs is built with a suitable GUI toolkit, |
| 327 | just carriage-return (used on the Macintosh)---and automatically | 277 | commands invoked with the mouse (by clicking on the menu bar or tool |
| 328 | converts the contents to the normal Emacs convention, which is that | 278 | bar) use the toolkit's standard ``File Selection'' dialog instead of |
| 329 | the newline character separates lines. This is a part of the general | 279 | prompting for the file name in the minibuffer. On GNU/Linux and Unix |
| 330 | feature of coding system conversion (@pxref{Coding Systems}), and | 280 | platforms, Emacs does this when built with GTK, LessTif, and Motif |
| 331 | makes it possible to edit files imported from different operating | 281 | toolkits; on MS-Windows and Mac, the GUI version does that by default. |
| 332 | systems with equal convenience. If you change the text and save the | 282 | For information on how to customize this, see @ref{Dialog Boxes}. |
| 333 | file, Emacs performs the inverse conversion, changing newlines back | 283 | |
| 334 | into carriage-return linefeed or just carriage-return if appropriate. | 284 | Secondly, Emacs supports ``drag and drop'': dropping a file into an |
| 285 | ordinary Emacs window visits the file using that window. As an | ||
| 286 | exception, dropping a file into a window displaying a Dired buffer | ||
| 287 | moves or copies the file into the displayed directory. For details, | ||
| 288 | see @ref{Drag and Drop}, and @ref{Misc Dired Features}. | ||
| 289 | |||
| 290 | Each time you visit a file, Emacs automatically scans its contents | ||
| 291 | to detect what character encoding and end-of-line convention it uses, | ||
| 292 | and converts these to Emacs' internal encoding and end-of-line | ||
| 293 | convention within the buffer. When you save the buffer, Emacs | ||
| 294 | performs the inverse conversion, writing the file to disk with its | ||
| 295 | original encoding and end-of-line convention. @xref{Coding Systems}. | ||
| 335 | 296 | ||
| 336 | @findex find-file-literally | 297 | @findex find-file-literally |
| 337 | If you wish to edit a file as a sequence of @acronym{ASCII} | 298 | If you wish to edit a file as a sequence of @acronym{ASCII} |
| @@ -346,17 +307,17 @@ command asks you whether to visit it literally instead. | |||
| 346 | 307 | ||
| 347 | @vindex find-file-hook | 308 | @vindex find-file-hook |
| 348 | @vindex find-file-not-found-functions | 309 | @vindex find-file-not-found-functions |
| 349 | Two special hook variables allow extensions to modify the operation of | 310 | Two special hook variables allow extensions to modify the operation |
| 350 | visiting files. Visiting a file that does not exist runs the functions | 311 | of visiting files. Visiting a file that does not exist runs the |
| 351 | in the list @code{find-file-not-found-functions}; this variable holds a list | 312 | functions in @code{find-file-not-found-functions}; this variable holds |
| 352 | of functions, and the functions are called one by one (with no | 313 | a list of functions, which are called one by one (with no arguments) |
| 353 | arguments) until one of them returns non-@code{nil}. This is not a | 314 | until one of them returns non-@code{nil}. This is not a normal hook, |
| 354 | normal hook, and the name ends in @samp{-functions} rather than @samp{-hook} | 315 | and the name ends in @samp{-functions} rather than @samp{-hook} to |
| 355 | to indicate that fact. | 316 | indicate that fact. |
| 356 | 317 | ||
| 357 | Successful visiting of any file, whether existing or not, calls the | 318 | Successful visiting of any file, whether existing or not, calls the |
| 358 | functions in the list @code{find-file-hook}, with no arguments. | 319 | functions in @code{find-file-hook}, with no arguments. This variable |
| 359 | This variable is a normal hook. In the case of a nonexistent file, the | 320 | is a normal hook. In the case of a nonexistent file, the |
| 360 | @code{find-file-not-found-functions} are run first. @xref{Hooks}. | 321 | @code{find-file-not-found-functions} are run first. @xref{Hooks}. |
| 361 | 322 | ||
| 362 | There are several ways to specify automatically the major mode for | 323 | There are several ways to specify automatically the major mode for |
| @@ -386,9 +347,9 @@ that was visited in the buffer. | |||
| 386 | 347 | ||
| 387 | @table @kbd | 348 | @table @kbd |
| 388 | @item C-x C-s | 349 | @item C-x C-s |
| 389 | Save the current buffer in its visited file on disk (@code{save-buffer}). | 350 | Save the current buffer to its file (@code{save-buffer}). |
| 390 | @item C-x s | 351 | @item C-x s |
| 391 | Save any or all buffers in their visited files (@code{save-some-buffers}). | 352 | Save any or all buffers to their files (@code{save-some-buffers}). |
| 392 | @item M-~ | 353 | @item M-~ |
| 393 | Forget that the current buffer has been changed (@code{not-modified}). | 354 | Forget that the current buffer has been changed (@code{not-modified}). |
| 394 | With prefix argument (@kbd{C-u}), mark the current buffer as changed. | 355 | With prefix argument (@kbd{C-u}), mark the current buffer as changed. |
| @@ -409,10 +370,10 @@ Wrote /u/rms/gnu/gnu.tasks | |||
| 409 | @end example | 370 | @end example |
| 410 | 371 | ||
| 411 | @noindent | 372 | @noindent |
| 412 | If the selected buffer is not modified (no changes have been made in it | 373 | If the current buffer is not modified (no changes have been made in it |
| 413 | since the buffer was created or last saved), saving is not really done, | 374 | since the buffer was created or last saved), saving is not really |
| 414 | because it would have no effect. Instead, @kbd{C-x C-s} displays a message | 375 | done, because it would have no effect. Instead, @kbd{C-x C-s} |
| 415 | like this in the echo area: | 376 | displays a message like this in the echo area: |
| 416 | 377 | ||
| 417 | @example | 378 | @example |
| 418 | (No changes need to be saved) | 379 | (No changes need to be saved) |
| @@ -597,8 +558,8 @@ Never make numbered backups; always make single backups. | |||
| 597 | @end table | 558 | @end table |
| 598 | 559 | ||
| 599 | @noindent | 560 | @noindent |
| 600 | The usual way to set this variable is globally, through your | 561 | The usual way to set this variable is globally, through your init file |
| 601 | @file{.emacs} file or the customization buffer. However, you can set | 562 | or the customization buffer. However, you can set |
| 602 | @code{version-control} locally in an individual buffer to control the | 563 | @code{version-control} locally in an individual buffer to control the |
| 603 | making of backups for that buffer's file (@pxref{Locals}). You can | 564 | making of backups for that buffer's file (@pxref{Locals}). You can |
| 604 | have Emacs set @code{version-control} locally whenever you visit a | 565 | have Emacs set @code{version-control} locally whenever you visit a |
| @@ -679,34 +640,38 @@ and group. If copying is used, these do not change. If renaming is used, | |||
| 679 | you become the file's owner, and the file's group becomes the default | 640 | you become the file's owner, and the file's group becomes the default |
| 680 | (different operating systems have different defaults for the group). | 641 | (different operating systems have different defaults for the group). |
| 681 | 642 | ||
| 682 | Having the owner change is usually a good idea, because then the owner | ||
| 683 | always shows who last edited the file. Also, the owners of the backups | ||
| 684 | show who produced those versions. Occasionally there is a file whose | ||
| 685 | owner should not change; it is a good idea for such files to contain | ||
| 686 | local variable lists to set @code{backup-by-copying-when-mismatch} | ||
| 687 | locally (@pxref{File Variables}). | ||
| 688 | |||
| 689 | @vindex backup-by-copying | 643 | @vindex backup-by-copying |
| 690 | @vindex backup-by-copying-when-linked | 644 | @vindex backup-by-copying-when-linked |
| 691 | @vindex backup-by-copying-when-mismatch | 645 | @vindex backup-by-copying-when-mismatch |
| 692 | @vindex backup-by-copying-when-privileged-mismatch | 646 | @vindex backup-by-copying-when-privileged-mismatch |
| 693 | @cindex file ownership, and backup | 647 | @cindex file ownership, and backup |
| 694 | @cindex backup, and user-id | 648 | @cindex backup, and user-id |
| 695 | The choice of renaming or copying is controlled by four variables. | 649 | The choice of renaming or copying is made as follows: |
| 696 | Renaming is the default choice. If the variable | 650 | |
| 697 | @code{backup-by-copying} is non-@code{nil}, copying is used. Otherwise, | 651 | @itemize |
| 698 | if the variable @code{backup-by-copying-when-linked} is non-@code{nil}, | 652 | @item |
| 699 | then copying is used for files that have multiple names, but renaming | 653 | If the variable @code{backup-by-copying} is non-@code{nil} (the |
| 700 | may still be used when the file being edited has only one name. If the | 654 | default is @code{nil}), use copying. |
| 701 | variable @code{backup-by-copying-when-mismatch} is non-@code{nil}, then | 655 | |
| 702 | copying is used if renaming would cause the file's owner or group to | 656 | @item |
| 703 | change. @code{backup-by-copying-when-mismatch} is @code{t} by default | 657 | Otherwise, if the variable @code{backup-by-copying-when-linked} is |
| 704 | if you start Emacs as the superuser. The fourth variable, | 658 | non-@code{nil} (the default is @code{nil}), and the file has multiple |
| 705 | @code{backup-by-copying-when-privileged-mismatch}, gives the highest | 659 | names, use copying. |
| 706 | numeric user-id for which @code{backup-by-copying-when-mismatch} will be | 660 | |
| 707 | forced on. This is useful when low-numbered user-ids are assigned to | 661 | @item |
| 708 | special system users, such as @code{root}, @code{bin}, @code{daemon}, | 662 | Otherwise, if the variable @code{backup-by-copying-when-mismatch} is |
| 709 | etc., which must maintain ownership of files. | 663 | non-@code{nil} (the default is @code{t}), and renaming would change |
| 664 | the file's owner or group, use copying. | ||
| 665 | |||
| 666 | If you change @code{backup-by-copying-when-mismatch} to @code{nil}, | ||
| 667 | Emacs checks the numeric user-id of the file's owner. If this is | ||
| 668 | higher than @code{backup-by-copying-when-privileged-mismatch}, then it | ||
| 669 | behaves as though @code{backup-by-copying-when-mismatch} is | ||
| 670 | non-@code{nil} anyway. | ||
| 671 | |||
| 672 | @item | ||
| 673 | Otherwise, renaming is the default choice. | ||
| 674 | @end itemize | ||
| 710 | 675 | ||
| 711 | When a file is managed with a version control system (@pxref{Version | 676 | When a file is managed with a version control system (@pxref{Version |
| 712 | Control}), Emacs does not normally make backups in the usual way for | 677 | Control}), Emacs does not normally make backups in the usual way for |
| @@ -725,28 +690,28 @@ Emacs---the version control system does it. | |||
| 725 | if there isn't already one there. If the value is @code{visit}, Emacs | 690 | if there isn't already one there. If the value is @code{visit}, Emacs |
| 726 | adds a newline at the end of any file that doesn't have one, just | 691 | adds a newline at the end of any file that doesn't have one, just |
| 727 | after it visits the file. (This marks the buffer as modified, and you | 692 | after it visits the file. (This marks the buffer as modified, and you |
| 728 | can undo it.) If the value is @code{visit-save}, that means to add | 693 | can undo it.) If the value is @code{visit-save}, Emacs adds such |
| 729 | newlines both on visiting and on saving. If the value is @code{nil}, | 694 | newlines both on visiting and on saving. If the value is @code{nil}, |
| 730 | Emacs leaves the end of the file unchanged; if it's neither @code{nil} | 695 | Emacs leaves the end of the file unchanged; any other non-@code{nil} |
| 731 | nor @code{t}, Emacs asks you whether to add a newline. The default is | 696 | value means to asks you whether to add a newline. The default is |
| 732 | @code{nil}. | 697 | @code{nil}. |
| 733 | 698 | ||
| 734 | @vindex mode-require-final-newline | 699 | @vindex mode-require-final-newline |
| 735 | Many major modes are designed for specific kinds of files that are | 700 | Some major modes are designed for specific kinds of files that are |
| 736 | always supposed to end in newlines. These major modes set the | 701 | always supposed to end in newlines. Such major modes set the variable |
| 737 | variable @code{require-final-newline} according to | 702 | @code{require-final-newline} to the value of |
| 738 | @code{mode-require-final-newline}. By setting the latter variable, | 703 | @code{mode-require-final-newline}, which defaults to @code{t}. By |
| 739 | you can control how these modes handle final newlines. | 704 | setting the latter variable, you can control how these modes handle |
| 705 | final newlines. | ||
| 740 | 706 | ||
| 741 | @vindex write-region-inhibit-fsync | 707 | @vindex write-region-inhibit-fsync |
| 742 | When Emacs saves a file, it invokes the @code{fsync} system call to | 708 | When Emacs saves a file, it invokes the @code{fsync} system call to |
| 743 | force the data immediately out to disk. This is important for safety | 709 | force the data immediately out to disk. This is important for safety |
| 744 | if the system crashes or in case of power outage. However, it can be | 710 | if the system crashes or in case of power outage. However, it can be |
| 745 | disruptive on laptops using power saving, because it requires the disk | 711 | disruptive on laptops using power saving, as it may force a disk |
| 746 | to spin up each time you save a file. Setting | 712 | spin-up each time you save a file. If you accept an increased risk of |
| 747 | @code{write-region-inhibit-fsync} to a non-@code{nil} value disables | 713 | data loss, you can set @code{write-region-inhibit-fsync} to a |
| 748 | this synchronization. Be careful---this means increased risk of data | 714 | non-@code{nil} value to disable the synchronization. |
| 749 | loss. | ||
| 750 | 715 | ||
| 751 | @node Interlocking | 716 | @node Interlocking |
| 752 | @subsection Protection against Simultaneous Editing | 717 | @subsection Protection against Simultaneous Editing |
| @@ -754,9 +719,9 @@ loss. | |||
| 754 | @cindex file dates | 719 | @cindex file dates |
| 755 | @cindex simultaneous editing | 720 | @cindex simultaneous editing |
| 756 | Simultaneous editing occurs when two users visit the same file, both | 721 | Simultaneous editing occurs when two users visit the same file, both |
| 757 | make changes, and then both save them. If nobody were informed that | 722 | make changes, and then both save them. If nobody is informed that |
| 758 | this was happening, whichever user saved first would later find that his | 723 | this is happening, whichever user saves first would later find that |
| 759 | changes were lost. | 724 | his changes were lost. |
| 760 | 725 | ||
| 761 | On some systems, Emacs notices immediately when the second user starts | 726 | On some systems, Emacs notices immediately when the second user starts |
| 762 | to change the file, and issues an immediate warning. On all systems, | 727 | to change the file, and issues an immediate warning. On all systems, |
| @@ -794,38 +759,28 @@ contents remain unchanged---the modification you were trying to make | |||
| 794 | does not actually take place. | 759 | does not actually take place. |
| 795 | @end table | 760 | @end table |
| 796 | 761 | ||
| 797 | Note that locking works on the basis of a file name; if a file has | ||
| 798 | multiple names, Emacs does not realize that the two names are the same file | ||
| 799 | and cannot prevent two users from editing it simultaneously under different | ||
| 800 | names. However, basing locking on names means that Emacs can interlock the | ||
| 801 | editing of new files that will not really exist until they are saved. | ||
| 802 | |||
| 803 | Some systems are not configured to allow Emacs to make locks, and | ||
| 804 | there are cases where lock files cannot be written. In these cases, | ||
| 805 | Emacs cannot detect trouble in advance, but it still can detect the | ||
| 806 | collision when you try to save a file and overwrite someone else's | ||
| 807 | changes. Every time Emacs saves a buffer, it first checks the | ||
| 808 | last-modification date of the existing file on disk to verify that it | ||
| 809 | has not changed since the file was last visited or saved. If the date | ||
| 810 | does not match, it implies that changes were made in the file in some | ||
| 811 | other way, and these changes are about to be lost if Emacs actually | ||
| 812 | does save. To prevent this, Emacs displays a warning message and asks | ||
| 813 | for confirmation before saving. Occasionally you will know why the | ||
| 814 | file was changed and know that it does not matter; then you can answer | ||
| 815 | @kbd{yes} and proceed. Otherwise, you should cancel the save with | ||
| 816 | @kbd{C-g} and investigate the situation. | ||
| 817 | |||
| 818 | If Emacs or the operating system crashes, this may leave behind lock | 762 | If Emacs or the operating system crashes, this may leave behind lock |
| 819 | files which are stale, so you may occasionally get warnings about | 763 | files which are stale, so you may occasionally get warnings about |
| 820 | spurious collisions. When you determine that the collision is spurious, | 764 | spurious collisions. When you determine that the collision is |
| 821 | just use @kbd{p} to tell Emacs to go ahead anyway. | 765 | spurious, just use @kbd{p} to tell Emacs to go ahead anyway. |
| 822 | 766 | ||
| 823 | The first thing you should do when notified that simultaneous editing | 767 | Note that locking works on the basis of a file name; if a file has |
| 824 | has already taken place is to list the directory with @kbd{C-u C-x C-d} | 768 | multiple names, Emacs does not prevent two users from editing it |
| 825 | (@pxref{Directories}). This shows the file's current author. You | 769 | simultaneously under different names. |
| 826 | should attempt to contact him to warn him not to continue editing. | 770 | |
| 827 | Often the next step is to save the contents of your Emacs buffer under a | 771 | A lock file cannot be written in some circumstances, e.g. if Emacs |
| 828 | different name, and use @code{diff} to compare the two files.@refill | 772 | lacks the system permissions or the system does not support symbolic |
| 773 | links. In these cases, Emacs can still detect the collision when you | ||
| 774 | try to save a file, by checking the file's last-modification date. If | ||
| 775 | the file has changed since the last time Emacs visited or saved it, | ||
| 776 | that implies that changes have been made in some other way, and will | ||
| 777 | be lost if Emacs proceeds with saving. Emacs then displays a warning | ||
| 778 | message and asks for confirmation before saving; answer @kbd{yes} to | ||
| 779 | save, and @kbd{no} or @kbd{C-g} cancel the save. | ||
| 780 | |||
| 781 | If you are notified that simultaneous editing has already taken | ||
| 782 | place, one way to compare the buffer to its file is the @kbd{M-x | ||
| 783 | diff-buffer-with-file} command. @xref{Comparing Files}. | ||
| 829 | 784 | ||
| 830 | @node File Shadowing | 785 | @node File Shadowing |
| 831 | @subsection Shadowing Files | 786 | @subsection Shadowing Files |
| @@ -881,10 +836,10 @@ shadow-define-cluster}. | |||
| 881 | @cindex modification dates | 836 | @cindex modification dates |
| 882 | @cindex locale, date format | 837 | @cindex locale, date format |
| 883 | 838 | ||
| 884 | You can arrange to put a time stamp in a file, so that it will be updated | 839 | You can arrange to put a time stamp in a file, so that it is updated |
| 885 | automatically each time you edit and save the file. The time stamp | 840 | automatically each time you edit and save the file. The time stamp |
| 886 | has to be in the first eight lines of the file, and you should | 841 | must be in the first eight lines of the file, and you should insert it |
| 887 | insert it like this: | 842 | like this: |
| 888 | 843 | ||
| 889 | @example | 844 | @example |
| 890 | Time-stamp: <> | 845 | Time-stamp: <> |
| @@ -898,13 +853,13 @@ Time-stamp: " " | |||
| 898 | @end example | 853 | @end example |
| 899 | 854 | ||
| 900 | @findex time-stamp | 855 | @findex time-stamp |
| 901 | Then add the hook function @code{time-stamp} to the hook | 856 | Then add the function @code{time-stamp} to the hook |
| 902 | @code{before-save-hook}; that hook function will automatically update | 857 | @code{before-save-hook} (@pxref{Hooks}). When you save the file, this |
| 903 | the time stamp, inserting the current date and time when you save the | 858 | function then automatically updates the time stamp with the current |
| 904 | file. You can also use the command @kbd{M-x time-stamp} to update the | 859 | date and time. You can also use the command @kbd{M-x time-stamp} to |
| 905 | time stamp manually. For other customizations, see the Custom group | 860 | update the time stamp manually. For other customizations, see the |
| 906 | @code{time-stamp}. Note that non-numeric fields in the time stamp are | 861 | Custom group @code{time-stamp}. Note that the time stamp is formatted |
| 907 | formatted according to your locale setting (@pxref{Environment}). | 862 | according to your locale setting (@pxref{Environment}). |
| 908 | 863 | ||
| 909 | @node Reverting | 864 | @node Reverting |
| 910 | @section Reverting a Buffer | 865 | @section Reverting a Buffer |
| @@ -912,18 +867,21 @@ formatted according to your locale setting (@pxref{Environment}). | |||
| 912 | @cindex drastic changes | 867 | @cindex drastic changes |
| 913 | @cindex reread a file | 868 | @cindex reread a file |
| 914 | 869 | ||
| 915 | If you have made extensive changes to a file and then change your mind | 870 | If you have made extensive changes to a file-visiting buffer and |
| 916 | about them, you can get rid of them by reading in the previous version | 871 | then change your mind, you can @dfn{revert} the changes and go back to |
| 917 | of the file. To do this, use @kbd{M-x revert-buffer}, which operates on | 872 | the saved version of the file. To do this, type @kbd{M-x |
| 918 | the current buffer. Since reverting a buffer unintentionally could lose | 873 | revert-buffer}. Since reverting unintentionally could lose a lot of |
| 919 | a lot of work, you must confirm this command with @kbd{yes}. | 874 | work, Emacs asks for confirmation first. |
| 920 | 875 | ||
| 921 | @code{revert-buffer} tries to position point in such a way that, if | 876 | The @code{revert-buffer} command tries to position point in such a |
| 922 | the file was edited only slightly, you will be at approximately the | 877 | way that, if the file was edited only slightly, you will be at |
| 923 | same piece of text after reverting as before. However, if you have made | 878 | approximately the same part of the text as before. But if you have |
| 924 | drastic changes, point may wind up in a totally different piece of text. | 879 | made major changes, point may end up in a totally different location. |
| 925 | 880 | ||
| 926 | Reverting marks the buffer as ``not modified''. | 881 | Reverting marks the buffer as ``not modified''. It also clears the |
| 882 | buffer's undo history (@pxref{Undo}). Thus, the reversion cannot be | ||
| 883 | undone---if you change your mind yet again, you can't use the undo | ||
| 884 | commands to bring the reverted changes back. | ||
| 927 | 885 | ||
| 928 | Some kinds of buffers that are not associated with files, such as | 886 | Some kinds of buffers that are not associated with files, such as |
| 929 | Dired buffers, can also be reverted. For them, reverting means | 887 | Dired buffers, can also be reverted. For them, reverting means |
| @@ -950,15 +908,14 @@ discard your changes.) | |||
| 950 | @findex auto-revert-mode | 908 | @findex auto-revert-mode |
| 951 | @findex auto-revert-tail-mode | 909 | @findex auto-revert-tail-mode |
| 952 | @vindex auto-revert-interval | 910 | @vindex auto-revert-interval |
| 953 | 911 | You can also tell Emacs to revert buffers periodically. To do this | |
| 954 | In addition, you can tell Emacs to periodically revert a buffer by | 912 | for a specific buffer, enable the minor mode Auto-Revert mode by |
| 955 | typing @kbd{M-x auto-revert-mode}. This turns on Auto-Revert mode, a | 913 | typing @kbd{M-x auto-revert-mode}. This automatically reverts the |
| 956 | minor mode that makes Emacs automatically revert the current buffer | 914 | current buffer every five seconds; you can change the interval through |
| 957 | every five seconds. You can change this interval through the variable | 915 | the variable @code{auto-revert-interval}. To do the same for all file |
| 958 | @code{auto-revert-interval}. Typing @kbd{M-x global-auto-revert-mode} | 916 | buffers, type @kbd{M-x global-auto-revert-mode} to enable Global |
| 959 | enables Global Auto-Revert mode, which does the same for all file | 917 | Auto-Revert mode. These minor modes do not check or revert remote |
| 960 | buffers. Auto-Revert mode and Global Auto-Revert modes do not check | 918 | files, because that is usually too slow. |
| 961 | or revert remote files, because that is usually too slow. | ||
| 962 | 919 | ||
| 963 | One use of Auto-Revert mode is to ``tail'' a file such as a system | 920 | One use of Auto-Revert mode is to ``tail'' a file such as a system |
| 964 | log, so that changes made to that file by other programs are | 921 | log, so that changes made to that file by other programs are |
| @@ -969,8 +926,9 @@ the end, use Auto-Revert Tail mode instead | |||
| 969 | (@code{auto-revert-tail-mode}). It is more efficient for this. | 926 | (@code{auto-revert-tail-mode}). It is more efficient for this. |
| 970 | Auto-Revert Tail mode works also for remote files. | 927 | Auto-Revert Tail mode works also for remote files. |
| 971 | 928 | ||
| 972 | @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that | 929 | @xref{VC Undo}, for commands to revert to earlier versions of files |
| 973 | visit files under version control. | 930 | under version control. @xref{VC Mode Line}, for Auto Revert |
| 931 | peculiarities when visiting files under version control. | ||
| 974 | 932 | ||
| 975 | @ifnottex | 933 | @ifnottex |
| 976 | @include arevert-xtra.texi | 934 | @include arevert-xtra.texi |
| @@ -1061,40 +1019,41 @@ any auto-save file to go with the new visited name. | |||
| 1061 | @vindex auto-save-default | 1019 | @vindex auto-save-default |
| 1062 | @findex auto-save-mode | 1020 | @findex auto-save-mode |
| 1063 | Each time you visit a file, auto-saving is turned on for that file's | 1021 | Each time you visit a file, auto-saving is turned on for that file's |
| 1064 | buffer if the variable @code{auto-save-default} is non-@code{nil} (but not | 1022 | buffer if the variable @code{auto-save-default} is non-@code{nil} (but |
| 1065 | in batch mode; @pxref{Entering Emacs}). The default for this variable is | 1023 | not in batch mode; @pxref{Initial Options}). The default for this |
| 1066 | @code{t}, so auto-saving is the usual practice for file-visiting buffers. | 1024 | variable is @code{t}, so auto-saving is the usual practice for |
| 1067 | Auto-saving can be turned on or off for any existing buffer with the | 1025 | file-visiting buffers. To toggle auto-saving in the current buffer, |
| 1068 | command @kbd{M-x auto-save-mode}. Like other minor mode commands, @kbd{M-x | 1026 | type @kbd{M-x auto-save-mode}. Auto Save mode acts as a buffer-local |
| 1069 | auto-save-mode} turns auto-saving on with a positive argument, off with a | 1027 | minor mode (@pxref{Minor Modes}). |
| 1070 | zero or negative argument; with no argument, it toggles. | ||
| 1071 | 1028 | ||
| 1072 | @vindex auto-save-interval | 1029 | @vindex auto-save-interval |
| 1073 | Emacs does auto-saving periodically based on counting how many characters | 1030 | Emacs auto-saves periodically based on how many characters you have |
| 1074 | you have typed since the last time auto-saving was done. The variable | 1031 | typed since the last auto-save. The variable |
| 1075 | @code{auto-save-interval} specifies how many characters there are between | 1032 | @code{auto-save-interval} specifies how many characters there are |
| 1076 | auto-saves. By default, it is 300. Emacs doesn't accept values that are | 1033 | between auto-saves. By default, it is 300. Emacs doesn't accept |
| 1077 | too small: if you customize @code{auto-save-interval} to a value less | 1034 | values that are too small: if you customize @code{auto-save-interval} |
| 1078 | than 20, Emacs will behave as if the value is 20. | 1035 | to a value less than 20, Emacs will behave as if the value is 20. |
| 1079 | 1036 | ||
| 1080 | @vindex auto-save-timeout | 1037 | @vindex auto-save-timeout |
| 1081 | Auto-saving also takes place when you stop typing for a while. The | 1038 | Auto-saving also takes place when you stop typing for a while. By |
| 1082 | variable @code{auto-save-timeout} says how many seconds Emacs should | 1039 | default, it does this after 30 seconds of idleness (at this time, |
| 1083 | wait before it does an auto save (and perhaps also a garbage | 1040 | Emacs may also perform garbage collection; @pxref{Garbage |
| 1084 | collection). (The actual time period is longer if the current buffer is | 1041 | Collection,,, elisp, The Emacs Lisp Reference Manual}). To change |
| 1085 | long; this is a heuristic which aims to keep out of your way when you | 1042 | this interval, customize the variable @code{auto-save-timeout}. The |
| 1086 | are editing long buffers, in which auto-save takes an appreciable amount | 1043 | actual time period is longer if the current buffer is long; this is a |
| 1087 | of time.) Auto-saving during idle periods accomplishes two things: | 1044 | heuristic which aims to keep out of your way when you are editing long |
| 1088 | first, it makes sure all your work is saved if you go away from the | 1045 | buffers, in which auto-save takes an appreciable amount of time. |
| 1089 | terminal for a while; second, it may avoid some auto-saving while you | 1046 | Auto-saving during idle periods accomplishes two things: first, it |
| 1090 | are actually typing. | 1047 | makes sure all your work is saved if you go away from the terminal for |
| 1048 | a while; second, it may avoid some auto-saving while you are actually | ||
| 1049 | typing. | ||
| 1091 | 1050 | ||
| 1092 | Emacs also does auto-saving whenever it gets a fatal error. This | 1051 | Emacs also does auto-saving whenever it gets a fatal error. This |
| 1093 | includes killing the Emacs job with a shell command such as @samp{kill | 1052 | includes killing the Emacs job with a shell command such as @samp{kill |
| 1094 | %emacs}, or disconnecting a phone line or network connection. | 1053 | %emacs}, or disconnecting a phone line or network connection. |
| 1095 | 1054 | ||
| 1096 | @findex do-auto-save | 1055 | @findex do-auto-save |
| 1097 | You can request an auto-save explicitly with the command @kbd{M-x | 1056 | You can perform an auto-save explicitly with the command @kbd{M-x |
| 1098 | do-auto-save}. | 1057 | do-auto-save}. |
| 1099 | 1058 | ||
| 1100 | @node Recover | 1059 | @node Recover |
| @@ -1138,13 +1097,11 @@ this---saving them---updates the files themselves. | |||
| 1138 | 1097 | ||
| 1139 | @vindex auto-save-list-file-prefix | 1098 | @vindex auto-save-list-file-prefix |
| 1140 | Emacs records information about interrupted sessions for later | 1099 | Emacs records information about interrupted sessions for later |
| 1141 | recovery in files named | 1100 | recovery in files named @file{.saves-@var{pid}-@var{hostname}} in the |
| 1142 | @file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}. The | 1101 | directory @file{~/.emacs.d/auto-save-list/}. This directory is |
| 1143 | directory used, @file{~/.emacs.d/auto-save-list/}, is determined by | 1102 | determined by the variable @code{auto-save-list-file-prefix}. If you |
| 1144 | the variable @code{auto-save-list-file-prefix}. You can record | 1103 | set @code{auto-save-list-file-prefix} to @code{nil}, sessions are not |
| 1145 | sessions in a different place by customizing that variable. If you | 1104 | recorded for recovery. |
| 1146 | set @code{auto-save-list-file-prefix} to @code{nil} in your | ||
| 1147 | @file{.emacs} file, sessions are not recorded for recovery. | ||
| 1148 | 1105 | ||
| 1149 | @node File Aliases | 1106 | @node File Aliases |
| 1150 | @section File Name Aliases | 1107 | @section File Name Aliases |
| @@ -1292,8 +1249,8 @@ buffer named @samp{*diff*}. This works by running the @command{diff} | |||
| 1292 | program, using options taken from the variable @code{diff-switches}. | 1249 | program, using options taken from the variable @code{diff-switches}. |
| 1293 | The value of @code{diff-switches} should be a string; the default is | 1250 | The value of @code{diff-switches} should be a string; the default is |
| 1294 | @code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, | 1251 | @code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, |
| 1295 | Comparing and Merging Files}, for more information about | 1252 | Comparing and Merging Files}, for more information about the |
| 1296 | @command{diff} output formats. | 1253 | @command{diff} program. |
| 1297 | 1254 | ||
| 1298 | The output of the @code{diff} command is shown using a major mode | 1255 | The output of the @code{diff} command is shown using a major mode |
| 1299 | called Diff mode. @xref{Diff Mode}. | 1256 | called Diff mode. @xref{Diff Mode}. |
| @@ -1361,11 +1318,10 @@ merging files. | |||
| 1361 | @cindex patches, editing | 1318 | @cindex patches, editing |
| 1362 | 1319 | ||
| 1363 | Diff mode is a major mode used for the output of @kbd{M-x diff} and | 1320 | Diff mode is a major mode used for the output of @kbd{M-x diff} and |
| 1364 | other similar commands, as well as the output of the @command{diff} | 1321 | other similar commands. This kind of output is called a @dfn{patch}, |
| 1365 | program. This kind of output is called a @dfn{patch}, because it can | 1322 | because it can be passed to the @command{patch} command to |
| 1366 | be passed to the @command{patch} command to automatically apply the | 1323 | automatically apply the specified changes. To select Diff mode |
| 1367 | specified changes. To select Diff mode manually, type @kbd{M-x | 1324 | manually, type @kbd{M-x diff-mode}. |
| 1368 | diff-mode}. | ||
| 1369 | 1325 | ||
| 1370 | @cindex hunk, diff | 1326 | @cindex hunk, diff |
| 1371 | The changes specified in a patch are grouped into @dfn{hunks}, which | 1327 | The changes specified in a patch are grouped into @dfn{hunks}, which |
| @@ -1659,21 +1615,18 @@ Tar mode is used also for compressed archives---files with extensions | |||
| 1659 | The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file | 1615 | The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file |
| 1660 | into its own buffer. You can edit it there, and if you save the | 1616 | into its own buffer. You can edit it there, and if you save the |
| 1661 | buffer, the edited version will replace the version in the Tar buffer. | 1617 | buffer, the edited version will replace the version in the Tar buffer. |
| 1662 | @kbd{v} extracts a file into a buffer in View mode (@pxref{View | 1618 | Clicking with the mouse on the file name in the Tar buffer does |
| 1663 | Mode}). @kbd{o} extracts the file and displays it in another window, | 1619 | likewise. @kbd{v} extracts a file into a buffer in View mode |
| 1664 | so you could edit the file and operate on the archive simultaneously. | 1620 | (@pxref{View Mode}). @kbd{o} extracts the file and displays it in |
| 1665 | @kbd{d} marks a file for deletion when you later use @kbd{x}, and | 1621 | another window, so you could edit the file and operate on the archive |
| 1622 | simultaneously. | ||
| 1623 | |||
| 1624 | @kbd{d} marks a file for deletion when you later use @kbd{x}, and | ||
| 1666 | @kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the | 1625 | @kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the |
| 1667 | archive to disk and @kbd{R} renames a file within the archive. | 1626 | archive to disk and @kbd{R} renames a file within the archive. |
| 1668 | @kbd{g} reverts the buffer from the archive on disk. | 1627 | @kbd{g} reverts the buffer from the archive on disk. The keys |
| 1669 | 1628 | @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission bits, | |
| 1670 | The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission | 1629 | group, and owner, respectively. |
| 1671 | bits, group, and owner, respectively. | ||
| 1672 | |||
| 1673 | If your display supports colors and the mouse, moving the mouse | ||
| 1674 | pointer across a file name highlights that file name, indicating that | ||
| 1675 | you can click on it. Clicking @kbd{Mouse-2} on the highlighted file | ||
| 1676 | name extracts the file into a buffer and displays that buffer. | ||
| 1677 | 1630 | ||
| 1678 | Saving the Tar buffer writes a new version of the archive to disk with | 1631 | Saving the Tar buffer writes a new version of the archive to disk with |
| 1679 | the changes you made to the components. | 1632 | the changes you made to the components. |
| @@ -1690,19 +1643,20 @@ requires the appropriate uncompression program. | |||
| 1690 | @cindex @code{zip} | 1643 | @cindex @code{zip} |
| 1691 | @cindex @code{lzh} | 1644 | @cindex @code{lzh} |
| 1692 | @cindex @code{zoo} | 1645 | @cindex @code{zoo} |
| 1646 | @cindex @code{7z} | ||
| 1693 | @pindex arc | 1647 | @pindex arc |
| 1694 | @pindex jar | 1648 | @pindex jar |
| 1695 | @pindex zip | 1649 | @pindex zip |
| 1696 | @pindex rar | 1650 | @pindex rar |
| 1697 | @pindex lzh | 1651 | @pindex lzh |
| 1698 | @pindex zoo | 1652 | @pindex zoo |
| 1653 | @pindex 7z | ||
| 1699 | @cindex Java class archives | 1654 | @cindex Java class archives |
| 1700 | @cindex unzip archives | 1655 | @cindex unzip archives |
| 1701 | A separate but similar Archive mode is used for archives produced by | 1656 | A separate but similar Archive mode is used for @code{arc}, |
| 1702 | the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, | 1657 | @code{jar}, @code{lzh}, @code{zip}, @code{rar}, @code{7z}, and |
| 1703 | @code{rar}, and @code{zoo}, which have extensions corresponding to the | 1658 | @code{zoo} archives, as well as @code{exe} files that are |
| 1704 | program names. Archive mode also works for those @code{exe} files | 1659 | self-extracting executables. |
| 1705 | that are self-extracting executables. | ||
| 1706 | 1660 | ||
| 1707 | The key bindings of Archive mode are similar to those in Tar mode, | 1661 | The key bindings of Archive mode are similar to those in Tar mode, |
| 1708 | with the addition of the @kbd{m} key which marks a file for subsequent | 1662 | with the addition of the @kbd{m} key which marks a file for subsequent |
| @@ -1712,11 +1666,11 @@ information, for those archive types where it won't fit in a single | |||
| 1712 | line. Operations such as renaming a subfile, or changing its mode or | 1666 | line. Operations such as renaming a subfile, or changing its mode or |
| 1713 | owner, are supported only for some of the archive formats. | 1667 | owner, are supported only for some of the archive formats. |
| 1714 | 1668 | ||
| 1715 | Unlike Tar mode, Archive mode runs the archiving program to unpack | 1669 | Unlike Tar mode, Archive mode runs the archiving programs to unpack |
| 1716 | and repack archives. Details of the program names and their options | 1670 | and repack archives. However, you don't need these programs to look |
| 1717 | can be set in the @samp{Archive} Customize group. However, you don't | 1671 | at the archive table of contents, only to extract or manipulate the |
| 1718 | need these programs to look at the archive table of contents, only to | 1672 | subfiles in the archive. Details of the program names and their |
| 1719 | extract or manipulate the subfiles in the archive. | 1673 | options can be set in the @samp{Archive} Customize group. |
| 1720 | 1674 | ||
| 1721 | @node Remote Files | 1675 | @node Remote Files |
| 1722 | @section Remote Files | 1676 | @section Remote Files |
| @@ -1748,16 +1702,14 @@ Emacs chooses the method as follows: | |||
| 1748 | 1702 | ||
| 1749 | @enumerate | 1703 | @enumerate |
| 1750 | @item | 1704 | @item |
| 1751 | If the host name starts with @samp{ftp.} (with dot), then Emacs uses | 1705 | If the host name starts with @samp{ftp.} (with dot), Emacs uses FTP. |
| 1752 | FTP. | ||
| 1753 | @item | 1706 | @item |
| 1754 | If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses | 1707 | If the user name is @samp{ftp} or @samp{anonymous}, Emacs uses FTP. |
| 1755 | FTP. | ||
| 1756 | @item | 1708 | @item |
| 1757 | If the variable @code{tramp-default-method} is set to @samp{ftp}, | 1709 | If the variable @code{tramp-default-method} is set to @samp{ftp}, |
| 1758 | then Emacs uses FTP. | 1710 | Emacs uses FTP. |
| 1759 | @item | 1711 | @item |
| 1760 | If @command{ssh-agent} is running, then Emacs uses @command{scp}. | 1712 | If @command{ssh-agent} is running, Emacs uses @command{scp}. |
| 1761 | @item | 1713 | @item |
| 1762 | Otherwise, Emacs uses @command{ssh}. | 1714 | Otherwise, Emacs uses @command{ssh}. |
| 1763 | @end enumerate | 1715 | @end enumerate |
| @@ -1769,32 +1721,31 @@ variable @code{tramp-mode} to @code{nil}. You can turn off the | |||
| 1769 | feature in individual cases by quoting the file name with @samp{/:} | 1721 | feature in individual cases by quoting the file name with @samp{/:} |
| 1770 | (@pxref{Quoted File Names}). | 1722 | (@pxref{Quoted File Names}). |
| 1771 | 1723 | ||
| 1724 | @cindex ange-ftp | ||
| 1772 | Remote file access through FTP is handled by the Ange-FTP package, which | 1725 | Remote file access through FTP is handled by the Ange-FTP package, which |
| 1773 | is documented in the following. Remote file access through the other | 1726 | is documented in the following. Remote file access through the other |
| 1774 | methods is handled by the Tramp package, which has its own manual. | 1727 | methods is handled by the Tramp package, which has its own manual. |
| 1775 | @xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. | 1728 | @xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. |
| 1776 | 1729 | ||
| 1777 | When the Ange-FTP package is used, Emacs logs in through FTP using | 1730 | @vindex ange-ftp-default-user |
| 1778 | your user name or the name @var{user}. It may ask you for a password | 1731 | @cindex user name for remote file access |
| 1779 | from time to time (@pxref{Passwords}); this is used for logging in on | 1732 | When the Ange-FTP package is used, Emacs logs in through FTP using |
| 1780 | @var{host}. The form using @var{port} allows you to access servers | 1733 | the name @var{user}, if that is specified in the remote file name. If |
| 1781 | running on a non-default TCP port. | 1734 | @var{user} is unspecified, Emacs logs in using your user name on the |
| 1735 | local system; but if you set the variable @code{ange-ftp-default-user} | ||
| 1736 | to a string, that string is used instead. When logging in, Emacs may | ||
| 1737 | also ask for a password. | ||
| 1782 | 1738 | ||
| 1783 | @cindex backups for remote files | 1739 | @cindex backups for remote files |
| 1784 | @vindex ange-ftp-make-backup-files | 1740 | @vindex ange-ftp-make-backup-files |
| 1785 | If you want to disable backups for remote files, set the variable | 1741 | For performance reasons, Emacs does not make backup files for files |
| 1786 | @code{ange-ftp-make-backup-files} to @code{nil}. | 1742 | accessed via FTP by default. To make it do so, change the variable |
| 1743 | @code{ange-ftp-make-backup-files} to a non-@code{nil} value. | ||
| 1787 | 1744 | ||
| 1788 | By default, the auto-save files (@pxref{Auto Save Files}) for remote | 1745 | By default, auto-save files for remote files are made in the |
| 1789 | files are made in the temporary file directory on the local machine. | 1746 | temporary file directory on the local machine, as specified by the |
| 1790 | This is achieved using the variable @code{auto-save-file-name-transforms}. | 1747 | variable @code{auto-save-file-name-transforms}. @xref{Auto Save |
| 1791 | 1748 | Files}. | |
| 1792 | @cindex ange-ftp | ||
| 1793 | @vindex ange-ftp-default-user | ||
| 1794 | @cindex user name for remote file access | ||
| 1795 | Normally, if you do not specify a user name in a remote file name, | ||
| 1796 | that means to use your own user name. But if you set the variable | ||
| 1797 | @code{ange-ftp-default-user} to a string, that string is used instead. | ||
| 1798 | 1749 | ||
| 1799 | @cindex anonymous FTP | 1750 | @cindex anonymous FTP |
| 1800 | @vindex ange-ftp-generate-anonymous-password | 1751 | @vindex ange-ftp-generate-anonymous-password |
| @@ -1950,10 +1901,10 @@ images as thumbnails. | |||
| 1950 | @findex filesets-init | 1901 | @findex filesets-init |
| 1951 | If you regularly edit a certain group of files, you can define them | 1902 | If you regularly edit a certain group of files, you can define them |
| 1952 | as a @dfn{fileset}. This lets you perform certain operations, such as | 1903 | as a @dfn{fileset}. This lets you perform certain operations, such as |
| 1953 | visiting, @code{query-replace}, and shell commands on all the files | 1904 | visiting, @code{query-replace}, and shell commands on all the files at |
| 1954 | at once. To make use of filesets, you must first add the expression | 1905 | once. To make use of filesets, you must first add the expression |
| 1955 | @code{(filesets-init)} to your @file{.emacs} file (@pxref{Init File}). | 1906 | @code{(filesets-init)} to your init file (@pxref{Init File}). This |
| 1956 | This adds a @samp{Filesets} menu to the menu bar. | 1907 | adds a @samp{Filesets} menu to the menu bar. |
| 1957 | 1908 | ||
| 1958 | @findex filesets-add-buffer | 1909 | @findex filesets-add-buffer |
| 1959 | @findex filesets-remove-buffer | 1910 | @findex filesets-remove-buffer |
| @@ -1980,7 +1931,7 @@ files in a fileset, and @kbd{M-x filesets-close} to close them. Use | |||
| 1980 | a fileset. These commands are also available from the @samp{Filesets} | 1931 | a fileset. These commands are also available from the @samp{Filesets} |
| 1981 | menu, where each existing fileset is represented by a submenu. | 1932 | menu, where each existing fileset is represented by a submenu. |
| 1982 | 1933 | ||
| 1983 | Emacs uses the concept of a fileset elsewhere @pxref{Version | 1934 | @xref{Version Control}, for a different concept of ``filesets'': |
| 1984 | Control} to describe sets of files to be treated as a group for | 1935 | groups of files bundled together for version control operations. |
| 1985 | purposes of version control operations. Those filesets are unnamed | 1936 | Filesets of that type are unnamed, and do not persist across Emacs |
| 1986 | and do not persist across Emacs sessions. | 1937 | sessions. |
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index 7a605100796..bae78d94744 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi | |||
| @@ -7,17 +7,14 @@ | |||
| 7 | @cindex typos, fixing | 7 | @cindex typos, fixing |
| 8 | @cindex mistakes, correcting | 8 | @cindex mistakes, correcting |
| 9 | 9 | ||
| 10 | In this chapter we describe the commands that are especially useful | 10 | In this chapter we describe commands that are useful when you catch |
| 11 | when you catch a mistake in your text after you have made it, or | 11 | a mistake while editing. The most fundamental command for correcting |
| 12 | change your mind while composing text on the fly. | 12 | erroneous editing is the undo command @kbd{C-/} (which is also bound |
| 13 | 13 | to @kbd{C-x u} and @kbd{C-_}). This undoes a single command, or a | |
| 14 | The most fundamental command for correcting erroneous editing is the | 14 | part of a command (as in the case of @code{query-replace}), or several |
| 15 | undo command @kbd{C-/} (which is also bound to @kbd{C-x u} and | 15 | consecutive character insertions. Consecutive repetitions of |
| 16 | @kbd{C-_}). This undoes a single command, or a part of a command (as | 16 | @kbd{C-/} undo earlier and earlier changes, back to the limit of the |
| 17 | in the case of @code{query-replace}), or several consecutive | 17 | undo information available. |
| 18 | self-inserting characters. Consecutive repetitions of @kbd{C-/} undo | ||
| 19 | earlier and earlier changes, back to the limit of the undo information | ||
| 20 | available. | ||
| 21 | 18 | ||
| 22 | Aside from the commands described here, you can erase text using | 19 | Aside from the commands described here, you can erase text using |
| 23 | deletion commands such as @key{DEL} (@code{delete-backward-char}). | 20 | deletion commands such as @key{DEL} (@code{delete-backward-char}). |
| @@ -231,18 +228,19 @@ case-convert it and go on typing. @xref{Case}.@refill | |||
| 231 | This section describes the commands to check the spelling of a | 228 | This section describes the commands to check the spelling of a |
| 232 | single word or of a portion of a buffer. These commands only work if | 229 | single word or of a portion of a buffer. These commands only work if |
| 233 | the spelling checker program Aspell, Ispell or Hunspell is installed. | 230 | the spelling checker program Aspell, Ispell or Hunspell is installed. |
| 234 | Aspell, Ispell or Hunspell are not part of Emacs, but one or the other | 231 | These programs are not part of Emacs, but one of them is usually |
| 235 | is usually installed in GNU/Linux and other free operating systems. | 232 | installed in GNU/Linux and other free operating systems. |
| 236 | @ifnottex | 233 | @ifnottex |
| 237 | @xref{Top, Aspell,, aspell, The Aspell Manual}. | 234 | @xref{Top, Aspell,, aspell, The Aspell Manual}. |
| 238 | @end ifnottex | 235 | @end ifnottex |
| 239 | 236 | ||
| 240 | @table @kbd | 237 | @table @kbd |
| 241 | @item M-$ | 238 | @item M-$ |
| 242 | Check and correct spelling of the active region or the word at point | 239 | Check and correct spelling of the word at point (@code{ispell-word}). |
| 243 | (@code{ispell-word}). | 240 | If the region is active, do it for all words in the region instead. |
| 244 | @item M-x ispell | 241 | @item M-x ispell |
| 245 | Check and correct spelling in the active region or the entire buffer. | 242 | Check and correct spelling of all words in the buffer. If the region |
| 243 | is active, do it for all words in the region instead. | ||
| 246 | @item M-x ispell-buffer | 244 | @item M-x ispell-buffer |
| 247 | Check and correct spelling in the buffer. | 245 | Check and correct spelling in the buffer. |
| 248 | @item M-x ispell-region | 246 | @item M-x ispell-region |
| @@ -355,14 +353,13 @@ Show the list of options. | |||
| 355 | @end table | 353 | @end table |
| 356 | 354 | ||
| 357 | @findex ispell-complete-word | 355 | @findex ispell-complete-word |
| 358 | In Text mode and related modes, the command @kbd{M-@key{TAB}} | 356 | In Text mode and related modes, @kbd{M-@key{TAB}} |
| 359 | (@code{ispell-complete-word}) shows a list of completions based on | 357 | (@code{ispell-complete-word}) performs in-buffer completion based on |
| 360 | spelling correction. Insert the beginning of a word, and then type | 358 | spelling correction. Insert the beginning of a word, and then type |
| 361 | @kbd{M-@key{TAB}}; the command displays a completion list window. (If | 359 | @kbd{M-@key{TAB}}; this shows shows a list of completions. (If your |
| 362 | your window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC} | 360 | window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC} |
| 363 | @key{TAB}} or @kbd{C-M-i}.) To choose one of the completions listed, | 361 | @key{TAB}} or @kbd{C-M-i}.) Each completion is listed with a digit or |
| 364 | click @kbd{Mouse-2} or @kbd{Mouse-1} fast on it, or move the cursor | 362 | character; type that digit or character to choose it. |
| 365 | there in the completions window and type @key{RET}. @xref{Text Mode}. | ||
| 366 | 363 | ||
| 367 | @cindex @code{ispell} program | 364 | @cindex @code{ispell} program |
| 368 | @findex ispell-kill-ispell | 365 | @findex ispell-kill-ispell |
| @@ -370,29 +367,27 @@ there in the completions window and type @key{RET}. @xref{Text Mode}. | |||
| 370 | to run, waiting for something to do, so that subsequent spell checking | 367 | to run, waiting for something to do, so that subsequent spell checking |
| 371 | commands complete more quickly. If you want to get rid of the | 368 | commands complete more quickly. If you want to get rid of the |
| 372 | process, use @kbd{M-x ispell-kill-ispell}. This is not usually | 369 | process, use @kbd{M-x ispell-kill-ispell}. This is not usually |
| 373 | necessary, since the process uses no time except when you do spelling | 370 | necessary, since the process uses no processor time except when you do |
| 374 | correction. | 371 | spelling correction. |
| 375 | 372 | ||
| 376 | @vindex ispell-dictionary | 373 | @vindex ispell-dictionary |
| 377 | @vindex ispell-local-dictionary | 374 | @vindex ispell-local-dictionary |
| 378 | @vindex ispell-personal-dictionary | 375 | @vindex ispell-personal-dictionary |
| 379 | @vindex ispell-complete-word-dict | 376 | @findex ispell-change-dictionary |
| 380 | Ispell, Aspell and Hunspell use two dictionaries together for spell checking: | 377 | Ispell, Aspell and Hunspell look up spelling in two dictionaries: |
| 381 | the standard dictionary and your private dictionary. The standard | 378 | the standard dictionary and your personal dictionary. The standard |
| 382 | dictionary is specified by @code{ispell-local-dictionary} or, | 379 | dictionary is specified by the variable @code{ispell-local-dictionary} |
| 383 | if @code{nil}, by @code{ispell-dictionary}. If both are @code{nil} | 380 | or, if that is @code{nil}, by the variable @code{ispell-dictionary}. |
| 384 | the default dictionary is selected. The command | 381 | If both are @code{nil}, the spelling program's default dictionary is |
| 385 | @kbd{M-x ispell-change-dictionary} sets the standard dictionary for | 382 | used. The command @kbd{M-x ispell-change-dictionary} sets the |
| 386 | the buffer and then restarts the subprocess, so that it will use a | 383 | standard dictionary for the buffer and then restarts the subprocess, |
| 387 | different standard dictionary. Personal dictionary is specified by | 384 | so that it will use a different standard dictionary. Your personal |
| 388 | @code{ispell-personal-dictionary}. If @code{nil}, default value is | 385 | dictionary is specified by the variable |
| 389 | used. | 386 | @code{ispell-personal-dictionary}. If that is @code{nil}, the |
| 390 | 387 | spelling program looks for a personal dictionary in a default | |
| 391 | Set variable @code{ispell-dictionary} to select a specific default | 388 | location. |
| 392 | dictionary for all your documents. Set variable | ||
| 393 | @code{ispell-local-dictionary} in the local variables section to | ||
| 394 | select a specific dictionary for a given document. | ||
| 395 | 389 | ||
| 390 | @vindex ispell-complete-word-dict | ||
| 396 | A separate dictionary is used for word completion. The variable | 391 | A separate dictionary is used for word completion. The variable |
| 397 | @code{ispell-complete-word-dict} specifies the file name of this | 392 | @code{ispell-complete-word-dict} specifies the file name of this |
| 398 | dictionary. The completion dictionary must be different because it | 393 | dictionary. The completion dictionary must be different because it |
| @@ -400,16 +395,14 @@ cannot use root and affix information. For some languages, there | |||
| 400 | is a spell checking dictionary but no word completion dictionary. | 395 | is a spell checking dictionary but no word completion dictionary. |
| 401 | 396 | ||
| 402 | @cindex Flyspell mode | 397 | @cindex Flyspell mode |
| 398 | @cindex mode, Flyspell | ||
| 403 | @findex flyspell-mode | 399 | @findex flyspell-mode |
| 404 | @findex turn-on-flyspell | 400 | Flyspell mode is a minor mode that performs automatic spell checking |
| 405 | Flyspell mode is a fully-automatic way to check spelling as you edit | 401 | as you type. When it finds a word that it does not recognize, it |
| 406 | in Emacs. It operates by checking words as you change or insert them. | 402 | highlights that word. Type @kbd{M-x flyspell-mode} to toggle Flyspell |
| 407 | When it finds a word that it does not recognize, it highlights that | 403 | mode in the current buffer. To enable Flyspell mode in all text mode |
| 408 | word. This does not interfere with your editing, but when you see the | 404 | buffers, add @code{flyspell-mode} to @code{text-mode-hook}. |
| 409 | highlighted word, you can move to it and fix it. Type @kbd{M-x | 405 | @xref{Hooks}. |
| 410 | flyspell-mode} to enable or disable this mode in the current buffer. | ||
| 411 | To enable Flyspell mode in all text mode buffers, add | ||
| 412 | @code{turn-on-flyspell} to @code{text-mode-hook}. | ||
| 413 | 406 | ||
| 414 | When Flyspell mode highlights a word as misspelled, you can click on | 407 | When Flyspell mode highlights a word as misspelled, you can click on |
| 415 | it with @kbd{Mouse-2} to display a menu of possible corrections and | 408 | it with @kbd{Mouse-2} to display a menu of possible corrections and |
diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi index ee417624120..e5853a17dd0 100644 --- a/doc/emacs/fortran-xtra.texi +++ b/doc/emacs/fortran-xtra.texi | |||
| @@ -479,7 +479,7 @@ variable @code{fortran-break-before-delimiters} is @code{nil}. | |||
| 479 | Otherwise (and by default), the break comes before the delimiter. | 479 | Otherwise (and by default), the break comes before the delimiter. |
| 480 | 480 | ||
| 481 | To enable Auto Fill in all Fortran buffers, add | 481 | To enable Auto Fill in all Fortran buffers, add |
| 482 | @code{turn-on-auto-fill} to @code{fortran-mode-hook}. | 482 | @code{auto-fill-mode} to @code{fortran-mode-hook}. |
| 483 | @iftex | 483 | @iftex |
| 484 | @xref{Hooks,,, emacs, the Emacs Manual}. | 484 | @xref{Hooks,,, emacs, the Emacs Manual}. |
| 485 | @end iftex | 485 | @end iftex |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 4c239d364f0..49222451cce 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -956,55 +956,43 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}. | |||
| 956 | @cindex Scroll Bar mode | 956 | @cindex Scroll Bar mode |
| 957 | @cindex mode, Scroll Bar | 957 | @cindex mode, Scroll Bar |
| 958 | 958 | ||
| 959 | On graphical displays, Emacs normally makes a @dfn{scroll bar} at | 959 | On graphical displays, there is a @dfn{scroll bar} on the side of |
| 960 | the left of each Emacs window, running the height of the | 960 | each Emacs window. Clicking @kbd{Mouse-1} on the scroll bar's up and |
| 961 | window.@footnote{Placing it at the left is usually more useful with | 961 | down buttons scrolls the window by one line at a time. Clicking |
| 962 | overlapping frames with text starting at the left margin.} | 962 | @kbd{Mouse-1} above or below the scroll bar's inner box scrolls the |
| 963 | 963 | window by nearly the entire height of the window, like @kbd{M-v} and | |
| 964 | When Emacs is compiled with GTK+ support on the X Window System, or | 964 | @kbd{C-v} respectively (@pxref{Moving Point}). Dragging the inner box |
| 965 | in operating systems such as Microsoft Windows or Mac OS, you can use | 965 | scrolls continuously. |
| 966 | the scroll bar as you do in other graphical applications. If you | 966 | |
| 967 | click @kbd{Mouse-1} on the scroll bar's up and down buttons, that | 967 | If Emacs is compiled on the X Window System without X toolkit |
| 968 | scrolls the window by one line at a time. Clicking @kbd{Mouse-1} | 968 | support, the scroll bar behaves differently. Clicking @kbd{Mouse-1} |
| 969 | above or below the scroll bar's inner box scrolls the window by nearly | 969 | anywhere on the scroll bar scrolls forward like @kbd{C-v}, while |
| 970 | the entire height of the window, like @kbd{M-v} and @kbd{C-v} | 970 | @kbd{Mouse-3} scrolls backward like @kbd{M-v}. Clicking @kbd{Mouse-2} |
| 971 | respectively (@pxref{Moving Point}). Dragging the inner box with | 971 | in the scroll bar lets you drag the inner box up and down. |
| 972 | @kbd{Mouse-1} scrolls the window continuously. | ||
| 973 | |||
| 974 | If Emacs is compiled without GTK+ support on the X Window System, | ||
| 975 | the scroll bar behaves differently. The scroll bar's inner box is | ||
| 976 | drawn to represent the portion of the buffer currently displayed, with | ||
| 977 | the entire height of the scroll bar representing the entire length of | ||
| 978 | the buffer. @kbd{Mouse-1} anywhere on the scroll bar scrolls forward | ||
| 979 | like @kbd{C-v}, and @kbd{Mouse-3} scrolls backward like @kbd{M-v}. | ||
| 980 | Clicking @kbd{Mouse-2} in the scroll bar lets you move or drag the | ||
| 981 | inner box up and down. | ||
| 982 | |||
| 983 | You can also click @kbd{C-Mouse-2} in the scroll bar to split a | ||
| 984 | window vertically. The split occurs on the line where you click. | ||
| 985 | 972 | ||
| 986 | @findex scroll-bar-mode | 973 | @findex scroll-bar-mode |
| 987 | @vindex scroll-bar-mode | ||
| 988 | You can toggle the use of the scroll bar with the command @kbd{M-x | ||
| 989 | scroll-bar-mode}. With a prefix argument, this command turns use of | ||
| 990 | scroll bars on if and only if the argument is positive. This command | ||
| 991 | applies to all frames, including frames yet to be created. Customize | ||
| 992 | the variable @code{scroll-bar-mode} to control the use of scroll bars | ||
| 993 | at startup. You can use it to specify that they are placed at the | ||
| 994 | right of windows if you prefer that. You have to set this variable | ||
| 995 | through the @samp{Customize} interface (@pxref{Easy Customization}), | ||
| 996 | or it will not work properly. You can also use the X resource | ||
| 997 | @samp{verticalScrollBars} to control the initial setting of Scroll Bar | ||
| 998 | mode. @xref{Resources}. | ||
| 999 | |||
| 1000 | @findex toggle-scroll-bar | 974 | @findex toggle-scroll-bar |
| 1001 | To enable or disable scroll bars for just the selected frame, use the | 975 | To toggle the use of scroll bars, type @kbd{M-x scroll-bar-mode}. |
| 976 | This command applies to all frames, including frames yet to be | ||
| 977 | created. To toggle scroll bars for just the selected frame, use the | ||
| 1002 | command @kbd{M-x toggle-scroll-bar}. | 978 | command @kbd{M-x toggle-scroll-bar}. |
| 1003 | 979 | ||
| 980 | @vindex scroll-bar-mode | ||
| 981 | To control the use of scroll bars at startup, customize the variable | ||
| 982 | @code{scroll-bar-mode}. Its value should be either @code{right} (put | ||
| 983 | scroll bars on the right side of windows), @code{left} (put them on | ||
| 984 | the left), or @code{nil} (disable scroll bars). By default, Emacs | ||
| 985 | puts scroll bars on the right if it was compiled with GTK+ support on | ||
| 986 | the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll | ||
| 987 | bars on the left if compiled on the X Window system without GTK+ | ||
| 988 | support (following the old convention for X applications). | ||
| 989 | |||
| 1004 | @vindex scroll-bar-width | 990 | @vindex scroll-bar-width |
| 1005 | @cindex width of the scroll bar | 991 | @cindex width of the scroll bar |
| 1006 | You can control the scroll bar width by changing the value of the | 992 | You can also use the X resource @samp{verticalScrollBars} to enable |
| 1007 | @code{scroll-bar-width} frame parameter. | 993 | or disable the scroll bars (@pxref{Resources}). To control the scroll |
| 994 | bar width, change the @code{scroll-bar-width} frame parameter | ||
| 995 | (@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}). | ||
| 1008 | 996 | ||
| 1009 | @node Wheeled Mice | 997 | @node Wheeled Mice |
| 1010 | @section Scrolling With ``Wheeled'' Mice | 998 | @section Scrolling With ``Wheeled'' Mice |
| @@ -1082,36 +1070,33 @@ menus' visual appearance. | |||
| 1082 | @cindex mode, Tool Bar | 1070 | @cindex mode, Tool Bar |
| 1083 | @cindex icons, toolbar | 1071 | @cindex icons, toolbar |
| 1084 | 1072 | ||
| 1085 | The @dfn{tool bar} is a line (or lines) of icons at the top of the | 1073 | On graphical displays, Emacs puts a @dfn{tool bar} at the top of |
| 1086 | Emacs window, just below the menu bar. You can click on these icons | 1074 | each frame, just below the menu bar. This is a row of icons which you |
| 1087 | with the mouse to do various jobs. | 1075 | can click on with the mouse to invoke various commands. |
| 1088 | |||
| 1089 | The global tool bar contains general commands. Some major modes | ||
| 1090 | define their own tool bars to replace it. A few ``special'' modes | ||
| 1091 | that are not designed for ordinary editing remove some items from the | ||
| 1092 | global tool bar. | ||
| 1093 | 1076 | ||
| 1094 | Tool bars work only on a graphical display. The tool bar uses colored | 1077 | The global (default) tool bar contains general commands. Some major |
| 1095 | XPM icons if Emacs was built with XPM support. Otherwise, the tool | 1078 | modes define their own tool bars; whenever a buffer with such a major |
| 1096 | bar uses monochrome icons (PBM or XBM format). | 1079 | mode is current, the mode's tool bar replaces the global tool bar. |
| 1097 | 1080 | ||
| 1098 | @findex tool-bar-mode | 1081 | @findex tool-bar-mode |
| 1099 | @vindex tool-bar-mode | 1082 | @vindex tool-bar-mode |
| 1100 | You can turn display of tool bars on or off with @kbd{M-x | 1083 | To toggle the use of tool bars, type @kbd{M-x tool-bar-mode}. This |
| 1101 | tool-bar-mode} or by customizing the option @code{tool-bar-mode}. | 1084 | command applies to all frames, including frames yet to be created. To |
| 1085 | control the use of tool bars at startup, customize the variable | ||
| 1086 | @code{tool-bar-mode}. | ||
| 1102 | 1087 | ||
| 1103 | @vindex tool-bar-style | 1088 | @vindex tool-bar-style |
| 1104 | @cindex Tool Bar style | 1089 | @cindex Tool Bar style |
| 1105 | When Emacs is compiled with GTK+ support, tool bars can have text and images. | 1090 | When Emacs is compiled with GTK+ support, each tool bar item can |
| 1106 | Customize @code{tool-bar-style} to select style. The default style is | 1091 | consist of an image, or a text label, or both. By default, Emacs |
| 1107 | the same as for the desktop in the Gnome case. If no default is found, | 1092 | follows the Gnome desktop's tool bar style setting; if none is |
| 1108 | the tool bar uses just images. | 1093 | defined, it displays tool bar items as just images. To impose a |
| 1094 | specific tool bar style, customize the variable @code{tool-bar-style}. | ||
| 1109 | 1095 | ||
| 1110 | @cindex Tool Bar position | 1096 | @cindex Tool Bar position |
| 1111 | You can also control the placement of the tool bar for the GTK+ tool bar | 1097 | You can also control the placement of the tool bar for the GTK+ tool |
| 1112 | with the frame parameter @code{tool-bar-position}. | 1098 | bar with the frame parameter @code{tool-bar-position}. @xref{Frame |
| 1113 | For a detailed description of frame parameters and customization, | 1099 | Parameters,,, elisp, The Emacs Lisp Reference Manual}. |
| 1114 | see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}. | ||
| 1115 | 1100 | ||
| 1116 | @node Dialog Boxes | 1101 | @node Dialog Boxes |
| 1117 | @section Using Dialog Boxes | 1102 | @section Using Dialog Boxes |
| @@ -1186,11 +1171,11 @@ options for displaying tooltips, use @kbd{M-x customize-group | |||
| 1186 | customizing the windows that display tooltips. | 1171 | customizing the windows that display tooltips. |
| 1187 | 1172 | ||
| 1188 | @vindex x-gtk-use-system-tooltips | 1173 | @vindex x-gtk-use-system-tooltips |
| 1189 | If Emacs is built with GTK support, it displays tooltips via GTK, | 1174 | If Emacs is built with GTK+ support, it displays tooltips via GTK+, |
| 1190 | using the default appearance of GTK tooltips. To disable this, change | 1175 | using the default appearance of GTK+ tooltips. To disable this, |
| 1191 | the variable @code{x-gtk-use-system-tooltips} to @code{nil}. If you | 1176 | change the variable @code{x-gtk-use-system-tooltips} to @code{nil}. |
| 1192 | do this, or if Emacs is built without GTK support, the @code{tooltip} | 1177 | If you do this, or if Emacs is built without GTK+ support, the |
| 1193 | face specifies most attributes of the tooltip text. | 1178 | @code{tooltip} face specifies most attributes of the tooltip text. |
| 1194 | 1179 | ||
| 1195 | @node Mouse Avoidance | 1180 | @node Mouse Avoidance |
| 1196 | @section Mouse Avoidance | 1181 | @section Mouse Avoidance |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index a85edf101e5..c024d428511 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -70,7 +70,7 @@ meanings for it, but they all support @key{F1} for help.) | |||
| 70 | * Package Keywords:: Finding Lisp libraries by keywords (topics). | 70 | * Package Keywords:: Finding Lisp libraries by keywords (topics). |
| 71 | * Language Help:: Help relating to international language support. | 71 | * Language Help:: Help relating to international language support. |
| 72 | * Misc Help:: Other help commands. | 72 | * Misc Help:: Other help commands. |
| 73 | * Help Files:: Commands to display auxilliary help files. | 73 | * Help Files:: Commands to display auxiliary help files. |
| 74 | * Help Echo:: Help on active text and tooltips (`balloon help'). | 74 | * Help Echo:: Help on active text and tooltips (`balloon help'). |
| 75 | @end menu | 75 | @end menu |
| 76 | 76 | ||
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 8689e9c8324..6237b00c2ee 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi | |||
| @@ -736,7 +736,7 @@ insert rectangles, and commands to make blank rectangles. | |||
| 736 | k} (@code{kill-rectangle}) to remove the text and and save it as the | 736 | k} (@code{kill-rectangle}) to remove the text and and save it as the |
| 737 | @dfn{last killed rectangle}. In both cases, erasing the | 737 | @dfn{last killed rectangle}. In both cases, erasing the |
| 738 | region-rectangle is like erasing the specified text on each line of | 738 | region-rectangle is like erasing the specified text on each line of |
| 739 | the rectange; if there is any following text on the line, it moves | 739 | the rectangle; if there is any following text on the line, it moves |
| 740 | backwards to fill the gap. | 740 | backwards to fill the gap. |
| 741 | 741 | ||
| 742 | ``Killing'' a rectangle is not killing in the usual sense; the | 742 | ``Killing'' a rectangle is not killing in the usual sense; the |
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index ac81377aec9..4676983fc67 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi | |||
| @@ -147,7 +147,7 @@ beginning of the line and then executing the macro. | |||
| 147 | @findex kmacro-start-macro | 147 | @findex kmacro-start-macro |
| 148 | @findex kmacro-end-macro | 148 | @findex kmacro-end-macro |
| 149 | In addition to the @key{F3} and @key{F4} commands described above, | 149 | In addition to the @key{F3} and @key{F4} commands described above, |
| 150 | Emacs also supports an older set of keybindings for defining and | 150 | Emacs also supports an older set of key bindings for defining and |
| 151 | executing keyboard macros. To begin a macro definition, type @kbd{C-x | 151 | executing keyboard macros. To begin a macro definition, type @kbd{C-x |
| 152 | (} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument | 152 | (} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument |
| 153 | appends this definition to the last keyboard macro. To end a macro | 153 | appends this definition to the last keyboard macro. To end a macro |
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index f4a5a2858cf..5a97fa8460b 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi | |||
| @@ -36,7 +36,7 @@ Support}), but we hope to improve it in the future. | |||
| 36 | 36 | ||
| 37 | By default, the @key{alt} and @key{option} keys are the same as | 37 | By default, the @key{alt} and @key{option} keys are the same as |
| 38 | @key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and | 38 | @key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and |
| 39 | Emacs provides a set of keybindings using this modifier key that mimic | 39 | Emacs provides a set of key bindings using this modifier key that mimic |
| 40 | other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You | 40 | other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You |
| 41 | can change these bindings in the usual way (@pxref{Key Bindings}). | 41 | can change these bindings in the usual way (@pxref{Key Bindings}). |
| 42 | 42 | ||
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index e84b4c9f080..bbe42551345 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi | |||
| @@ -219,11 +219,11 @@ is sometimes available in ordinary buffers too. @xref{Symbol | |||
| 219 | Completion}. | 219 | Completion}. |
| 220 | 220 | ||
| 221 | @menu | 221 | @menu |
| 222 | * Example: Completion Example. Examples of using completion. | 222 | * Completion Example:: Examples of using completion. |
| 223 | * Commands: Completion Commands. A list of completion commands. | 223 | * Completion Commands:: A list of completion commands. |
| 224 | * Strict Completion:: Different types of completion. | 224 | * Completion Exit:: Completion and minibuffer text submission. |
| 225 | * Completion Styles:: How completion matches are chosen. | 225 | * Completion Styles:: How completion matches are chosen. |
| 226 | * Options: Completion Options. Options for completion. | 226 | * Completion Options:: Options for completion. |
| 227 | @end menu | 227 | @end menu |
| 228 | 228 | ||
| 229 | @node Completion Example | 229 | @node Completion Example |
| @@ -274,7 +274,7 @@ Complete up to one word from the minibuffer text before point | |||
| 274 | arguments that often include spaces, such as file names. | 274 | arguments that often include spaces, such as file names. |
| 275 | @item @key{RET} | 275 | @item @key{RET} |
| 276 | Submit the text in the minibuffer as the argument, possibly completing | 276 | Submit the text in the minibuffer as the argument, possibly completing |
| 277 | first (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}. | 277 | first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}. |
| 278 | @item ? | 278 | @item ? |
| 279 | Display a list of completions (@code{minibuffer-completion-help}). | 279 | Display a list of completions (@code{minibuffer-completion-help}). |
| 280 | @end table | 280 | @end table |
| @@ -337,42 +337,68 @@ While in the completion list buffer, this moves point to the previous | |||
| 337 | completion alternative (@code{previous-completion}). | 337 | completion alternative (@code{previous-completion}). |
| 338 | @end table | 338 | @end table |
| 339 | 339 | ||
| 340 | @node Strict Completion | 340 | @node Completion Exit |
| 341 | @subsection Strict Completion | 341 | @subsection Completion Exit |
| 342 | 342 | ||
| 343 | There are three ways that the @key{RET} | 343 | @kindex RET @r{(completion in minibuffer)} |
| 344 | (@code{minibuffer-complete-and-exit}) completion command can act, | 344 | @findex minibuffer-complete-and-exit |
| 345 | depending on how the argument will be used. | 345 | When a command reads an argument using the minibuffer with |
| 346 | completion, it also controls what happens when you type @key{RET} | ||
| 347 | (@code{minibuffer-complete-and-exit}) to submit the argument. There | ||
| 348 | are four types of behavior: | ||
| 346 | 349 | ||
| 347 | @itemize @bullet | 350 | @itemize @bullet |
| 348 | @item | 351 | @item |
| 349 | @dfn{Strict} completion accepts only known completion candidates. For | 352 | @dfn{Strict completion} accepts only exact completion matches. Typing |
| 350 | example, when @kbd{C-x k} reads the name of a buffer to kill, only the | 353 | @key{RET} exits the minibuffer only if the minibuffer text is an exact |
| 351 | name of an existing buffer makes sense. In strict completion, | 354 | match, or completes to one. Otherwise, Emacs refuses to exit the |
| 352 | @key{RET} refuses to exit if the text in the minibuffer does not | 355 | minibuffer; instead it tries to complete, and if no completion can be |
| 353 | complete to an exact match. | 356 | done it momentarily displays @samp{[No match]} after the minibuffer |
| 357 | text. (You can still leave the minibuffer by typing @kbd{C-g} to | ||
| 358 | cancel the command.) | ||
| 359 | |||
| 360 | An example of a command that uses this behavior is @kbd{M-x}, since it | ||
| 361 | is meaningless for it to accept a non-existent command name. | ||
| 354 | 362 | ||
| 355 | @item | 363 | @item |
| 356 | @dfn{Cautious} completion is similar to strict completion, except that | 364 | @dfn{Cautious completion} is like strict completion, except @key{RET} |
| 357 | @key{RET} exits only if the text is an already exact match. | 365 | exits only if the text is already an exact match. If the text |
| 358 | Otherwise, @key{RET} does not exit, but it does complete the text. If | 366 | completes to an exact match, @key{RET} performs that completion but |
| 359 | that completes to an exact match, a second @key{RET} will exit. | 367 | does not exit yet; you must type a second @key{RET} to exit. |
| 360 | 368 | ||
| 361 | Cautious completion is used for reading file names for files that must | 369 | Cautious completion is used for reading file names for files that must |
| 362 | already exist, for example. | 370 | already exist, for example. |
| 363 | 371 | ||
| 364 | @item | 372 | @item |
| 365 | @dfn{Permissive} completion allows any input; the completion | 373 | @dfn{Permissive completion} allows any input; the completion |
| 366 | candidates are just suggestions. For example, when @kbd{C-x C-f} | 374 | candidates are just suggestions. Typing @key{RET} does not complete, |
| 367 | reads the name of a file to visit, any file name is allowed, including | 375 | it just submits the argument as you have entered it. |
| 368 | nonexistent file (in case you want to create a file). In permissive | ||
| 369 | completion, @key{RET} does not complete, it just submits the argument | ||
| 370 | as you have entered it. | ||
| 371 | @end itemize | ||
| 372 | 376 | ||
| 373 | Like the other completion commands, @key{RET} displays a list of all | 377 | @cindex minibuffer confirmation |
| 374 | possible completions whenever it is supposed to complete but is unable | 378 | @cindex confirming in the minibuffer |
| 375 | to complete any further. | 379 | @item |
| 380 | @dfn{Permissive completion with confirmation} is like permissive | ||
| 381 | completion, with an exception: if you typed @key{TAB} and this | ||
| 382 | completed the text up to some intermediate state (i.e. one that is not | ||
| 383 | yet an exact completion match), typing @key{RET} right afterward does | ||
| 384 | not submit the argument. Instead, Emacs asks for confirmation by | ||
| 385 | momentarily displaying @samp{[Confirm]} after the text; type @key{RET} | ||
| 386 | again to confirm and submit the text. This catches a common mistake, | ||
| 387 | in which one types @key{RET} before realizing that @key{TAB} did not | ||
| 388 | complete as far as desired. | ||
| 389 | |||
| 390 | @vindex confirm-nonexistent-file-or-buffer | ||
| 391 | You can tweak the confirmation behavior by customizing the variable | ||
| 392 | @code{confirm-nonexistent-file-or-buffer}. The default value, | ||
| 393 | @code{after-completion}, gives the behavior we have just described. | ||
| 394 | If you change it to @code{nil}, Emacs does not ask for confirmation, | ||
| 395 | falling back on permissive completion. If you change it to any other | ||
| 396 | non-@code{nil} value, Emacs asks for confirmation whether or not the | ||
| 397 | preceding command was @key{TAB}. | ||
| 398 | |||
| 399 | This behavior is used by most commands that read file names, like | ||
| 400 | @kbd{C-x C-f}, and commands that read buffer names, like @kbd{C-x b}. | ||
| 401 | @end itemize | ||
| 376 | 402 | ||
| 377 | @node Completion Styles | 403 | @node Completion Styles |
| 378 | @subsection How Completion Alternatives Are Chosen | 404 | @subsection How Completion Alternatives Are Chosen |
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 5745dd7c66c..2357902341e 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi | |||
| @@ -1441,7 +1441,7 @@ parsed, and move point there (@code{semantic-complete-jump}). | |||
| 1441 | @kindex C-c , @key{SPC} | 1441 | @kindex C-c , @key{SPC} |
| 1442 | Display a list of possible completions for the symbol at point | 1442 | Display a list of possible completions for the symbol at point |
| 1443 | (@code{semantic-complete-analyze-inline}). This also activates a set | 1443 | (@code{semantic-complete-analyze-inline}). This also activates a set |
| 1444 | of special keybindings for choosing a completion: @key{RET} accepts | 1444 | of special key bindings for choosing a completion: @key{RET} accepts |
| 1445 | the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible | 1445 | the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible |
| 1446 | completions, @key{TAB} completes as far as possible and then cycles, | 1446 | completions, @key{TAB} completes as far as possible and then cycles, |
| 1447 | and @kbd{C-g} or any other key aborts completion. | 1447 | and @kbd{C-g} or any other key aborts completion. |
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index b894d01b9bb..71c23655608 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi | |||
| @@ -1198,7 +1198,7 @@ Address mode: | |||
| 1198 | 1198 | ||
| 1199 | @c FIXME goto-addr.el commentary says to use goto-address instead. | 1199 | @c FIXME goto-addr.el commentary says to use goto-address instead. |
| 1200 | @smallexample | 1200 | @smallexample |
| 1201 | (add-hook 'rmail-show-message-hook (lambda () (goto-address-mode 1))) | 1201 | (add-hook 'rmail-show-message-hook 'goto-address-mode) |
| 1202 | @end smallexample | 1202 | @end smallexample |
| 1203 | 1203 | ||
| 1204 | @noindent | 1204 | @noindent |
| @@ -1242,11 +1242,12 @@ coding system, the result should be readable. | |||
| 1242 | @node Rmail Editing | 1242 | @node Rmail Editing |
| 1243 | @section Editing Within a Message | 1243 | @section Editing Within a Message |
| 1244 | 1244 | ||
| 1245 | Most of the usual Emacs keybindings are available in Rmail mode, though a | 1245 | Most of the usual Emacs key bindings are available in Rmail mode, |
| 1246 | few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by Rmail for | 1246 | though a few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by |
| 1247 | other purposes. However, the Rmail buffer is normally read only, and | 1247 | Rmail for other purposes. However, the Rmail buffer is normally read |
| 1248 | most of the letters are redefined as Rmail commands. If you want to | 1248 | only, and most of the letters are redefined as Rmail commands. If you |
| 1249 | edit the text of a message, you must use the Rmail command @kbd{e}. | 1249 | want to edit the text of a message, you must use the Rmail command |
| 1250 | @kbd{e}. | ||
| 1250 | 1251 | ||
| 1251 | @table @kbd | 1252 | @table @kbd |
| 1252 | @item e | 1253 | @item e |
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 14d4c678085..fcc31e30988 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi | |||
| @@ -189,7 +189,7 @@ is sometimes useful to have this information. | |||
| 189 | 189 | ||
| 190 | @var{cs} describes the character set of the text in the buffer | 190 | @var{cs} describes the character set of the text in the buffer |
| 191 | (@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates | 191 | (@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates |
| 192 | no special character set handling (with the possible expection of | 192 | no special character set handling (with the possible exception of |
| 193 | end-of-line conventions, described in the next paragraph). @samp{=} | 193 | end-of-line conventions, described in the next paragraph). @samp{=} |
| 194 | means no conversion whatsoever, and is usually used for files | 194 | means no conversion whatsoever, and is usually used for files |
| 195 | containing non-textual data. Other characters represent various | 195 | containing non-textual data. Other characters represent various |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index caf03291fbc..a8bd1cdf18d 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -60,7 +60,6 @@ Incremental search backward (@code{isearch-backward}). | |||
| 60 | or else edit the search string. | 60 | or else edit the search string. |
| 61 | * Isearch Scroll:: Scrolling during an incremental search. | 61 | * Isearch Scroll:: Scrolling during an incremental search. |
| 62 | * Isearch Minibuffer:: Incremental search of the minibuffer history. | 62 | * Isearch Minibuffer:: Incremental search of the minibuffer history. |
| 63 | * Slow Isearch:: Incremental search features for slow terminals. | ||
| 64 | @end menu | 63 | @end menu |
| 65 | 64 | ||
| 66 | @node Basic Isearch | 65 | @node Basic Isearch |
| @@ -167,23 +166,27 @@ going past the original starting point of the search, it changes to | |||
| 167 | you have already seen. | 166 | you have already seen. |
| 168 | 167 | ||
| 169 | @cindex search ring | 168 | @cindex search ring |
| 169 | @kindex M-n @r{(Incremental search)} | ||
| 170 | @kindex M-p @r{(Incremental search)} | ||
| 170 | To reuse earlier search strings, use the @dfn{search ring}. The | 171 | To reuse earlier search strings, use the @dfn{search ring}. The |
| 171 | commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a | 172 | commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a |
| 172 | search string to reuse. These commands leave the selected search ring | 173 | search string to reuse. These commands leave the selected search ring |
| 173 | element in the minibuffer, where you can edit it. To edit the current | 174 | element in the minibuffer, where you can edit it. |
| 174 | search string in the minibuffer without replacing it with items from | 175 | |
| 175 | the search ring, type @kbd{M-e}. Type @kbd{C-s} or @kbd{C-r} to | 176 | @kindex M-e @r{(Incremental search)} |
| 176 | terminate editing the string and search for it. | 177 | To edit the current search string in the minibuffer without |
| 178 | replacing it with items from the search ring, type @kbd{M-e}. Type | ||
| 179 | @kbd{C-s} or @kbd{C-r} to finish editing the string and search for it. | ||
| 177 | 180 | ||
| 178 | @node Error in Isearch | 181 | @node Error in Isearch |
| 179 | @subsection Errors in Incremental Search | 182 | @subsection Errors in Incremental Search |
| 180 | 183 | ||
| 181 | If your string is not found at all, the echo area says @samp{Failing | 184 | If your string is not found at all, the echo area says @samp{Failing |
| 182 | I-Search}. The cursor is after the place where Emacs found as much of | 185 | I-Search}, and the cursor moves past the place where Emacs found as |
| 183 | your string as it could. Thus, if you search for @samp{FOOT}, and | 186 | much of your string as it could. Thus, if you search for @samp{FOOT}, |
| 184 | there is no @samp{FOOT}, you might see the cursor after the @samp{FOO} | 187 | and there is no @samp{FOOT}, you might see the cursor after the |
| 185 | in @samp{FOOL}. In the echo area, the part of the search string that | 188 | @samp{FOO} in @samp{FOOL}. In the echo area, the part of the search |
| 186 | failed to match is highlighted using the customizable face | 189 | string that failed to match is highlighted using the face |
| 187 | @code{isearch-fail}. | 190 | @code{isearch-fail}. |
| 188 | 191 | ||
| 189 | At this point, there are several things you can do. If your string | 192 | At this point, there are several things you can do. If your string |
| @@ -196,6 +199,7 @@ search string the characters that could not be found (the @samp{T} in | |||
| 196 | entirely, returning point to where it was when the search started. | 199 | entirely, returning point to where it was when the search started. |
| 197 | 200 | ||
| 198 | @cindex quitting (in search) | 201 | @cindex quitting (in search) |
| 202 | @kindex C-g @r{(Incremental search)} | ||
| 199 | The quit command, @kbd{C-g}, does special things during searches; | 203 | The quit command, @kbd{C-g}, does special things during searches; |
| 200 | just what it does depends on the status of the search. If the search | 204 | just what it does depends on the status of the search. If the search |
| 201 | has found what you specified and is waiting for input, @kbd{C-g} | 205 | has found what you specified and is waiting for input, @kbd{C-g} |
| @@ -264,69 +268,77 @@ use it (@pxref{Rebinding}). | |||
| 264 | 268 | ||
| 265 | @vindex isearch-mode-map | 269 | @vindex isearch-mode-map |
| 266 | When incremental search is active, you can type @kbd{C-h C-h} to | 270 | When incremental search is active, you can type @kbd{C-h C-h} to |
| 267 | access interactive help options, including a list of special | 271 | access interactive help options, including a list of special key |
| 268 | keybindings. These keybindings are part of the keymap | 272 | bindings. These key bindings are part of the keymap |
| 269 | @code{isearch-mode-map} (@pxref{Keymaps}). | 273 | @code{isearch-mode-map} (@pxref{Keymaps}). |
| 270 | 274 | ||
| 271 | @node Isearch Yank | 275 | @node Isearch Yank |
| 272 | @subsection Isearch Yanking | 276 | @subsection Isearch Yanking |
| 273 | 277 | ||
| 278 | @kindex C-y @r{(Incremental search)} | ||
| 279 | @kindex M-y @r{(Incremental search)} | ||
| 280 | @findex isearch-yank-kill | ||
| 281 | @findex isearch-yank-pop | ||
| 274 | Within incremental search, @kbd{C-y} (@code{isearch-yank-kill}) | 282 | Within incremental search, @kbd{C-y} (@code{isearch-yank-kill}) |
| 275 | copies text from the kill ring into the search string. It uses the | 283 | appends the current kill to the search string. @kbd{M-y} |
| 276 | same text that @kbd{C-y}, outside of incremental search, would | 284 | (@code{isearch-yank-pop}), if called after @kbd{C-y}, replaces that |
| 277 | normally yank into the buffer. @kbd{Mouse-2} in the echo area does | 285 | appended text with an earlier kill, similar to the usual @kbd{M-y} |
| 278 | the same. @xref{Yanking}. | 286 | (@code{yank-pop}) command (@pxref{Yanking}). @kbd{Mouse-2} appends |
| 279 | 287 | the current X selection (@pxref{Primary Selection}). | |
| 280 | @kbd{C-w} (@code{isearch-yank-word-or-char}) grabs the next | 288 | |
| 281 | character or word at point, and adds it to the search string. This is | 289 | @kindex C-w @r{(Incremental search)} |
| 282 | convenient for searching for another occurrence of the text at point. | 290 | @findex isearch-yank-word-or-char |
| 283 | (The decision, whether to copy a character or a word, is heuristic.) | 291 | @kbd{C-w} (@code{isearch-yank-word-or-char}) appends the next |
| 284 | 292 | character or word at point to the search string. This is an easy way | |
| 285 | Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) grabs the rest | 293 | to search for another occurrence of the text at point. (The decision |
| 286 | of the current line, and adds it to the search string. If point is | 294 | of whether to copy a character or a word is heuristic.) |
| 287 | already at the end of a line, it grabs the entire next line. | 295 | |
| 296 | @kindex M-s C-e @r{(Incremental search)} | ||
| 297 | @findex isearch-yank-line | ||
| 298 | Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) appends the rest | ||
| 299 | of the current line to the search string. If point is already at the | ||
| 300 | end of a line, it appends the next line. | ||
| 288 | 301 | ||
| 289 | If the search is currently case-insensitive, both @kbd{C-w} and | 302 | If the search is currently case-insensitive, both @kbd{C-w} and |
| 290 | @kbd{M-s C-e} convert the text they copy to lower case, so that the | 303 | @kbd{M-s C-e} convert the text they copy to lower case, so that the |
| 291 | search remains case-insensitive. | 304 | search remains case-insensitive. |
| 292 | 305 | ||
| 293 | @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one | 306 | @kindex C-M-w @r{(Incremental search)} |
| 294 | character at a time: @kbd{C-M-w} deletes the last character from the | 307 | @kindex C-M-y @r{(Incremental search)} |
| 295 | search string and @kbd{C-M-y} copies the character after point to the | 308 | @findex isearch-del-char |
| 296 | end of the search string. An alternative method to add the character | 309 | @findex isearch-yank-char |
| 297 | after point into the search string is to enter the minibuffer by | 310 | @kbd{C-M-w} (@code{isearch-del-char}) deletes the last character |
| 298 | @kbd{M-e} and to type @kbd{C-f} at the end of the search string in the | 311 | from the search string, and @kbd{C-M-y} (@code{isearch-yank-char}) |
| 299 | minibuffer. | 312 | appends the character after point to the the search string. An |
| 313 | alternative method to add the character after point is to enter the | ||
| 314 | minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f} | ||
| 315 | at the end of the search string in the minibuffer. | ||
| 300 | 316 | ||
| 301 | @node Isearch Scroll | 317 | @node Isearch Scroll |
| 302 | @subsection Scrolling During Incremental Search | 318 | @subsection Scrolling During Incremental Search |
| 303 | 319 | ||
| 304 | @vindex isearch-allow-scroll | 320 | @vindex isearch-allow-scroll |
| 305 | You can enable the use of vertical scrolling during incremental | 321 | Normally, scrolling commands exit incremental search. If you change |
| 306 | search (without exiting the search) by setting the customizable | 322 | the variable @code{isearch-allow-scroll} to a non-@code{nil} value, |
| 307 | variable @code{isearch-allow-scroll} to a non-@code{nil} value. This | 323 | that enables the use of the scroll-bar, as well as keyboard scrolling |
| 308 | applies to using the vertical scroll-bar and to certain keyboard | 324 | commands like @kbd{C-v}, @kbd{M-v}, and @kbd{C-l} (@pxref{Scrolling}). |
| 309 | commands such as @code{scroll-down-command}, @code{scroll-up-command} | 325 | This applies only to calling these commands via their bound key |
| 310 | and @code{recenter} (@pxref{Scrolling}). You must run these commands | 326 | sequences---typing @kbd{M-x} will still exit the search. You can give |
| 311 | via their key sequences to stay in the search---typing @kbd{M-x} will | 327 | prefix arguments to these commands in the usual way. This feature |
| 312 | terminate the search. You can give prefix arguments to these commands | 328 | won't let you scroll the current match out of visibility, however. |
| 313 | in the usual way. | 329 | |
| 314 | 330 | The @code{isearch-allow-scroll} feature also affects some other | |
| 315 | This feature won't let you scroll the current match out of visibility, | 331 | commands, such as @kbd{C-x 2} (@code{split-window-vertically}) and |
| 316 | however. | 332 | @kbd{C-x ^} (@code{enlarge-window}), which don't exactly scroll but do |
| 317 | 333 | affect where the text appears on the screen. It applies to any | |
| 318 | The feature also affects some other commands, such as @kbd{C-x 2} | 334 | command whose name has a non-@code{nil} @code{isearch-scroll} |
| 319 | (@code{split-window-vertically}) and @kbd{C-x ^} | 335 | property. So you can control which commands are affected by changing |
| 320 | (@code{enlarge-window}) which don't exactly scroll but do affect where | 336 | these properties. |
| 321 | the text appears on the screen. In general, it applies to any command | ||
| 322 | whose name has a non-@code{nil} @code{isearch-scroll} property. So you | ||
| 323 | can control which commands are affected by changing these properties. | ||
| 324 | 337 | ||
| 325 | For example, to make @kbd{C-h l} usable within an incremental search | 338 | For example, to make @kbd{C-h l} usable within an incremental search |
| 326 | in all future Emacs sessions, use @kbd{C-h c} to find what command it | 339 | in all future Emacs sessions, use @kbd{C-h c} to find what command it |
| 327 | runs. (You type @kbd{C-h c C-h l}; it says @code{view-lossage}.) | 340 | runs (@pxref{Key Help}), which is @code{view-lossage}. Then you can |
| 328 | Then you can put the following line in your @file{.emacs} file | 341 | put the following line in your init file (@pxref{Init File}): |
| 329 | (@pxref{Init File}): | ||
| 330 | 342 | ||
| 331 | @example | 343 | @example |
| 332 | (put 'view-lossage 'isearch-scroll t) | 344 | (put 'view-lossage 'isearch-scroll t) |
| @@ -359,33 +371,9 @@ wrap around, going from the last page to the first page or vice versa. | |||
| 359 | When the current match is on a history element, that history element | 371 | When the current match is on a history element, that history element |
| 360 | is pulled into the minibuffer. If you exit the incremental search | 372 | is pulled into the minibuffer. If you exit the incremental search |
| 361 | normally (e.g. by typing @key{RET}), it remains in the minibuffer | 373 | normally (e.g. by typing @key{RET}), it remains in the minibuffer |
| 362 | afterwards. Cancelling the search, with @kbd{C-g}, restores the | 374 | afterwards. Canceling the search, with @kbd{C-g}, restores the |
| 363 | contents of the minibuffer when you began the search. | 375 | contents of the minibuffer when you began the search. |
| 364 | 376 | ||
| 365 | @node Slow Isearch | ||
| 366 | @subsection Slow Terminal Incremental Search | ||
| 367 | |||
| 368 | Incremental search on a slow terminal uses a modified style of display | ||
| 369 | that is designed to take less time. Instead of redisplaying the buffer at | ||
| 370 | each place the search gets to, it creates a new single-line window and uses | ||
| 371 | that to display the line that the search has found. The single-line window | ||
| 372 | comes into play as soon as point moves outside of the text that is already | ||
| 373 | on the screen. | ||
| 374 | |||
| 375 | When you terminate the search, the single-line window is removed. | ||
| 376 | Emacs then redisplays the window in which the search was done, to show | ||
| 377 | its new position of point. | ||
| 378 | |||
| 379 | @vindex search-slow-speed | ||
| 380 | The slow terminal style of display is used when the terminal baud rate is | ||
| 381 | less than or equal to the value of the variable @code{search-slow-speed}, | ||
| 382 | initially 1200. See also the discussion of the variable @code{baud-rate} | ||
| 383 | (@pxref{baud-rate,, Customization of Display}). | ||
| 384 | |||
| 385 | @vindex search-slow-window-lines | ||
| 386 | The number of lines to use in slow terminal search display is controlled | ||
| 387 | by the variable @code{search-slow-window-lines}. Its normal value is 1. | ||
| 388 | |||
| 389 | @node Nonincremental Search | 377 | @node Nonincremental Search |
| 390 | @section Nonincremental Search | 378 | @section Nonincremental Search |
| 391 | @cindex nonincremental search | 379 | @cindex nonincremental search |
| @@ -405,18 +393,14 @@ This enters the minibuffer to read the search string; terminate the | |||
| 405 | string with @key{RET}, and then the search takes place. If the string | 393 | string with @key{RET}, and then the search takes place. If the string |
| 406 | is not found, the search command signals an error. | 394 | is not found, the search command signals an error. |
| 407 | 395 | ||
| 408 | When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental | ||
| 409 | search as usual. That command is specially programmed to invoke | ||
| 410 | nonincremental search, @code{search-forward}, if the string you | ||
| 411 | specify is empty. (Such an empty argument would otherwise be | ||
| 412 | useless.) @kbd{C-r @key{RET}} does likewise, for a reverse | ||
| 413 | incremental search. | ||
| 414 | |||
| 415 | @findex search-forward | 396 | @findex search-forward |
| 416 | @findex search-backward | 397 | @findex search-backward |
| 417 | Forward and backward nonincremental searches are implemented by the | 398 | When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental |
| 418 | commands @code{search-forward} and @code{search-backward}. These | 399 | search as usual. That command is specially programmed to invoke the |
| 419 | commands may be bound to other keys in the usual manner. | 400 | command for nonincremental search, @code{search-forward}, if the |
| 401 | string you specify is empty. (Such an empty argument would otherwise | ||
| 402 | be useless.) @kbd{C-r @key{RET}} does likewise, invoking the command | ||
| 403 | @code{search-backward}. | ||
| 420 | 404 | ||
| 421 | @node Word Search | 405 | @node Word Search |
| 422 | @section Word Search | 406 | @section Word Search |
| @@ -476,7 +460,7 @@ apply to the lazy highlight, which always matches whole words. | |||
| 476 | that denotes a class of alternative strings to match. GNU Emacs | 460 | that denotes a class of alternative strings to match. GNU Emacs |
| 477 | provides both incremental and nonincremental ways to search for a | 461 | provides both incremental and nonincremental ways to search for a |
| 478 | match for a regexp. The syntax of regular expressions is explained in | 462 | match for a regexp. The syntax of regular expressions is explained in |
| 479 | the following section. | 463 | the next section. |
| 480 | 464 | ||
| 481 | @table @kbd | 465 | @table @kbd |
| 482 | @item C-M-s | 466 | @item C-M-s |
| @@ -531,7 +515,7 @@ starting position. These search methods are not mirror images. | |||
| 531 | 515 | ||
| 532 | @findex re-search-forward | 516 | @findex re-search-forward |
| 533 | @findex re-search-backward | 517 | @findex re-search-backward |
| 534 | Nonincremental search for a regexp is done by the functions | 518 | Nonincremental search for a regexp is done with the commands |
| 535 | @code{re-search-forward} and @code{re-search-backward}. You can | 519 | @code{re-search-forward} and @code{re-search-backward}. You can |
| 536 | invoke these with @kbd{M-x}, or by way of incremental regexp search | 520 | invoke these with @kbd{M-x}, or by way of incremental regexp search |
| 537 | with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}. | 521 | with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}. |
| @@ -941,9 +925,9 @@ close-brackets, quotes, or parentheses, repeated zero or more times. | |||
| 941 | Searches in Emacs normally ignore the case of the text they are | 925 | Searches in Emacs normally ignore the case of the text they are |
| 942 | searching through, if you specify the text in lower case. Thus, if | 926 | searching through, if you specify the text in lower case. Thus, if |
| 943 | you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo} | 927 | you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo} |
| 944 | are also considered a match. Regexps, and in particular character | 928 | also match. Regexps, and in particular character sets, behave |
| 945 | sets, are included: @samp{[ab]} would match @samp{a} or @samp{A} or | 929 | likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b} or |
| 946 | @samp{b} or @samp{B}.@refill | 930 | @samp{B}.@refill |
| 947 | 931 | ||
| 948 | An upper-case letter anywhere in the incremental search string makes | 932 | An upper-case letter anywhere in the incremental search string makes |
| 949 | the search case-sensitive. Thus, searching for @samp{Foo} does not find | 933 | the search case-sensitive. Thus, searching for @samp{Foo} does not find |
| @@ -985,8 +969,8 @@ command, there is @kbd{M-%} (@code{query-replace}), which presents | |||
| 985 | each occurrence of the pattern and asks you whether to replace it. | 969 | each occurrence of the pattern and asks you whether to replace it. |
| 986 | 970 | ||
| 987 | The replace commands normally operate on the text from point to the | 971 | The replace commands normally operate on the text from point to the |
| 988 | end of the buffer. When the mark is active, they operate on the | 972 | end of the buffer. When the region is active, they operate on it |
| 989 | region instead (@pxref{Mark}). The basic replace commands replace one | 973 | instead (@pxref{Mark}). The basic replace commands replace one |
| 990 | @dfn{search string} (or regexp) with one @dfn{replacement string}. It | 974 | @dfn{search string} (or regexp) with one @dfn{replacement string}. It |
| 991 | is possible to perform several replacements in parallel, using the | 975 | is possible to perform several replacements in parallel, using the |
| 992 | command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). | 976 | command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). |
| @@ -1023,7 +1007,7 @@ activating the mark; use @kbd{C-u C-@key{SPC}} to move back there. | |||
| 1023 | @xref{Mark Ring}. | 1007 | @xref{Mark Ring}. |
| 1024 | 1008 | ||
| 1025 | A prefix argument restricts replacement to matches that are | 1009 | A prefix argument restricts replacement to matches that are |
| 1026 | surrounded by word boundaries. The argument's value doesn't matter. | 1010 | surrounded by word boundaries. |
| 1027 | 1011 | ||
| 1028 | @xref{Replacement and Case}, for details about case-sensitivity in | 1012 | @xref{Replacement and Case}, for details about case-sensitivity in |
| 1029 | replace commands. | 1013 | replace commands. |
| @@ -1153,10 +1137,8 @@ replacement is done without case conversion. | |||
| 1153 | 1137 | ||
| 1154 | @table @kbd | 1138 | @table @kbd |
| 1155 | @item M-% @var{string} @key{RET} @var{newstring} @key{RET} | 1139 | @item M-% @var{string} @key{RET} @var{newstring} @key{RET} |
| 1156 | @itemx M-x query-replace @key{RET} @var{string} @key{RET} @var{newstring} @key{RET} | ||
| 1157 | Replace some occurrences of @var{string} with @var{newstring}. | 1140 | Replace some occurrences of @var{string} with @var{newstring}. |
| 1158 | @item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET} | 1141 | @item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET} |
| 1159 | @itemx M-x query-replace-regexp @key{RET} @var{regexp} @key{RET} @var{newstring} @key{RET} | ||
| 1160 | Replace some matches for @var{regexp} with @var{newstring}. | 1142 | Replace some matches for @var{regexp} with @var{newstring}. |
| 1161 | @end table | 1143 | @end table |
| 1162 | 1144 | ||
| @@ -1169,7 +1151,7 @@ occurrence and asks you whether to replace it. Aside from querying, | |||
| 1169 | @code{query-replace} works just like @code{replace-string} | 1151 | @code{query-replace} works just like @code{replace-string} |
| 1170 | (@pxref{Unconditional Replace}). In particular, it preserves case | 1152 | (@pxref{Unconditional Replace}). In particular, it preserves case |
| 1171 | provided @code{case-replace} is non-@code{nil}, as it normally is | 1153 | provided @code{case-replace} is non-@code{nil}, as it normally is |
| 1172 | (@pxref{Replacement and Case}). A numeric argument means consider | 1154 | (@pxref{Replacement and Case}). A numeric argument means to consider |
| 1173 | only occurrences that are bounded by word-delimiter characters. | 1155 | only occurrences that are bounded by word-delimiter characters. |
| 1174 | 1156 | ||
| 1175 | @kindex C-M-% | 1157 | @kindex C-M-% |
| @@ -1182,7 +1164,7 @@ like @code{query-replace}. | |||
| 1182 | These commands highlight the current match using the face | 1164 | These commands highlight the current match using the face |
| 1183 | @code{query-replace}. They highlight other matches using | 1165 | @code{query-replace}. They highlight other matches using |
| 1184 | @code{lazy-highlight} just like incremental search (@pxref{Incremental | 1166 | @code{lazy-highlight} just like incremental search (@pxref{Incremental |
| 1185 | Search}). By default, @code{query-replace-regexp} will show | 1167 | Search}). By default, @code{query-replace-regexp} will show the |
| 1186 | substituted replacement string for the current match in the | 1168 | substituted replacement string for the current match in the |
| 1187 | minibuffer. If you want to keep special sequences @samp{\&} and | 1169 | minibuffer. If you want to keep special sequences @samp{\&} and |
| 1188 | @samp{\@var{n}} unexpanded, customize | 1170 | @samp{\@var{n}} unexpanded, customize |
| @@ -1315,6 +1297,8 @@ matching that regexp. | |||
| 1315 | This command is just like @code{multi-isearch-buffers}, except it | 1297 | This command is just like @code{multi-isearch-buffers}, except it |
| 1316 | performs an incremental regexp search. | 1298 | performs an incremental regexp search. |
| 1317 | 1299 | ||
| 1300 | @cindex Occur mode | ||
| 1301 | @cindex mode, Occur | ||
| 1318 | @item M-x occur | 1302 | @item M-x occur |
| 1319 | Prompt for a regexp, and display a list showing each line in the | 1303 | Prompt for a regexp, and display a list showing each line in the |
| 1320 | buffer that contains a match for it. To limit the search to part of | 1304 | buffer that contains a match for it. To limit the search to part of |
| @@ -1325,16 +1309,22 @@ displayed before and after each matching line. | |||
| 1325 | @kindex RET @r{(Occur mode)} | 1309 | @kindex RET @r{(Occur mode)} |
| 1326 | @kindex o @r{(Occur mode)} | 1310 | @kindex o @r{(Occur mode)} |
| 1327 | @kindex C-o @r{(Occur mode)} | 1311 | @kindex C-o @r{(Occur mode)} |
| 1328 | The buffer @samp{*Occur*} containing the output serves as a menu for | 1312 | In the @samp{*Occur*} buffer, you can click on each entry, or move |
| 1329 | finding the occurrences in their original context. Click | 1313 | point there and type @key{RET}, to visit the corresponding position in |
| 1330 | @kbd{Mouse-2} on an occurrence listed in @samp{*Occur*}, or position | 1314 | the buffer that was searched. @kbd{o} and @kbd{C-o} display the match |
| 1331 | point there and type @key{RET}; this switches to the buffer that was | 1315 | in another window; @kbd{C-o} does not select it. Alternatively, you |
| 1332 | searched and moves point to the original of the chosen occurrence. | 1316 | can use the @kbd{C-x `} (@code{next-error}) command to visit the |
| 1333 | @kbd{o} and @kbd{C-o} display the match in another window; @kbd{C-o} | 1317 | occurrences one by one (@pxref{Compilation Mode}). |
| 1334 | does not select it. | 1318 | |
| 1335 | 1319 | @cindex Occur Edit mode | |
| 1336 | After using @kbd{M-x occur}, you can use @code{next-error} to visit | 1320 | @cindex mode, Occur Edit |
| 1337 | the occurrences found, one by one. @ref{Compilation Mode}. | 1321 | Typing @kbd{e} in the @samp{*Occur*} buffer switches to Occur Edit |
| 1322 | mode, in which edits made to the entries are also applied to the text | ||
| 1323 | in the originating buffer. Type @kbd{C-c C-c} to return to Occur | ||
| 1324 | mode. | ||
| 1325 | |||
| 1326 | The command @kbd{M-x list-matching-lines} is a synonym for @kbd{M-x | ||
| 1327 | occur}. | ||
| 1338 | 1328 | ||
| 1339 | @kindex M-s o | 1329 | @kindex M-s o |
| 1340 | @item M-s o | 1330 | @item M-s o |
| @@ -1342,9 +1332,6 @@ Run @code{occur} using the search string of the last incremental | |||
| 1342 | string search. You can also run @kbd{M-s o} when an incremental | 1332 | string search. You can also run @kbd{M-s o} when an incremental |
| 1343 | search is active; this uses the current search string. | 1333 | search is active; this uses the current search string. |
| 1344 | 1334 | ||
| 1345 | @item M-x list-matching-lines | ||
| 1346 | Synonym for @kbd{M-x occur}. | ||
| 1347 | |||
| 1348 | @item M-x multi-occur | 1335 | @item M-x multi-occur |
| 1349 | This command is just like @code{occur}, except it is able to search | 1336 | This command is just like @code{occur}, except it is able to search |
| 1350 | through multiple buffers. It asks you to specify the buffer names one | 1337 | through multiple buffers. It asks you to specify the buffer names one |
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index dc92e4a519c..600d0b07818 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi | |||
| @@ -343,8 +343,8 @@ details. | |||
| 343 | additionally select the displaying window so that you can begin | 343 | additionally select the displaying window so that you can begin |
| 344 | editing its buffer. The command @kbd{C-x `} (@code{next-error}) is | 344 | editing its buffer. The command @kbd{C-x `} (@code{next-error}) is |
| 345 | one example (@pxref{Compilation Mode}). Such commands work by calling | 345 | one example (@pxref{Compilation Mode}). Such commands work by calling |
| 346 | @code{pop-to-buffer} internally. @xref{Displaying Buffers,,Displaying | 346 | @code{pop-to-buffer} internally. @xref{Switching Buffers,,Switching |
| 347 | Buffers in Windows, elisp, The Emacs Lisp Reference Manual}. | 347 | to a Buffer in a Window, elisp, The Emacs Lisp Reference Manual}. |
| 348 | 348 | ||
| 349 | Commands with names ending in @code{-other-window} behave like | 349 | Commands with names ending in @code{-other-window} behave like |
| 350 | @code{display-buffer}, except that they never display in the selected | 350 | @code{display-buffer}, except that they never display in the selected |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 02c2d2b8750..6b0ef9c5d8b 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-10-23 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | Sync with Tramp 2.2.3. | ||
| 4 | |||
| 5 | * trampver.texi: Update release number. | ||
| 6 | |||
| 1 | 2011-10-14 Glenn Morris <rgm@gnu.org> | 7 | 2011-10-14 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * ert.texi (Introduction, How to Run Tests) | 9 | * ert.texi (Introduction, How to Run Tests) |
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 31d3ac0204f..63dc78dc4e8 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | @c In the Tramp CVS, the version number is auto-frobbed from | 8 | @c In the Tramp CVS, the version number is auto-frobbed from |
| 9 | @c configure.ac, so you should edit that file and run | 9 | @c configure.ac, so you should edit that file and run |
| 10 | @c "autoconf && ./configure" to change the version number. | 10 | @c "autoconf && ./configure" to change the version number. |
| 11 | @set trampver 2.2.3-pre | 11 | @set trampver 2.2.3-24.1 |
| 12 | 12 | ||
| 13 | @c Other flags from configuration | 13 | @c Other flags from configuration |
| 14 | @set instprefix /usr/local | 14 | @set instprefix /usr/local |