File: mini.texi

package info (click to toggle)
emacs-manual-ja 20.5-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,964 kB
  • ctags: 12
  • sloc: lisp: 119; ansic: 69; makefile: 43; sh: 28
file content (932 lines) | stat: -rw-r--r-- 48,085 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
@c =============================================================
@c = $B85(B $BK](B $BLu(B: $B9b<.0l5*!wEE5$DL?.Bg3X(B
@c = $B2CI.=$@5(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1998/11/25
@c = 20.4$B2~D{(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1999/09/12
@c =============================================================
@c This is part of the Emacs manual.
@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Minibuffer, M-x, Basic, Top
@c @chapter The Minibuffer
@chapter $B%_%K%P%C%U%!(B
@c @cindex minibuffer
@cindex $B%_%K%P%C%U%!(B

@c   The @dfn{minibuffer} is the facility used by Emacs commands to read
@c arguments more complicated than a single number.  Minibuffer arguments
@c can be file names, buffer names, Lisp function names, Emacs command
@c names, Lisp expressions, and many other things, depending on the command
@c reading the argument.  You can use the usual Emacs editing commands in
@c the minibuffer to edit the argument text.
@dfn{$B%_%K%P%C%U%!(B}$B$O!"C1=c$J?t$h$j$bJ#;($J0z?t$r(BEmacs$B%3%^%s%I$,(B
$BFI$_<h$k$?$a$KMQ$$$k5!9=$G$9!#(B
$B%_%K%P%C%U%!0z?t$O!"%U%!%$%kL>!"%P%C%U%!L>!"(BLisp$B4X?tL>!"(BEmacs$B%3%^%s%IL>!"(B
Lisp$B<0$J$I!"0z?t$rFI$_<h$k%3%^%s%I$K1~$8$FB?<oB?MM$G$9!#(B
$B%_%K%P%C%U%!$G$O!"DL>o$N%P%C%U%!$HF1MM$NJT=85!G=$rMQ$$$F(B
$B0z?t$N%F%-%9%H$rJT=8$G$-$^$9!#(B

@c @cindex prompt
@cindex $B%W%m%s%W%H(B
@c   When the minibuffer is in use, it appears in the echo area, and the
@c terminal's cursor moves there.  The beginning of the minibuffer line
@c displays a @dfn{prompt} which says what kind of input you should supply and
@c how it will be used.  Often this prompt is derived from the name of the
@c command that the argument is for.  The prompt normally ends with a colon.
$B%_%K%P%C%U%!$,;H$o$l$F$$$k$H$-$K$O!"%_%K%P%C%U%!$O%(%3!<NN0h$KI=<($5$l$F!"(B
$BC<Kv$N%+!<%=%k$b%(%3!<NN0h$K0\F0$7$^$9!#(B
$B%_%K%P%C%U%!$N9T$N@hF,$K$O(B@dfn{$B%W%m%s%W%H(B}$B!J(Bprompt$B!K$,I=<($5$l$^$9!#(B
$B%W%m%s%W%H$K$h$j!"2?$rF~NO$7$=$l$,$I$N$h$&$K;H$o$l$k$+$r(B
$BCN$k$3$H$,$G$-$^$9!#(B
$B%W%m%s%W%H$O!"0z?t$rMW5a$7$F$$$k%3%^%s%I$NL>A0$+$iF3$+$l$k$3$H$,B?$$$G$9!#(B
$B%W%m%s%W%H$ODL>o%3%m%s$G=*$j$^$9!#(B

@c @cindex default argument
@cindex $B%G%U%)%k%H0z?t(B
@c   Sometimes a @dfn{default argument} appears in parentheses after the
@c colon; it too is part of the prompt.  The default will be used as the
@c argument value if you enter an empty argument (for example, just type
@c @key{RET}).  For example, commands that read buffer names always show a
@c default, which is the name of the buffer that will be used if you type
@c just @key{RET}.
$B%3%m%s$N$"$H$N3g8L$NCf$K(B@dfn{$B%G%U%)%k%H0z?t(B}$B!J(Bdefault argument$B!K$,(B
$BI=<($5$l$k$3$H$b$"$j$^$9!#(B
$B$3$l$b%W%m%s%W%H$N0lIt$G$9!#(B
$B!J$?$H$($P!"(B@key{RET}$B$@$1$rBG$C$F!K6u$N0z?t$rF~NO$7$?$H$-$K$O!"(B
$B%G%U%)%k%H$,0z?t$H$7$F;H$o$l$^$9!#(B
$B$?$H$($P!"%P%C%U%!L>$rFI$_<h$k%3%^%s%I$O!"$D$M$K!"%G%U%)%k%H$rI=<($7$^$9$,!"(B
$B$=$l$O(B@key{RET}$B$@$1$rBG$C$?$H$-$K;H$o$l$k%P%C%U%!L>$G$9!#(B

@c   The simplest way to enter a minibuffer argument is to type the text
@c you want, terminated by @key{RET} which exits the minibuffer.  You can
@c cancel the command that wants the argument, and get out of the
@c minibuffer, by typing @kbd{C-g}.
$B%_%K%P%C%U%!0z?t$rF~NO$9$k$b$C$H$b4JC1$JJ}K!$O!"(B
$BL\E*$N%F%-%9%H$rF~NO$7$F$+$i!"(B
$B%_%K%P%C%U%!$+$iH4$1$k(B@key{RET}$B$G=*$($k$3$H$G$9!#(B
@kbd{C-g}$B$rBG$F$P!"0z?t$rI,MW$H$9$k%3%^%s%I$r<h$j>C$7$F!"(B
$B%_%K%P%C%U%!$rH4$1$k$3$H$,$G$-$^$9!#(B

@c   Since the minibuffer uses the screen space of the echo area, it can
@c conflict with other ways Emacs customarily uses the echo area.  Here is how
@c Emacs handles such conflicts:
$B%_%K%P%C%U%!$O2hLL$N%(%3!<NN0h$r;H$&$?$a!"(B
$B=,47E*$K%(%3!<NN0h$r;HMQ$9$k(BEmacs$B$N5!G=$H>WFM$9$k2DG=@-$,$"$j$^$9!#(B
Emacs$B$O!"$=$N$h$&$J>WFM$r0J2<$N$h$&$K07$$$^$9!#(B

@itemize @bullet
@item
@c If a command gets an error while you are in the minibuffer, this does
@c not cancel the minibuffer.  However, the echo area is needed for the
@c error message and therefore the minibuffer itself is hidden for a
@c while.  It comes back after a few seconds, or as soon as you type
@c anything.
$B%_%K%P%C%U%!$r;HMQCf$K%3%^%s%I$,%(%i!<$r5/$3$7$F$b!"(B
$B%_%K%P%C%U%!$r<h$j>C$9$3$H$O$J$$!#(B
$B$7$+$7$J$,$i!"%(%i!<%a%C%;!<%8$rI=<($9$k$?$a$K%(%3!<NN0h$,I,MW$J$N$G!"(B
$B$7$P$i$/$N$"$$$@%_%K%P%C%U%!$r1#$9!#(B
$B?tIC7P2a$9$k$+!"2?$+$rBG$D$H!"$?$@$A$K%_%K%P%C%U%!$rI=<($9$k!#(B

@item
@c If in the minibuffer you use a command whose purpose is to print a
@c message in the echo area, such as @kbd{C-x =}, the message is printed
@c normally, and the minibuffer is hidden for a while.  It comes back
@c after a few seconds, or as soon as you type anything.
@kbd{C-x =}$B$N$h$&$K!"%(%3!<NN0h$K%a%C%;!<%8$rI=<($9$k%3%^%s%I$r(B
$B%_%K%P%C%U%!$G<B9T$9$k$H!"%a%C%;!<%8$ODL>o$I$*$jI=<($7$F!"(B
$B$7$P$i$/$N$"$$$@%_%K%P%C%U%!$r1#$9!#(B
$B?tIC7P2a$9$k$+!"2?$+$rBG$D$H!"$?$@$A$K%_%K%P%C%U%!$rI=<($9$k!#(B

@item
@c Echoing of keystrokes does not take place while the minibuffer is in
@c use.
$B%_%K%P%C%U%!$r;HMQCf$O!"%-!<F~NO$r%(%3!<$7$J$$!#(B
@end itemize

@menu
* File: Minibuffer File.  Entering file names with the minibuffer.
* Edit: Minibuffer Edit.  How to edit in the minibuffer.
* Completion::		  An abbreviation facility for minibuffer input.
* Minibuffer History::    Reusing recent minibuffer arguments.
* Repetition::		  Re-executing commands that used the minibuffer.
@end menu

@node Minibuffer File
@c @section Minibuffers for File Names
@section $B%U%!%$%kL>F~NOMQ$N%_%K%P%C%U%!(B

@c   Sometimes the minibuffer starts out with text in it.  For example, when
@c you are supposed to give a file name, the minibuffer starts out containing
@c the @dfn{default directory}, which ends with a slash.  This is to inform
@c you which directory the file will be found in if you do not specify a
@c directory.
$B:G=i$+$i%F%-%9%H$rH<$C$F;O$^$k%_%K%P%C%U%!$b$"$j$^$9!#(B
$B$?$H$($P!"%U%!%$%kL>$r;XDj$7$J$1$l$P$J$i$J$$>l9g!"(B
$B%_%K%P%C%U%!$O%9%i%C%7%e$G=*$k(B@dfn{$B%G%U%)%k%H%G%#%l%/%H%j(B}
$B!J(Bdefault directory$B!K$r4^$s$G$$$^$9!#(B
$B$3$l$K$h$j!"%G%#%l%/%H%j$r;XDj$7$J$/$F$b!"(B
$B$I$N%G%#%l%/%H%j$+$i%U%!%$%k$rC5$9$+$o$+$j$^$9!#(B

@c Separate paragraph to clean up ugly pagebreak--rms
@need 1500
@c   For example, the minibuffer might start out with these contents:
$B$?$H$($P!"%_%K%P%C%U%!$,$D$.$N$h$&$JFbMF$G;O$^$C$?$H$7$^$7$g$&!#(B

@example
Find File: /u2/emacs/src/
@end example

@noindent
@c where @samp{Find File:@: } is the prompt.  Typing @kbd{buffer.c}
@c specifies the file @file{/u2/emacs/src/buffer.c}.  To find files in
@c nearby directories, use @kbd{..}; thus, if you type
@c @kbd{../lisp/simple.el}, you will get the file named
@c @file{/u2/emacs/lisp/simple.el}.  Alternatively, you can kill with
@c @kbd{M-@key{DEL}} the directory names you don't want (@pxref{Words}).
$B$3$3$G!"(B@samp{Find File:@: }$B$,%W%m%s%W%H$G$9!#(B
@kbd{buffer.c}$B$HBG$F$P!"(B
$B%U%!%$%k(B@file{/u2/emacs/src/buffer.c}$B$r;XDj$7$?$3$H$K$J$j$^$9!#(B
$BIU6a$N%G%#%l%/%H%j$N%U%!%$%k$r;XDj$9$k$K$O!"(B@kbd{..}$B$r;H$$$^$9!#(B
$B$7$?$,$C$F!"(B@kbd{../lisp/simple.el}$B$HBG$F$P!"(B
@file{/u2/emacs/lisp/simple.el}$B$H$$$&L>A0$N%U%!%$%k$K$J$j$^$9!#(B
$B$"$k$$$O!"ITMW$J%G%#%l%/%H%jL>$G$"$l$P!"(B
@kbd{M-@key{DEL}}$B$G%-%k$G$-$^$9!J(B@pxref{Words}$B!K!#(B

@c   If you don't want any of the default, you can kill it with @kbd{C-a
@c C-k}.  But you don't need to kill the default; you can simply ignore it.
@c Insert an absolute file name, one starting with a slash or a tilde,
@c after the default directory.  For example, to specify the file
@c @file{/etc/termcap}, just insert that name, giving these minibuffer
@c contents:
$B%G%U%)%k%H%G%#%l%/%H%j$r$^$C$?$/;H$$$?$/$J$$>l9g$O!"(B
@kbd{C-a C-k}$B$HBG$C$F%-%k$G$-$^$9!#(B
$B$7$+$7!"%G%U%)%k%H$r%-%k$9$kI,MW$O$"$j$^$;$s!#(B
$BC1$KL5;k$9$l$P$h$$$N$G$9!#(B
$B%9%i%C%7%e$d%F%#%k%@$G;O$^$k@dBP%U%!%$%kL>$rA^F~$7$^$9!#(B
$B$?$H$($P!"%U%!%$%k(B@file{/etc/termcap}$B$r;XDj$9$k$K$O!"(B
$B$=$N%U%!%$%kL>$rA^F~$7$F!"%_%K%P%C%U%!$,$D$.$NFbMF$K$J$k$h$&$K$7$^$9!#(B

@example
Find File: /u2/emacs/src//etc/termcap
@end example

@noindent
@c @cindex // in file name
@c @cindex double slash in file name
@c @cindex slashes repeated in file name
@cindex $B%U%!%$%kL>Cf$N(B//
@cindex $B%U%!%$%kL>Cf$N%9%i%C%7%e(B2$B8D(B
@cindex $B%U%!%$%kL>Cf$N%9%i%C%7%e$N7+$jJV$7(B
@c GNU Emacs gives a special meaning to a double slash (which is not
@c normally a useful thing to write): it means, ``ignore everything before
@c the second slash in the pair.''  Thus, @samp{/u2/emacs/src/} is ignored
@c in the example above, and you get the file @file{/etc/termcap}.
GNU Emacs$B$G$O!"!JIaDL$O0UL#$N$"$k=q$-J}$G$O$J$$!K(B
$BO"B3$7$?(B2$B8D$N%9%i%C%7%e$KFCJL$J0UL#$rM?$($F$$$^$9!#(B
$B!X(B2$BHVL\$N%9%i%C%7%e$h$j$^$($NJ8;z$O$9$Y$FL5;k$9$k!Y$H$$$&0UL#$K$J$j$^$9!#(B
$B$7$?$,$C$F!"@h$NNc$G$O!"(B@samp{/u2/emacs/src/}$B$OL5;k$5$l!"(B
@file{/etc/termcap}$B$H$$$&%U%!%$%kL>$K$J$j$^$9!#(B

@c   If you set @code{insert-default-directory} to @code{nil}, the default
@c directory is not inserted in the minibuffer.  This way, the minibuffer
@c starts out empty.  But the name you type, if relative, is still
@c interpreted with respect to the same default directory.
@code{insert-default-directory}$B$K(B@code{nil}$B$r@_Dj$9$k$H!"(B
$B%_%K%P%C%U%!$K$O%G%U%)%k%H%G%#%l%/%H%j$rA^F~$7$^$;$s!#(B
$B$D$^$j!"%_%K%P%C%U%!$O6u$G;O$^$j$^$9!#(B
$B$7$+$7!"F~NO$7$?%U%!%$%kL>$,AjBPE*$J$b$N$G$"$l$P!"(B
$BF1$8%G%U%)%k%H%G%#%l%/%H%jAjBP$K2r<a$5$l$^$9!#(B

@node Minibuffer Edit
@c @section Editing in the Minibuffer
@section $B%_%K%P%C%U%!$G$NJT=8(B

@c   The minibuffer is an Emacs buffer (albeit a peculiar one), and the usual
@c Emacs commands are available for editing the text of an argument you are
@c entering.
$B%_%K%P%C%U%!$O!J>/!9FC<l$@$,!KIaDL$N(BEmacs$B%P%C%U%!$J$N$G!"(B
$BDL>o$N(BEmacs$B%3%^%s%I$r;H$C$F!"F~NOCf$N0z?t$N%F%-%9%H$rJT=8$G$-$^$9!#(B

@c   Since @key{RET} in the minibuffer is defined to exit the minibuffer,
@c you can't use it to insert a newline in the minibuffer.  To do that,
@c type @kbd{C-o} or @kbd{C-q C-j}.  (Recall that a newline is really the
@c character control-J.)
$B%_%K%P%C%U%!$G$O!"(B@key{RET}$B$O%_%K%P%C%U%!$+$iH4$1$k$h$&$KDj5A$5$l$F$$$k$N$G!"(B
$B%_%K%P%C%U%!$G2~9T$rA^F~$9$k$?$a$K(B@key{RET}$B$r;H$&$3$H$O$G$-$^$;$s!#(B
$B2~9T$rA^F~$9$k$K$O!"(B@kbd{C-o}$B$d(B@kbd{C-q C-j}$B$H$7$^$9!#(B
$B!J2~9T$H$O<B$OJ8;z!V%3%s%H%m!<%k(BJ$B!W!#!K(B

@c   The minibuffer has its own window which always has space on the screen
@c but acts as if it were not there when the minibuffer is not in use.  When
@c the minibuffer is in use, its window is just like the others; you can
@c switch to another window with @kbd{C-x o}, edit text in other windows and
@c perhaps even visit more files, before returning to the minibuffer to submit
@c the argument.  You can kill text in another window, return to the
@c minibuffer window, and then yank the text to use it in the argument.
@c @xref{Windows}.
$B%_%K%P%C%U%!$K$OFH<+$N%&%#%s%I%&$,$"$j!"(B
$B$=$N%&%#%s%I%&$O2hLL>e$N>l=j$r@jM-$7$F$$$^$9!#(B
$B$7$+$7!"%_%K%P%C%U%!$,;H$o$l$F$$$J$$$H$-$K$O!"(B
$B$"$?$+$b2?$b$J$$$+$N$h$&$K$U$k$^$$$^$9!#(B
$B%_%K%P%C%U%!$,;H$o$l$F$$$k$H$-$O!"(B
$B$=$N%&%#%s%I%&$OB>$N%&%#%s%I%&$HF1MM$K$J$j$^$9!#(B
$B%_%K%P%C%U%!$G0z?t$rF~NO$7=*$($k$^$G$O!"(B
@kbd{C-x o}$B$GB>$N%&%#%s%I%&$K@Z$jBX$($F!"(B
$B$=$3$G%F%-%9%H$rJT=8$7$?$jB>$N%U%!%$%k$rK,Ld$7$?$j$b$G$-$^$9!#(B
$BB>$N%&%#%s%I%&$G%F%-%9%H$r%-%k$7$F$+$i!"(B
$B%_%K%P%C%U%!%&%#%s%I%&$KLa$C$F$=$N%F%-%9%H$r(B
$B%d%s%/$7$F0z?t$H$7$F;H$&$3$H$b$G$-$^$9!#(B
@xref{Windows}$B!#(B

@findex resize-minibuffer-mode
@c @cindex Resize-Minibuffer mode
@c @cindex mode, Resize-Minibuffer
@c @cindex height of minibuffer
@c @cindex size of minibuffer
@c @cindex growing minibuffer
@cindex $B%_%K%P%C%U%!%j%5%$%:%b!<%I!J(BResize-Minibuffer mode$B!K(B
@cindex $B%b!<%I!"(BResize-Minibuffer
@cindex $B%_%K%P%C%U%!$N9b$5(B
@cindex $B%_%K%P%C%U%!$N%5%$%:(B
@cindex $B%_%K%P%C%U%!$N3HBg(B
@c   There are some restrictions on the use of the minibuffer window,
@c however.  You cannot switch buffers in it---the minibuffer and its
@c window are permanently attached.  Also, you cannot split or kill the
@c minibuffer window.  But you can make it taller in the normal fashion
@c with @kbd{C-x ^}.  If you enable Resize-Minibuffer mode, then the
@c minibuffer window expands vertically as necessary to hold the text that
@c you put in the minibuffer.  Use @kbd{M-x resize-minibuffer-mode} to
@c enable or disable this minor mode (@pxref{Minor Modes}).
$B$7$+$7!"%_%K%P%C%U%!%&%#%s%I%&$N;HMQ$K$O$$$/$D$+$N@)8B$,$"$j$^$9!#(B
$B%_%K%P%C%U%!%&%#%s%I%&$G$O%P%C%U%!$r@Z$jBX$($i$l$^$;$s!#(B
$B%_%K%P%C%U%!$H$=$N%&%#%s%I%&$O915WE*$K7k$SIU$$$F$$$^$9!#(B
$B$^$?!"%_%K%P%C%U%!%&%#%s%I%&$rJ,3d$7$?$j>C5n$7$?$j$9$k$3$H$b$G$-$^$;$s!#(B
$B$7$+$7!"(B@kbd{C-x ^}$B$r;H$&DL>o$NJ}K!$G!"(B
$B%&%#%s%I%&$N9b$5$rBg$-$/$9$k$3$H$O2DG=$G$9!#(B
$B%_%K%P%C%U%!%j%5%$%:!J(Bresize-minibuffer$B!K%b!<%I$r%*%s$K$7$F$*$/$H!"(B
$B%_%K%P%C%U%!$KF~NO$7$?%F%-%9%H$rI=<($9$k$N$KI,MW$J$@$1!"(B
$B%_%K%P%C%U%!%&%#%s%I%&$O=D$K9-$,$j$^$9!#(B
@kbd{M-x resize-minibuffer-mode}$B$r;H$C$F!"(B
$B$3$N%^%$%J%b!<%I$r%*%s!?%*%U$7$^$9!J(B@pxref{Minor Modes}$B!K!#(B

@vindex minibuffer-scroll-overlap
@c   Scrolling works specially in the minibuffer window.  When the
@c minibuffer is just one line high, and it contains a long line of text
@c that won't fit on the screen, scrolling automatically maintains an
@c overlap of a certain number of characters from one continuation line to
@c the next.  The variable @code{minibuffer-scroll-overlap} specifies how
@c many characters of overlap; the default is 20.
$B%_%K%P%C%U%!%&%#%s%I%&$G$O%9%/%m!<%k$OFC<l$JF0$-$r$7$^$9!#(B
$B%_%K%P%C%U%!$,$A$g$&$I(B1$B9TJ,$N9b$5$G!"(B
$B2hLL$K<}$^$i$J$$$[$ID9$$(B1$B9T$N%F%-%9%H$,F~$C$F$$$k$H$-$K$O!"(B
$B%9%/%m!<%k$9$k$H$-$K7QB39T$N$"$$$@$G$O2?J8;z$+$r<+F0E*$K=EJ#$7$FI=<($7$^$9!#(B
$BJQ?t(B@code{minibuffer-scroll-overlap}$B$G!"=EJ#$5$;$kJ8;z?t$r;XDj$7$^$9!#(B
$B%G%U%)%k%H$O(B20$B$G$9!#(B

@c   If while in the minibuffer you issue a command that displays help text
@c of any sort in another window, you can use the @kbd{C-M-v} command while
@c in the minibuffer to scroll the help text.  This lasts until you exit
@c the minibuffer.  This feature is especially useful if a completing
@c minibuffer gives you a list of possible completions.  @xref{Other Window}.
$B%_%K%P%C%U%!$NCf$GJL$N%&%#%s%I%&$K$"$k<o$N%X%k%W%F%-%9%H$r(B
$BI=<($9$k$h$&$J%3%^%s%I$r<B9T$7$?$H$-$K$O!"(B
@kbd{C-M-v}$B$r;H$C$F(B
$B%_%K%P%C%U%!$NCf$+$i%X%k%W%F%-%9%H$r%9%/%m!<%k$G$-$^$9!#(B
$B$3$l$O!"%_%K%P%C%U%!$rH4$1$k$^$GM-8z$G$9!#(B
$B$3$N5!G=$O!"Jd40$r$7$F$$$k%_%K%P%C%U%!$,!"(B
$BJd408uJd$rJL$N%&%#%s%I%&$KI=<($9$k$h$&$J>l9g$KFC$KJXMx$G$9!#(B
@xref{Other Window}$B!#(B

@vindex enable-recursive-minibuffers
@c   Emacs normally disallows most commands that use the minibuffer while
@c the minibuffer is active.  This rule is to prevent recursive minibuffers
@c from confusing novice users.  If you want to be able to use such
@c commands in the minibuffer, set the variable
@c @code{enable-recursive-minibuffers} to a non-@code{nil} value.
Emacs$B$G$O!"DL>o!"%_%K%P%C%U%!$r;H$C$F$$$k:GCf$K$O!"(B
$B%_%K%P%C%U%!$rMQ$$$k%3%^%s%I$NB?$/$r<B9T$G$-$J$$$h$&$K$7$F$$$^$9!#(B
$B$3$l$O!":F5"E*$J%_%K%P%C%U%!$N;HMQ$G=i?4<T$,:.Mp$9$k$N$rHr$1$k$?$a$G$9!#(B
$B$3$N$h$&$J%3%^%s%I$r%_%K%P%C%U%!$+$iMxMQ$G$-$k$h$&$K$9$k$K$O!"(B
$BJQ?t(B@code{enable-recursive-minibuffers}$B$K(B@code{nil}$B0J30$r@_Dj$7$^$9!#(B

@node Completion
@c @section Completion
@section $BJd40(B
@c @cindex completion
@cindex $BJd40(B

@c   For certain kinds of arguments, you can use @dfn{completion} to enter
@c the argument value.  Completion means that you type part of the
@c argument, then Emacs visibly fills in the rest, or as much as
@c can be determined from the part you have typed.
$B$"$k<o$N0z?t$G$O!"0z?t$NCM$NF~NO$K(B@dfn{$BJd40(B}$B!J(Bcompletion$B!K$rMxMQ$G$-$^$9!#(B
$BJd40$H$O!"0z?t$N0lItJ,$rBG$D$H!"(BEmacs$B$,$=$N;D$j$NItJ,$r$9$Y$F!"(B
$B$"$k$$$O4{B8$NF~NOItJ,$+$i7hDj2DG=$J8B$j;D$j$NItJ,$rJd$&5!G=$G$9!#(B

@c   When completion is available, certain keys---@key{TAB}, @key{RET}, and
@c @key{SPC}---are rebound to complete the text present in the minibuffer
@c into a longer string that it stands for, by matching it against a set of
@c @dfn{completion alternatives} provided by the command reading the
@c argument.  @kbd{?} is defined to display a list of possible completions
@c of what you have inserted.
$BJd40$r;H$($k$H$-$K$O!"(B@key{TAB}$B!"(B@key{RET}$B!"(B@key{SPC}$B$N3F%-!<$O!"(B
$B%_%K%P%C%U%!Fb$N4{B8$N%F%-%9%H$r$=$l$r4^$`$h$jD9$$J8;zNs$K(B
$BJd40$9$k$h$&$K:FDj5A$7$F$"$j$^$9!#(B
$BJd40$O!"0z?t$rFI$_<h$k%3%^%s%I$,MQ0U$7$?(B
@dfn{$BJd408uJd(B}$B72!J(Bcompletion alternatives$B!K$KBP$7$F(B
$BF~NO$5$l$?%F%-%9%H$H$N0lCW$r$H$k$3$H$G9T$o$l$^$9!#(B
@kbd{?}$B%-!<$O!"F~NO$+$iJd402DG=$J8uJd0lMw$rI=<($9$k$h$&$KDj5A$7$F$"$j$^$9!#(B

@c   For example, when @kbd{M-x} uses the minibuffer to read the name of a
@c command, it provides a list of all available Emacs command names to
@c complete against.  The completion keys match the text in the minibuffer
@c against all the command names, find any additional name characters
@c implied by the ones already present in the minibuffer, and add those
@c characters to the ones you have given.  This is what makes it possible
@c to type @kbd{M-x ins @key{SPC} b @key{RET}} instead of @kbd{M-x
@c insert-buffer @key{RET}} (for example).
$B$?$H$($P!"(B@kbd{M-x}$B$,%3%^%s%IL>$rFI$_<h$k$?$a$K%_%K%P%C%U%!$r;H$C$F$$$k>l9g!"(B
@kbd{M-x}$B$O!"Jd40$KHw$($F!"(B
$B;HMQ2DG=$J$9$Y$F$N(BEmacs$B%3%^%s%IL>$N0lMw$rMQ0U$7$^$9!#(B
$BJd40%-!<$O!"%_%K%P%C%U%!Fb$N%F%-%9%H$r$9$Y$F$N%3%^%s%IL>$K>H$i$79g$o$;$F!"(B
$B%_%K%P%C%U%!$N4{B8$NL>A0$+$iF3$+$l$kL>A0$NDI2CJ8;zNs$rC5$7=P$7$F!"(B
$B$=$NJ8;zNs$r$=$l$^$G$KF~NO$7$F$"$k%F%-%9%H$KIU$12C$($^$9!#(B
$B$3$l$K$h$j!"(B@kbd{M-x insert-buffer @key{RET}}$B$HBG$D$+$o$j$K!"(B
@kbd{M-x ins @key{SPC} b @key{RET}}$B$HBG$D$3$H$,2DG=$K$J$k$N$G$9!#(B

@c   Case is normally significant in completion, because it is significant
@c in most of the names that you can complete (buffer names, file names and
@c command names).  Thus, @samp{fo} does not complete to @samp{Foo}.
@c Completion does ignore case distinctions for certain arguments in which
@c case does not matter.
$BJd40$G$O!"BgJ8;z>.J8;z$r6hJL$7$^$9!#(B
$B$H$$$&$N$O!"Jd40BP>]$H$J$kL>A0!J%P%C%U%!L>!"%U%!%$%kL>!"%3%^%s%IL>!K$N(B
$B$[$H$s$I$G$O!"BgJ8;z>.J8;z$r6hJL$7$F$$$k$+$i$G$9!#(B
$B$7$?$,$C$F!"(B@samp{fo}$B$r!"(B@samp{Foo}$B$H$OJd40$7$^$;$s!#(B
$BBgJ8;z>.J8;z$r6hJL$7$J$$0z?t$KBP$7$F$O!"Jd40$bN><T$r6hJL$7$^$;$s!#(B

@menu
* Example: Completion Example.
* Commands: Completion Commands.
* Strict Completion::
* Options: Completion Options.
@end menu

@node Completion Example
@c @subsection Completion Example
@subsection $BJd40$NNc(B

@c @kindex TAB @r{(completion)}
@kindex TAB @r{$B!JJd40!K(B}
@findex minibuffer-complete
@c   A concrete example may help here.  If you type @kbd{M-x au @key{TAB}},
@c the @key{TAB} looks for alternatives (in this case, command names) that
@c start with @samp{au}.  There are several, including
@c @code{auto-fill-mode} and @code{auto-save-mode}---but they are all the
@c same as far as @code{auto-}, so the @samp{au} in the minibuffer changes
@c to @samp{auto-}.@refill
$B6qBNE*$JNc$G9M$($F$_$^$7$g$&!#(B
@kbd{M-x au @key{TAB}}$B$HBG$D$H!"(B
@key{TAB}$B$O(B@samp{au}$B$G;O$^$k8uJd!J$3$N>l9g$O%3%^%s%IL>!K$rC5$7$^$9!#(B
@samp{au}$B$G;O$^$k$b$N$K$O!"(B@code{auto-fill-mode}$B$H(B@code{auto-save-mode}$B$r(B
$B4^$a$F$$$/$D$+$"$j$^$9$,!"$I$l$b>/$J$/$H$b(B@code{auto-}$B$^$G$OF1$8$G$9!#(B
$B$=$3$G!"%_%K%P%C%U%!Fb$N(B@samp{au}$B$O(B@samp{auto-}$B$KJQ$o$j$^$9!#(B

@c   If you type @key{TAB} again immediately, there are multiple
@c possibilities for the very next character---it could be any of
@c @samp{cfilrs}---so no more characters are added; instead, @key{TAB}
@c displays a list of all possible completions in another window.
$B$3$3$G$?$@$A$K(B@key{TAB}$B$r$b$&0lEYBG$C$F$b!"(B
$B$D$.$K$/$kJ8;z$N8uJd$,J#?t!"$D$^$j!"(B@samp{cfilrs}$B$N$I$l$+$J$N$G!"(B
$B$5$i$KJ8;z$,DI2C$5$l$k$3$H$O$"$j$^$;$s!#(B
$B$=$N$+$o$j!"(B@key{TAB}$B$OJd408uJd$N0lMw$rJL$N%&%#%s%I%&$KI=<($7$^$9!#(B

@c   If you go on to type @kbd{f @key{TAB}}, this @key{TAB} sees
@c @samp{auto-f}.  The only command name starting this way is
@c @code{auto-fill-mode}, so completion fills in the rest of that.  You now
@c have @samp{auto-fill-mode} in the minibuffer after typing just @kbd{au
@c @key{TAB} f @key{TAB}}.  Note that @key{TAB} has this effect because in
@c the minibuffer it is bound to the command @code{minibuffer-complete}
@c when completion is available.
$BB3$1$F(B@kbd{f @key{TAB}}$B$HBG$D$H!"(B
$B:#EY$N(B@key{TAB}$B$OJ8;zNs(B@samp{auto-f}$B$rC5$7$^$9!#(B
@samp{auto-f}$B$+$i;O$^$k%3%^%s%IL>$O(B@code{auto-fill-mode}$B$@$1$J$N$G!"(B
$BJd40$O;D$j$NItJ,$rJd$$$^$9!#(B
$B$3$l$G!"(B@kbd{au @key{TAB} f @key{TAB}}$B$HBG$D$@$1$G!"(B
$B%_%K%P%C%U%!$K$O(B@samp{auto-fill-mode}$B$,F~$j$^$9!#(B
@key{TAB}$B%-!<$,$3$N$h$&$J8z2L$r;}$D$N$O!"(B
$B$3$N%-!<$,%_%K%P%C%U%!Fb$G$O%3%^%s%I(B@code{minibuffer-complete}$B$K(B
$B%P%$%s%I$7$F$"$k$+$i$@$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B

@node Completion Commands
@c @subsection Completion Commands
@subsection $BJd40%3%^%s%I(B

@c   Here is a list of the completion commands defined in the minibuffer
@c when completion is available.
$BJd40$r;H$($k%_%K%P%C%U%!$G$O!"(B
$B$D$.$N$h$&$JJd40%3%^%s%I$rDj5A$7$F$"$j$^$9!#(B

@table @kbd
@item @key{TAB}
@c Complete the text in the minibuffer as much as possible
@c (@code{minibuffer-complete}).
$B%_%K%P%C%U%!$N%F%-%9%H$r2DG=$J8B$jJd40$9$k!J(B@code{minibuffer-complete}$B!K!#(B
@item @key{SPC}
@c Complete the minibuffer text, but don't go beyond one word
@c (@code{minibuffer-complete-word}).
$B%_%K%P%C%U%!$N%F%-%9%H$r(B1$B8l$@$1Jd40$9$k!J(B@code{minibuffer-complete-word}$B!K!#(B
@item @key{RET}
@c Submit the text in the minibuffer as the argument, possibly completing
@c first as described below (@code{minibuffer-complete-and-exit}).
$B2DG=$J8B$jJd40$7$?$"$H!"%_%K%P%C%U%!$N%F%-%9%H$r0z?t$H$7$FEO$9(B
$B!J(B@code{minibuffer-complete-and-exit}$B!K!#(B
@item ?
@c Print a list of all possible completions of the text in the minibuffer
@c (@code{minibuffer-list-completions}).
$B%_%K%P%C%U%!$N%F%-%9%H$+$iJd402DG=$J8uJd$N0lMw$rI=<($9$k(B
$B!J(B@code{minibuffer-list-completions}$B!K!#(B
@end table

@kindex SPC
@findex minibuffer-complete-word
@c   @key{SPC} completes much like @key{TAB}, but never goes beyond the
@c next hyphen or space.  If you have @samp{auto-f} in the minibuffer and
@c type @key{SPC}, it finds that the completion is @samp{auto-fill-mode},
@c but it stops completing after @samp{fill-}.  This gives
@c @samp{auto-fill-}.  Another @key{SPC} at this point completes all the
@c way to @samp{auto-fill-mode}.  @key{SPC} in the minibuffer when
@c completion is available runs the command
@c @code{minibuffer-complete-word}.
@key{SPC}$B$O(B@key{TAB}$B$H$[$\F1$8$h$&$KJd40$7$^$9$,!"(B
$B$D$.$N%O%$%U%s$d6uGr$rD6$($FJd40$9$k$3$H$O$"$j$^$;$s!#(B
$B%_%K%P%C%U%!$NJ8;z$,(B@samp{auto-f}$B$G$"$k$H$7$^$7$g$&!#(B
$B$3$3$G(B@key{SPC}$B$rBG$D$H!"(B@key{SPC}$B$O(B@samp{auto-fill-mode}$B$KJd40$G$-$k$3$H$r(B
$BC5$7$@$7$^$9$,!"(B@samp{fill-}$B$^$G$GJd40$r;_$a$^$9!#(B
$B$=$N7k2L!"(B@samp{auto-fill-}$B$H$J$j$^$9!#(B
$B$3$3$G$b$&0lEY(B@key{SPC}$B$rBG$D$H!"(B
$B:#EY$O(B@samp{auto-fill-mode}$B$^$G40A4$KJd40$7$^$9!#(B
$BJd40$r9T$($k%_%K%P%C%U%!Fb$G$O!"(B@key{SPC}$B$O(B
$B%3%^%s%I(B@code{minibuffer-complete-word}$B$r<B9T$7$^$9!#(B

@c   Here are some commands you can use to choose a completion from a
@c window that displays a list of completions:
$BJd408uJd0lMw$rI=<($7$F$$$k%&%#%s%I%&$+$iJd40$rA*$V$K$O!"(B
$B$D$.$N%3%^%s%I$r;H$($^$9!#(B

@table @kbd
@findex mouse-choose-completion
@item Mouse-2
@c Clicking mouse button 2 on a completion in the list of possible
@c completions chooses that completion (@code{mouse-choose-completion}).
@c You normally use this command while point is in the minibuffer; but you
@c must click in the list of completions, not in the minibuffer itself.
$BJd408uJd0lMw$N8uJd>e$G%^%&%9%\%?%s(B2$B$r%/%j%C%/$9$k$H!"(B
$B$=$NJd40$rA*Br$9$k!J(B@code{mouse-choose-completion}$B!K!#(B
$BDL>o$O!"%]%$%s%H$,%_%K%P%C%U%!Fb$K$"$k$H$-$K$3$N%3%^%s%I$r;H$&$@$m$&$,!"(B
$B%_%K%P%C%U%!$G$O$J$/8uJd0lMw$G%/%j%C%/$9$kI,MW$,$"$k!#(B

@findex switch-to-completions
@item @key{PRIOR}
@itemx M-v
@c Typing @key{PRIOR} or @key{PAGE-UP}, or @kbd{M-v}, while in the
@c minibuffer, selects the window showing the completion list buffer
@c (@code{switch-to-completions}).  This paves the way for using the
@c commands below.  (Selecting that window in the usual ways has the same
@c effect, but this way is more convenient.)
$B%_%K%P%C%U%!$G!"(B@key{PRIOR}$B!"(B@key{PAGE-UP}$B!"(B@kbd{M-v}$B$N$$$:$l$+$rBG$D$H!"(B
$BJd408uJd0lMw$N%P%C%U%!$rI=<($7$F$$$k%&%#%s%I%&$rA*Br$G$-$k(B
$B!J(B@code{switch-to-completions}$B!K!#(B
$B$3$N5!G=$O!"0J2<$N%3%^%s%I$NMxMQ$r4JC1$K$9$k!#(B
$B!JDL>o$NJ}K!$G$b$=$N%&%#%s%I%&$rA*Br$G$-$k$,!"$3$NJ}K!$N$[$&$,JXMx$G$"$m$&!#!K(B

@findex choose-completion
@item @key{RET}
@c Typing @key{RET} @emph{in the completion list buffer} chooses the
@c completion that point is in or next to (@code{choose-completion}).  To
@c use this command, you must first switch windows to the window that shows
@c the list of completions.
@emph{$BJd408uJd0lMw$N%P%C%U%!$G(B}@key{RET}$B$rBG$D$H!"(B
$B%]%$%s%H0LCV$K$"$kJd40$+%]%$%s%H$KB3$/Jd40$rA*Br$9$k(B
$B!J(B@code{choose-completion}$B!K!#(B
$B$3$N%3%^%s%I$r;H$&>l9g!"(B
$BJd408uJd0lMw$rI=<($7$F$$$k%&%#%s%I%&$K$^$:0\F0$9$kI,MW$,$"$k!#(B

@findex next-completion
@item @key{RIGHT}
@c Typing the right-arrow key @key{RIGHT} @emph{in the completion list
@c buffer} moves point to the following completion (@code{next-completion}).
@emph{$BJd408uJd0lMw$N%P%C%U%!$G(B}$B1&8~$-Lp0u%-!<(B@key{RIGHT}$B$rBG$D$H!"(B
$B%]%$%s%H$O$D$.$NJd408uJd$K0\F0$9$k!J(B@code{next-completion}$B!K!#(B

@findex previous-completion
@item @key{LEFT}
@c Typing the left-arrow key @key{LEFT} @emph{in the completion list
@c buffer} moves point toward the beginning of the buffer, to the previous
@c completion (@code{previous-completion}).
@emph{$BJd408uJd0lMw$N%P%C%U%!$G(B}$B:88~$-Lp0u%-!<(B@key{LEFT}$B$rBG$D$H!"(B
$B%]%$%s%H$O$^$($NJd408uJd$K0\F0$9$k!J(B@code{previous-completion}$B!K!#(B
@end table

@node Strict Completion
@c @subsection Strict Completion
@subsection $B6/$$Jd40(B

@c   There are three different ways that @key{RET} can work in completing
@c minibuffers, depending on how the argument will be used.
$B%_%K%P%C%U%!$G$NJd40$K$*$$$F!"(B
@key{RET}$B$O0z?t$N;H$o$lJ}$K0MB8$7$F(B3$B<oN`$N0[$J$kF0:n$r<($7$^$9!#(B

@itemize @bullet
@item
@c @dfn{Strict} completion is used when it is meaningless to give any
@c argument except one of the known alternatives.  For example, when
@c @kbd{C-x k} reads the name of a buffer to kill, it is meaningless to
@c give anything but the name of an existing buffer.  In strict
@c completion, @key{RET} refuses to exit if the text in the minibuffer
@c does not complete to an exact match.
@dfn{$B6/$$(B}$BJd40!J(Bstrict completion$B!K$O!"(B
$B4{CN$NJd408uJd0J30$r0z?t$KM?$($k$H0UL#$,$J$$>l9g$K;H$o$l$k!#(B
$B$?$H$($P!"(B@kbd{C-x k}$B$,:o=|$9$k%P%C%U%!L>$rFI$_<h$k$H$-!"(B
$B4{B8$N%P%C%U%!L>0J30$rM?$($F$b0UL#$,$J$$!#(B
$B6/$$Jd40$G$O!"%_%K%P%C%U%!$N%F%-%9%H$rJd40$7$F(B
$B8uJd$N(B1$B$D$K40A4$K0lCW$7$J$$$H(B@key{RET}$B$G=*N;$G$-$J$$!#(B

@item
@c @dfn{Cautious} completion is similar to strict completion, except that
@c @key{RET} exits only if the text was an exact match already, not
@c needing completion.  If the text is not an exact match, @key{RET} does
@c not exit, but it does complete the text.  If it completes to an exact
@c match, a second @key{RET} will exit.
@dfn{$B?5=E$J(B}$BJd40!J(Bcautious completion$B!K$O!"6/$$Jd40$K;w$F$$$k$,!"(B
$B%F%-%9%H$,$9$G$K40A4$K0lCW$7$F$$$FJd40$NI,MW$,$J$$>l9g$K$N$_!"(B
@key{RET}$B$G=*N;$G$-$kE@$,0[$J$k!#(B
$B%F%-%9%H$,40A4$K0lCW$7$F$$$J$$>l9g$O!"(B
@key{RET}$B$O=*N;$;$:$K%F%-%9%H$rJd40$9$k!#(B
$B40A4$K0lCW$9$l$P!"(B2$BEYL\$N(B@key{RET}$B$G=*N;$G$-$k!#(B

@c Cautious completion is used for reading file names for files that must
@c already exist.
$B?5=E$JJd40$O!"4{B8$G$J$1$l$P$J$i$J$$(B
$B%U%!%$%k$NL>A0$rFI$_<h$k$h$&$J>l9g$K;H$o$l$k!#(B

@item
@c @dfn{Permissive} completion is used when any string whatever is
@c meaningful, and the list of completion alternatives is just a guide.
@c For example, when @kbd{C-x C-f} reads the name of a file to visit, any
@c file name is allowed, in case you want to create a file.  In
@c permissive completion, @key{RET} takes the text in the minibuffer
@c exactly as given, without completing it.
@dfn{$B<e$$(B}$BJd40!J(Bpermissive completion$B!K$O!"(B
$B$I$s$JJ8;zNs$G$b0UL#$r;}$D$h$&$J>l9g$K;H$o$l!"(B
$BJd408uJd0lMw$OC1$J$kL\0B$G$7$+$J$$!#(B
$B$?$H$($P!"(B@kbd{C-x C-f}$B$,K,Ld$9$k%U%!%$%kL>$rFI$_<h$k$H$-!"(B
$B?75,:n@.$J$i$P$I$s$J%U%!%$%kL>$G$b5v$5$l$k!#(B
$B<e$$Jd40$G$O!"(B@key{RET}$B$O%_%K%P%C%U%!$N%F%-%9%H$rJd40$9$k$3$H$J$/!"(B
$B$=$N$^$^<uM}$9$k!#(B
@end itemize

@c   The completion commands display a list of all possible completions in
@c a window whenever there is more than one possibility for the very next
@c character.  Also, typing @kbd{?} explicitly requests such a list.  If
@c the list of completions is long, you can scroll it with @kbd{C-M-v}
@c (@pxref{Other Window}).
$BJd40%3%^%s%I$O!"$D$.$K$/$kJ8;z$H$7$FJ#?t$N2DG=@-$,$"$k>l9g!"(B
$BJd402DG=$JA48uJd0lMw$r%&%#%s%I%&$KI=<($7$^$9!#(B
$B$^$?!"(B@kbd{?}$B$HBG$F$P!"$3$N$h$&$J0lMw$rI=<($G$-$^$9!#(B
$BJd408uJd0lMw$,D9$$$H$-$K$O!"(B
@kbd{C-M-v}$B$G%9%/%m!<%k$G$-$^$9!J(B@pxref{Other Window}$B!K!#(B

@node Completion Options
@c @subsection Completion Options
@subsection $BJd40$N%*%W%7%g%s(B

@vindex completion-ignored-extensions
@c   When completion is done on file names, certain file names are usually
@c ignored.  The variable @code{completion-ignored-extensions} contains a
@c list of strings; a file whose name ends in any of those strings is
@c ignored as a possible completion.  The standard value of this variable
@c has several elements including @code{".o"}, @code{".elc"}, @code{".dvi"}
@c and @code{"~"}.  The effect is that, for example, @samp{foo} can
@c complete to @samp{foo.c} even though @samp{foo.o} exists as well.
@c However, if @emph{all} the possible completions end in ``ignored''
@c strings, then they are not ignored.  Ignored extensions do not apply to
@c lists of completions---those always mention all possible completions.
$B%U%!%$%kL>$NJd40$r9T$&>lLL$G$O!"$"$k<o$N%U%!%$%kL>$rDL>oL5;k$7$^$9!#(B
$BJQ?t(B@code{completion-ignored-extensions}$B$O!"J8;zNs$N%j%9%H$rJ];}$7$^$9!#(B
$B$3$l$i$NJ8;zNs$N(B1$B$D$G=*$kL>A0$N%U%!%$%k$O!"Jd408uJd$H$7$F$OL5;k$7$^$9!#(B
$B$3$NJQ?t$NI8=`CM$K$O!"(B@code{".o"}$B!"(B@code{".elc"}$B!"(B@code{".dvi"}$B!"(B
@code{"~"}$B$,4^$^$l$^$9!#(B
$B$3$N8z2L$O!"$?$H$($P!"(B@samp{foo}$B$O!"(B@samp{foo.o}$B$,B8:_$7$?$H$7$F$b!"(B
@samp{foo.c}$B$KJd40$5$l$^$9!#(B
$B$?$@$7!"Jd408uJd$N(B@emph{$B$9$Y$F(B}$B$,L5;k$9$Y$-J8;zNs$G=*$k$b$N$G$"$k>l9g$K$O!"(B
$B$3$l$i$N8uJd$rL5;k$7$^$;$s!#(B
$BL5;k$7$?3HD%;R$r;}$D$b$N$,Jd408uJd0lMw$KF~$k$3$H$O$"$j$^$;$s!#(B
$B0lMw$K$O$D$M$KJd402DG=$J8uJd$N$9$Y$F$rI=<($7$^$9!#(B

@vindex completion-auto-help
@c   Normally, a completion command that finds the next character is undetermined
@c automatically displays a list of all possible completions.  If the variable
@c @code{completion-auto-help} is set to @code{nil}, this does not happen,
@c and you must type @kbd{?} to display the possible completions.
$BDL>o!"Jd40%3%^%s%I$O!"$D$.$K$/$kJ8;z$r<+F0E*$K7hDj$G$-$J$$>l9g$K$O!"(B
$B$9$Y$F$NJd408uJd0lMw$rI=<($7$^$9!#(B
$BJQ?t(B@code{completion-auto-help}$B$K(B@code{nil}$B$,@_Dj$5$l$F$$$k$H!"(B
$B0lMw$rI=<($7$^$;$s!#(B
$BJd408uJd$rI=<($9$k$K$O!"(B@kbd{?}$B$rBG$DI,MW$,$"$j$^$9!#(B

@pindex complete
@c   The @code{complete} library implements a more powerful kind of
@c completion that can complete multiple words at a time.  For example, it
@c can complete the command name abbreviation @code{p-b} into
@c @code{print-buffer}, because no other command starts with two words
@c whose initials are @samp{p} and @samp{b}.  To use this library, put
@c @code{(load "complete")} in your @file{~/.emacs} file (@pxref{Init
@c File}).
@code{complete}$B%i%$%V%i%j$O!"(B
$B0lEY$KJ#?t$NC18l$rJd40$G$-$k!"$h$j6/NO$JJd405!G=$rDs6!$7$^$9!#(B
$B$?$H$($P!"(B@code{p-b}$B$H>JN,$5$l$?%3%^%s%IL>$r(B
@code{print-buffer}$B$HJd40$G$-$^$9!#(B
$B$H$$$&$N$O!"F,J8;z$,(B@samp{p}$B$H(B@samp{b}$B$G$"$k(B2$B$D$NC18l$G(B
$B;O$^$k%3%^%s%I$,B>$K$O$J$$$+$i$G$9!#(B
$B$3$N%i%$%V%i%j$r;H$&$K$O!"8D?M$N(B@file{~/.emacs}$B%U%!%$%k$K(B
@code{(load "complete")}$B$rF~$l$F$*$-$^$9!J(B@pxref{Init File}$B!K!#(B

@c @cindex Icomplete mode
@cindex $BJd40<(:6%b!<%I!J(BIcomplete mode$B!K(B
@cindex $B%b!<%I!"(BIcomplete
@c   Icomplete mode presents a constantly-updated display that tells you
@c what completions are available for the text you've entered so far.  The
@c command to enable or disable this minor mode is @kbd{M-x
@c icomplete-mode}.
$BJd40<(:6!J(Bicomplete$B!K%b!<%I$G$O!"(B
$B$=$l$^$G$KF~NO$7$?%F%-%9%H$+$iJd40$G$-$k$b$N$r>o;~99?7$7$FI=<($7$^$9!#(B
$B$3$N%^%$%J%b!<%I$r%*%s!?%*%U$9$k%3%^%s%I$O(B@kbd{M-x icomplete-mode}$B$G$9!#(B

@node Minibuffer History
@c @section Minibuffer History
@section $B%_%K%P%C%U%!MzNr(B
@c @cindex minibuffer history
@c @cindex history of minibuffer input
@cindex $B%_%K%P%C%U%!MzNr(B
@cindex $B%_%K%P%C%U%!F~NOMzNr(B
@cindex $BMzNr!"%_%K%P%C%U%!F~NO(B

@c   Every argument that you enter with the minibuffer is saved on a
@c @dfn{minibuffer history list} so that you can use it again later in
@c another argument.  Special commands load the text of an earlier argument
@c in the minibuffer.  They discard the old minibuffer contents, so you can
@c think of them as moving through the history of previous arguments.
$B%_%K%P%C%U%!$GF~NO$7$?0z?t$O$9$Y$F(B@dfn{$B%_%K%P%C%U%!MzNr%j%9%H(B}
$B!J(Bminibuffer history list$B!K$KJ]B8$5$l!"(B
$B$"$H$GJL$N0z?tCf$G;H$&$3$H$,$G$-$^$9!#(B
$BFCJL$N%3%^%s%I$G!"0JA0$K;H$C$?0z?t$N%F%-%9%H$r%_%K%P%C%U%!$KF~$l$^$9!#(B
$B$3$l$i$O!"%_%K%P%C%U%!$N8E$$FbMF$rGK4~$9$k$N$G!"(B
$B2a5n$N0z?t$NMzNr$NCf$rF0$-2v$C$F$$$k$H9M$($k$3$H$,$G$-$^$9!#(B

@table @kbd
@item @key{UP}
@itemx M-p
@c Move to the next earlier argument string saved in the minibuffer history
@c (@code{previous-history-element}).
$B%_%K%P%C%U%!MzNrCf$N(B1$B$D$^$(!J8E$$!K$N0z?tJ8;zNs$K0\F0$9$k(B
$B!J(B@code{previous-history-element}$B!K!#(B
@item @key{DOWN}
@itemx M-n
@c Move to the next later argument string saved in the minibuffer history
@c (@code{next-history-element}).
$B%_%K%P%C%U%!MzNrCf$N(B1$B$D$D$.!J?7$7$$!K$N0z?tJ8;zNs$K0\F0$9$k(B
$B!J(B@code{next-history-element}$B!K!#(B
@item M-r @var{regexp} @key{RET}
@c Move to an earlier saved argument in the minibuffer history that has a
@c match for @var{regexp} (@code{previous-matching-history-element}).
$B%_%K%P%C%U%!MzNrCf$N0z?tJ8;zNs$r8E$$$[$&$XAL$C$F(B
@var{regexp}$B$K0lCW$9$k$b$N$K0\F0$9$k(B
$B!J(B@code{previous-matching-history-element}$B!K!#(B
@item M-s @var{regexp} @key{RET}
@c Move to a later saved argument in the minibuffer history that has a
@c match for @var{regexp} (@code{next-matching-history-element}).
$B%_%K%P%C%U%!MzNrCf$N0z?tJ8;zNs$r?7$7$$$[$&$XC)$C$F(B
@var{regexp}$B$K0lCW$9$k$b$N$K0\F0$9$k(B
$B!J(B@code{next-matching-history-element}$B!K!#(B
@end table

@c @kindex M-p @r{(minibuffer history)}
@c @kindex M-n @r{(minibuffer history)}
@kindex M-p @r{$B!J%_%K%P%C%U%!MzNr!K(B}
@kindex M-n @r{$B!J%_%K%P%C%U%!MzNr!K(B}
@findex next-history-element
@findex previous-history-element
@c   The simplest way to reuse the saved arguments in the history list is
@c to move through the history list one element at a time.  While in the
@c minibuffer, use @kbd{M-p} or up-arrow (@code{previous-history-element})
@c to ``move to'' the next earlier minibuffer input, and use @kbd{M-n} or
@c down-arrow (@code{next-history-element}) to ``move to'' the next later
@c input.
$BMzNr%j%9%H$KJ]B8$5$l$F$$$k0z?t$r:FMxMQ$9$k$b$C$H$b4JC1$JJ}K!$O!"(B
$BMzNr%j%9%H$NCf$r(B1$B$D(B1$B$D0\F0$7$F$$$/$3$H$G$9!#(B
$B%_%K%P%C%U%!$NCf$G$O!"(B1$B$D$^$(!J8E$$!K$N%_%K%P%C%U%!$NF~NOFbMF$K(B
$B!X0\F0$9$k!Y$K$O(B@kbd{M-p}$B!J(B@code{previous-history-element}$B!K$r!"(B
1$B$D$"$H!J?7$7$$!K$NF~NOFbMF$K0\F0$9$k$K$O(B
@kbd{M-n}$B!J(B@code{next-history-element}$B!K$rBG$A$^$9!#(B

@c   The previous input that you fetch from the history entirely replaces
@c the contents of the minibuffer.  To use it as the argument, exit the
@c minibuffer as usual with @key{RET}.  You can also edit the text before
@c you reuse it; this does not change the history element that you
@c ``moved'' to, but your new argument does go at the end of the history
@c list in its own right.
$B%_%K%P%C%U%!$NFbMF$O!"MzNr$+$i;}$C$F$-$?0JA0$NF~NOFbMF$G40A4$K(B
$BCV$-49$($i$l$^$9!#(B
$B$3$NFbMF$r0z?t$H$7$F;H$&$K$O!"(B
$BDL>o$HF1$8$h$&$K(B@key{RET}$B$G%_%K%P%C%U%!$rH4$1$^$9!#(B
$B0z?t$H$7$F:F;HMQ$9$k$^$($K!"%F%-%9%H$rJT=8$7$F$b$+$^$$$^$;$s!#(B
$BJT=8$7$F$b%_%K%P%C%U%!$K!X;}$C$F$-$?!YMzNr$N$b$H$b$H$NMWAG$OJQ99$5$l$^$;$s!#(B
$B$?$@$7!"EvA3!"?7$7$$0z?t$OMzNr%j%9%H$N:G8e$KDI2C$5$l$^$9!#(B

@c   For many minibuffer arguments there is a ``default'' value.  In some
@c cases, the minibuffer history commands know the default value.  Then you
@c can insert the default value into the minibuffer as text by using
@c @kbd{M-n} to move ``into the future'' in the history.  Eventually we
@c hope to make this feature available whenever the minibuffer has a
@c default value.
$BB?$/$N%_%K%P%C%U%!0z?t$K$O!"%G%U%)%k%HCM$,$"$j$^$9!#(B
$B%_%K%P%C%U%!MzNrA`:n%3%^%s%I$,!"(B
$B$3$l$i$N%G%U%)%k%HCM$rCN$C$F$$$k>l9g$b$"$j$^$9!#(B
$B$=$N>l9g!"(B@kbd{M-n}$B$GMzNrCf$N!XL$Mh!Y$X0\F0$9$k(B
@footnote{$B!ZLuCm![MzNr$H$7$F;D$C$F$$$kJ8;zNs%G!<%?$N(B
$B:G8eHx$h$j$5$i$K@h$K0\F0$9$k$3$H!#(B}
$B$3$H$G!"$3$N%G%U%)%k%HCM$r%F%-%9%H$H$7$F%_%K%P%C%U%!$KA^F~$G$-$^$9!#(B
$B>-MhE*$K$O!"%_%K%P%C%U%!$K%G%U%)%k%HCM$,$"$k>l9g$K$O!"(B
$B$D$M$K$3$N5!G=$rMxMQ$G$-$k$h$&$K$7$?$$$H9M$($F$$$^$9!#(B

@findex previous-matching-history-element
@findex next-matching-history-element
@c @kindex M-r @r{(minibuffer history)}
@c @kindex M-s @r{(minibuffer history)}
@kindex M-r @r{$B!J%_%K%P%C%U%!MzNr!K(B}
@kindex M-s @r{$B!J%_%K%P%C%U%!MzNr!K(B}
@c   There are also commands to search forward or backward through the
@c history; they search for history elements that match a regular
@c expression that you specify with the minibuffer.  @kbd{M-r}
@c (@code{previous-matching-history-element}) searches older elements in
@c the history, while @kbd{M-s} (@code{next-matching-history-element})
@c searches newer elements.  By special dispensation, these commands can
@c use the minibuffer to read their arguments even though you are already
@c in the minibuffer when you issue them.  As with incremental searching,
@c an uppercase letter in the regular expression makes the search
@c case-sensitive (@pxref{Search Case}).
$BMzNr$NCf$rA08~$-$d8e8~$-$KC5:w$9$k%3%^%s%I$b$"$j$^$9!#(B
$B$3$l$i$N%3%^%s%I$O!"%_%K%P%C%U%!$G;XDj$7$?@55,I=8=$K(B
$B0lCW$9$kMzNrMWAG$rC5:w$7$^$9!#(B
@kbd{M-r}$B!J(B@code{previous-matching-history-element}$B!K$O!"(B
$BMzNr$N$h$j8E$$MWAG$rC5$7$^$9!#(B
$B0lJ}!"(B@kbd{M-s}$B!J(B@code{next-matching-history-element}$B!K$O!"(B
$B$h$j?7$7$$MWAG$rC5$7$^$9!#(B
$BFCNc$J$N$G$9$,!"(B
$B$3$l$i$N%3%^%s%I$O!"%3%^%s%I$r8F$S=P$9;~E@$G(B
$B$9$G$K%_%K%P%C%U%!$KF~$C$F$$$k$K$b4X$o$i$:!"(B
$B%_%K%P%C%U%!$+$i0z?t$rFI$_<h$j$^$9!#(B
$B%$%s%/%j%a%s%?%k%5!<%A$N>l9g$HF1MM$K!"(B
$B@55,I=8=$KBgJ8;z$r;H$&$H!"BgJ8;z>.J8;z$r6hJL$7$FC5:w$7$^$9(B
$B!J(B@pxref{Search Case}$B!K!#(B

@ignore
  We may change the precise way these commands read their arguments.
Perhaps they will search for a match for the string given so far in the
minibuffer; perhaps they will search for a literal match rather than a
regular expression match; perhaps they will only accept matches at the
beginning of a history element; perhaps they will read the string to
search for incrementally like @kbd{C-s}.  To find out what interface is
actually available, type @kbd{C-h f previous-matching-history-element}.
@end ignore

@c   All uses of the minibuffer record your input on a history list, but
@c there are separate history lists for different kinds of arguments.  For
@c example, there is a list for file names, used by all the commands that
@c read file names.  (As a special feature, this history list records
@c the absolute file name, no more and no less, even if that is not how
@c you entered the file name.)
$B%_%K%P%C%U%!$r;H$($PF~NO$OI,$:MzNr%j%9%H$K5-O?$5$l$^$9$,!"(B
$B0z?t$N<oN`$4$H$KJL!9$NMzNr%j%9%H$,$"$j$^$9!#(B
$B$?$H$($P!"%U%!%$%kL>$K4X$9$kMzNr%j%9%H$O!"(B
$B%U%!%$%kL>$rFI$_<h$k$9$Y$F$N%3%^%s%I$G;H$o$l$^$9!#(B
$B!JFCJL$J5!G=$H$7$F!"$3$NMzNr%j%9%H$K$O!"(B
$B@dBP%U%!%$%kL>$rF~NO$7$J$/$F$b@dBP%U%!%$%kL>$,5-O?$5$l$k!#!K(B

@c   There are several other very specific history lists, including one for
@c command names read by @kbd{M-x}, one for buffer names, one for arguments
@c of commands like @code{query-replace}, and one for compilation commands
@c read by @code{compile}.  Finally, there is one ``miscellaneous'' history
@c list that most minibuffer arguments use.
$BFCDjL\E*MQ$NMzNr%j%9%H$,$$$/$D$+$"$j$^$9!#(B
@kbd{M-x}$B$,FI$`%3%^%s%IL>MQ!"%P%C%U%!L>MQ!"(B
@code{query-replace}$B$N$h$&$J%3%^%s%I$N0z?tMQ!"(B
@code{compile}$B$,FI$`%3%s%Q%$%k%3%^%s%IMQ$J$I$G$9!#(B
$B$5$i$K!"$[$H$s$I$N%_%K%P%C%U%!0z?t$,MxMQ$9$k(B
$B!X$=$NB>!Y$NMzNr%j%9%H$b(B1$B$D$"$j$^$9!#(B

@vindex history-length
@c   The variable @code{history-length} specifies the maximum length of a
@c minibuffer history list; once a list gets that long, the oldest element
@c is deleted each time an element is added.  If the value of
@c @code{history-length} is @code{t}, though, there is no maximum length
@c and elements are never deleted.
$BJQ?t(B@code{history-length}$B$O!"%_%K%P%C%U%!MzNr%j%9%H$N:GBgD9$r;XDj$7$^$9!#(B
$BMzNr%j%9%H$,@_Dj$5$l$?D9$5$KC#$9$k$H!"(B
$B$=$N$"$H$O!"?7$7$$MWAG$rDI2C$9$k$?$S$K:G8E$NMWAG$r:o=|$7$^$9!#(B
$B$?$@$7!"JQ?t(B@code{history-length}$B$NCM$,(B@code{t}$B$G$"$k$H!"(B
$BD9$5$N@)8B$O$J$/$J$jMWAG$r:o=|$7$^$;$s!#(B

@node Repetition
@c @section Repeating Minibuffer Commands
@section $B%_%K%P%C%U%!%3%^%s%I$N7+$jJV$7(B
@c @cindex command history
@c @cindex history of commands
@cindex $B%3%^%s%IMzNr(B
@cindex $BMzNr!"%3%^%s%I(B

@c   Every command that uses the minibuffer at least once is recorded on a
@c special history list, together with the values of its arguments, so that
@c you can repeat the entire command.  In particular, every use of
@c @kbd{M-x} is recorded there, since @kbd{M-x} uses the minibuffer to read
@c the command name.
$B%_%K%P%C%U%!$r>/$J$/$H$b(B1$B2s;H$C$?%3%^%s%I$O!"(B
$B$=$N0z?t$NCM$H$H$b$K$9$Y$FFCJL$JMzNr%j%9%H$K5-O?$5$l$^$9$+$i!"(B
$B%3%^%s%IA4BN$r7+$jJV$9$3$H$,$G$-$^$9!#(B
$BFC$K!"(B@kbd{M-x}$B$O%3%^%s%IL>$rFI$_<h$k$?$a$K%_%K%P%C%U%!$r;H$&$N$G!"(B
$BI,$:MzNr$K5-O?$5$l$^$9!#(B

@findex list-command-history
@c widecommands
@table @kbd
@item C-x @key{ESC} @key{ESC}
@c Re-execute a recent minibuffer command (@code{repeat-complex-command}).
$B:G6a$N%_%K%P%C%U%!%3%^%s%I$r:F<B9T$9$k!J(B@code{repeat-complex-command}$B!K!#(B
@item M-x list-command-history
@c Display the entire command history, showing all the commands
@c @kbd{C-x @key{ESC} @key{ESC}} can repeat, most recent first.
@kbd{C-x @key{ESC} @key{ESC}}$B$G7+$jJV$;$k$9$Y$F$N%3%^%s%I$r(B
$B?7$7$$$b$N$+$i=g$KJB$Y$?%3%^%s%IMzNrA4BN$rI=<($9$k!#(B
@end table

@kindex C-x ESC ESC
@findex repeat-complex-command
@c   @kbd{C-x @key{ESC} @key{ESC}} is used to re-execute a recent
@c minibuffer-using command.  With no argument, it repeats the last such
@c command.  A numeric argument specifies which command to repeat; one
@c means the last one, and larger numbers specify earlier ones.
@kbd{C-x @key{ESC} @key{ESC}}$B$O!"(B
$B%_%K%P%C%U%!$rMxMQ$7$?:G6a$N%3%^%s%I$r:FEY<B9T$7$^$9!#(B
$B0z?t$r;XDj$7$J$1$l$P!"$=$N$h$&$J:G8e$N%3%^%s%I$r7+$jJV$7$^$9!#(B
$B?t0z?t$O!"$I$N%3%^%s%I$r7+$jJV$9$+$r;XDj$7$^$9!#(B
1$B$O:G8e$N%3%^%s%I$r;X$7!"Bg$-$$?t$[$I$h$j0JA0$N%3%^%s%I$r;X$7$^$9!#(B

@c   @kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command
@c into a Lisp expression and then entering a minibuffer initialized with
@c the text for that expression.  If you type just @key{RET}, the command
@c is repeated as before.  You can also change the command by editing the
@c Lisp expression.  Whatever expression you finally submit is what will be
@c executed.  The repeated command is added to the front of the command
@c history unless it is identical to the most recently executed command
@c already there.
@kbd{C-x @key{ESC} @key{ESC}}$B$O!"2a5n$N%3%^%s%I$r(BLisp$B<0$KJQ49$7!"(B
$B$=$N<0$N%F%-%9%H$G=i4|2=$7$?%_%K%P%C%U%!$KF~$j$^$9!#(B
@key{RET}$B$@$1$rBG$F$P!"%3%^%s%I$O0JA0$H$^$C$?$/F1MM$K7+$jJV$5$l$^$9!#(B
Lisp$B<0$rJT=8$7$F%3%^%s%I$rJQ99$7$F$b$+$^$$$^$;$s!#(B
$B:G=*E*$J<0$,2?$G$"$l!"$=$N<0$r<B9T$7$^$9!#(B
$B7+$jJV$7$?%3%^%s%I$O!"(B
$BMzNr%j%9%HFb$K4{B8$N:G8e$K<B9T$7$?%3%^%s%I$HF10l$G$J$$8B$j!"(B
$B%3%^%s%IMzNr$N@hF,$KDI2C$5$l$^$9!#(B

@c   Even if you don't understand Lisp syntax, it will probably be obvious
@c which command is displayed for repetition.  If you do not change the
@c text, it will repeat exactly as before.
Lisp$B9=J8$,M}2r$G$-$J$$$H$7$F$b!"(B
$B7+$jJV$7$N$?$a$K$I$N%3%^%s%I$,I=<($5$l$?$+!"$?$V$s$o$+$k$G$7$g$&!#(B
$B%F%-%9%H$rJQ99$7$J$1$l$P!"0JA0$H$^$C$?$/F1$8$K7+$jJV$5$l$^$9!#(B

@c   Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you can
@c use the minibuffer history commands (@kbd{M-p}, @kbd{M-n}, @kbd{M-r},
@c @kbd{M-s}; @pxref{Minibuffer History}) to move through the history list
@c of saved entire commands.  After finding the desired previous command,
@c you can edit its expression as usual and then resubmit it by typing
@c @key{RET} as usual.
@kbd{C-x @key{ESC} @key{ESC}}$B$G$$$C$?$s%_%K%P%C%U%!$KF~$C$F$7$^$($P!"(B
$B%_%K%P%C%U%!MzNr%j%9%H%3%^%s%I(B
$B!J(B@kbd{M-p}$B!"(B@kbd{M-n}$B!"(B@kbd{M-r}$B!"(B@kbd{M-s}$B!"(B@pxref{Minibuffer History}$B!K(B
$B$r;H$C$F!"J]B8$5$l$?$9$Y$F$N%3%^%s%I$NMzNr%j%9%H$NCf$rF0$-2v$l$^$9!#(B
$BL\E*$N%3%^%s%I$rA\$7$"$F$?$i!"DL>o$NJ}K!$G$=$N<0$rJT=8$G$-$^$9$7!"(B
$B$3$l$bDL>o$HF1$8$h$&$K(B@key{RET}$B$rBG$F$P<B9T$G$-$^$9!#(B

@vindex command-history
@c   The list of previous minibuffer-using commands is stored as a Lisp
@c list in the variable @code{command-history}.  Each element is a Lisp
@c expression which describes one command and its arguments.  Lisp programs
@c can re-execute a command by calling @code{eval} with the
@c @code{command-history} element.
$B%_%K%P%C%U%!$r;H$C$?2a5n$N%3%^%s%I0lMw$O!"(B
Lisp$B$N%j%9%H$H$7$FJQ?t(B@code{command-history}$B$K3JG<$5$l$^$9!#(B
$B3FMWAG$O$=$l$>$l(B1$B$D$N%3%^%s%I$H$=$N0z?t$rI=$9(BLisp$B<0$G$9!#(B
Lisp$B%W%m%0%i%`$+$i$O!"(B
@code{command-history}$B$NMWAG$r0z?t$H$7$F(B
@code{eval}$B$r8F$Y$P%3%^%s%I$r:F<B9T$G$-$^$9!#(B