aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2012-11-08 04:43:38 +0800
committerChong Yidong2012-11-08 04:43:38 +0800
commit7d806bfec978fbc99c95797e4f236daa44c44007 (patch)
treeba7db25273d10f41d1a1822a0fbb80d32f446d11 /doc
parent8a3afaf9ea1812d8c341ea27744d68441f3ce5a5 (diff)
downloademacs-7d806bfec978fbc99c95797e4f236daa44c44007.tar.gz
emacs-7d806bfec978fbc99c95797e4f236daa44c44007.zip
Fix and docfix for the minibuffer-eldef-shorten-default feature.
* lisp/minibuf-eldef.el (minibuffer-eldef-shorten-default): Convert to a defcustom with an appropriate :set function. (minibuffer-default--in-prompt-regexps): New function. * doc/emacs/mini.texi (Basic Minibuffer): New node. Document minibuffer-electric-default-mode. * doc/emacs/display.texi (Visual Line Mode): Fix index entry.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/display.texi1
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/mini.texi54
4 files changed, 44 insertions, 17 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 489da459838..5804af2733a 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,5 +1,10 @@
12012-11-07 Chong Yidong <cyd@gnu.org> 12012-11-07 Chong Yidong <cyd@gnu.org>
2 2
3 * mini.texi (Basic Minibuffer): New node. Document
4 minibuffer-electric-default-mode.
5
6 * display.texi (Visual Line Mode): Fix index entry.
7
3 * buffers.texi (Several Buffers): List Buffer Menu command anmes, 8 * buffers.texi (Several Buffers): List Buffer Menu command anmes,
4 and index the keybindings. Document tabulated-list-sort. 9 and index the keybindings. Document tabulated-list-sort.
5 (Kill Buffer): Capitalize Buffer Menu. 10 (Kill Buffer): Capitalize Buffer Menu.
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index c40c545ec53..b6ab4913f9c 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1500,6 +1500,7 @@ attempts to wrap the line at word boundaries near the right window
1500edge. This makes the text easier to read, as wrapping does not occur 1500edge. This makes the text easier to read, as wrapping does not occur
1501in the middle of words. 1501in the middle of words.
1502 1502
1503@cindex mode, Visual Line
1503@cindex Visual Line mode 1504@cindex Visual Line mode
1504@findex visual-line-mode 1505@findex visual-line-mode
1505@findex global-visual-line-mode 1506@findex global-visual-line-mode
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index e7e0feb9e88..74da3d9587b 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -261,6 +261,7 @@ Basic Editing Commands
261 261
262The Minibuffer 262The Minibuffer
263 263
264* Basic Minibuffer:: Basic usage of the minibuffer.
264* Minibuffer File:: Entering file names with the minibuffer. 265* Minibuffer File:: Entering file names with the minibuffer.
265* Minibuffer Edit:: How to edit in the minibuffer. 266* Minibuffer Edit:: How to edit in the minibuffer.
266* Completion:: An abbreviation facility for minibuffer input. 267* Completion:: An abbreviation facility for minibuffer input.
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index e5a84bda56d..ebccedacc05 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -13,24 +13,54 @@ special-purpose buffer with a small amount of screen space. You can
13use the usual Emacs editing commands in the minibuffer to edit the 13use the usual Emacs editing commands in the minibuffer to edit the
14argument text. 14argument text.
15 15
16@menu
17* Basic Minibuffer:: Basic usage of the minibuffer.
18* Minibuffer File:: Entering file names with the minibuffer.
19* Minibuffer Edit:: How to edit in the minibuffer.
20* Completion:: An abbreviation facility for minibuffer input.
21* Minibuffer History:: Reusing recent minibuffer arguments.
22* Repetition:: Re-executing commands that used the minibuffer.
23* Passwords:: Entering passwords in the echo area.
24* Yes or No Prompts:: Replying yes or no in the echo area.
25@end menu
26
27@node Basic Minibuffer
28@section Using the Minibuffer
29
16@cindex prompt 30@cindex prompt
17 When the minibuffer is in use, it appears in the echo area, with a 31 When the minibuffer is in use, it appears in the echo area, with a
18cursor. The minibuffer starts with a @dfn{prompt} in a distinct 32cursor. The minibuffer starts with a @dfn{prompt}, usually ending
19color, usually ending with a colon. The prompt states what kind of 33with a colon. The prompt states what kind of input is expected, and
20input is expected, and how it will be used. 34how it will be used. The prompt is highlighted using the
35@code{minibuffer-prompt} face (@pxref{Faces}).
21 36
22 The simplest way to enter a minibuffer argument is to type the text, 37 The simplest way to enter a minibuffer argument is to type the text,
23then @key{RET} to submit the argument and exit the minibuffer. You 38then @key{RET} to submit the argument and exit the minibuffer.
24can cancel the minibuffer, and the command that wants the argument, by 39Alternatively, you can type @kbd{C-g} to exit the minibuffer by
25typing @kbd{C-g}. 40cancelling the command asking for the argument (@pxref{Quitting}).
26 41
27@cindex default argument 42@cindex default argument
28 Sometimes, a @dfn{default argument} appears in the prompt, inside 43 Sometimes, the prompt shows a @dfn{default argument}, inside
29parentheses before the colon. This default will be used as the 44parentheses before the colon. This default will be used as the
30argument if you just type @key{RET}. For example, commands that read 45argument if you just type @key{RET}. For example, commands that read
31buffer names usually show a buffer name as the default; you can type 46buffer names usually show a buffer name as the default; you can type
32@key{RET} to operate on that default buffer. 47@key{RET} to operate on that default buffer.
33 48
49@cindex Minibuffer Electric Default mode
50@cindex mode, Minibuffer Electric Default
51@findex minibuffer-electric-default-mode
52@vindex minibuffer-eldef-shorten-default
53 If you enable Minibuffer Electric Default mode, a global minor mode,
54Emacs hides the default argument as soon as you modify the contents of
55the minibuffer (since typing @key{RET} would no longer submit that
56default). If you ever bring back the original minibuffer text, the
57prompt again shows the default. Furthermore, if you change the
58variable @code{minibuffer-eldef-shorten-default} to a non-@code{nil}
59value, the default argument is displayed as @samp{[@var{default}]}
60instead of @samp{(default @var{default})}, saving some screen space.
61To enable this minor mode, type @kbd{M-x
62minibuffer-electric-default-mode}.
63
34 Since the minibuffer appears in the echo area, it can conflict with 64 Since the minibuffer appears in the echo area, it can conflict with
35other uses of the echo area. If an error message or an informative 65other uses of the echo area. If an error message or an informative
36message is emitted while the minibuffer is active, the message hides 66message is emitted while the minibuffer is active, the message hides
@@ -38,16 +68,6 @@ the minibuffer for a few seconds, or until you type something; then
38the minibuffer comes back. While the minibuffer is in use, keystrokes 68the minibuffer comes back. While the minibuffer is in use, keystrokes
39do not echo. 69do not echo.
40 70
41@menu
42* Minibuffer File:: Entering file names with the minibuffer.
43* Minibuffer Edit:: How to edit in the minibuffer.
44* Completion:: An abbreviation facility for minibuffer input.
45* Minibuffer History:: Reusing recent minibuffer arguments.
46* Repetition:: Re-executing commands that used the minibuffer.
47* Passwords:: Entering passwords in the echo area.
48* Yes or No Prompts:: Replying yes or no in the echo area.
49@end menu
50
51@node Minibuffer File 71@node Minibuffer File
52@section Minibuffers for File Names 72@section Minibuffers for File Names
53 73