File: m-x.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 (129 lines) | stat: -rw-r--r-- 6,520 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
@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 =============================================================
@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 M-x, Help, Minibuffer, Top
@c @chapter Running Commands by Name
@chapter $BL>A0$G%3%^%s%I$r<B9T$9$kJ}K!(B

@c   The Emacs commands that are used often or that must be quick to type are
@c bound to keys---short sequences of characters---for convenient use.  Other
@c Emacs commands that do not need to be brief are not bound to keys; to run
@c them, you must refer to them by name.
$B;HMQIQEY$N9b$$%3%^%s%I$dAGAa$$BG80$,I,MW$J(BEmacs$B%3%^%s%I$O!"(B
$B;H$$>!<j$r$h$/$9$k$?$a$K!"%-!<!JJ8;z$NC;$$Ns!K$K%P%$%s%I$7$F$"$j$^$9!#(B
$BC;=L$9$kI,MW$N$J$$$=$NB>$N(BEmacs$B%3%^%s%I$O%-!<$K%P%$%s%I$7$F$"$j$^$;$s!#(B
$B$3$l$i$N%3%^%s%I$r<B9T$9$k$K$O!"%3%^%s%IL>$r;H$&I,MW$,$"$j$^$9!#(B

@c   A command name is, by convention, made up of one or more words,
@c separated by hyphens; for example, @code{auto-fill-mode} or
@c @code{manual-entry}.  The use of English words makes the command name
@c easier to remember than a key made up of obscure characters, even though
@c it is more characters to type.
$B47=,$H$7$F!"%3%^%s%IL>$O(B1$BC18l$+%O%$%U%s$G6h@Z$C$?(B2$B8l0J>e$NC18l$G$9!#(B
$B$?$H$($P!"(B@code{auto-fill-mode}$B$d(B@code{manual-entry}$B$G$9!#(B
$B$?$H$(BG80J8;z?t$,B?$/$J$C$?$H$7$F$b!"(B
$B!J0U?^$,!KITL@NF$JJ8;z?t8D$r%-!<$H$7$F;H$&$h$j$b!"(B
$B1QC18l$r%3%^%s%IL>$H$7$F;H$&$[$&$,3P$($d$9$$$N$G$9!#(B

@kindex M-x
@c   The way to run a command by name is to start with @kbd{M-x}, type the
@c command name, and finish it with @key{RET}.  @kbd{M-x} uses the
@c minibuffer to read the command name.  @key{RET} exits the minibuffer and
@c runs the command.  The string @samp{M-x} appears at the beginning of the
@c minibuffer as a @dfn{prompt} to remind you to enter the name of a
@c command to be run.  @xref{Minibuffer}, for full information on the
@c features of the minibuffer.
$B%3%^%s%I$r$=$NL>A0$G<B9T$9$k$K$O!"(B@kbd{M-x}$B$G;O$a$F!"(B
$B%3%^%s%IL>$rBG$A9~$_!"(B@key{RET}$B$G=*$($^$9!#(B
@kbd{M-x}$B$O!"%3%^%s%IL>$rFI$`$?$a$K%_%K%P%C%U%!$r;H$$$^$9!#(B
@key{RET}$B%-!<$O%_%K%P%C%U%!$rH4$1$F%3%^%s%I$r<B9T$7$^$9!#(B
$B$3$N$H$-!"(B@dfn{$B%W%m%s%W%H(B}$B$H$7$FJ8;zNs(B@samp{M-x}$B$r(B
$B%_%K%P%C%U%!$N@hF,$KI=<($7$F!"(B
$B<B9T$9$k%3%^%s%IL>$rF~NO$7$J$1$l$P$J$i$J$$$3$H$r%f!<%6!<$K<($7$^$9!#(B
$B%_%K%P%C%U%!$N>\:Y$K$D$$$F$O!"(B@xref{Minibuffer}$B!#(B

@c   You can use completion to enter the command name.  For example, the
@c command @code{forward-char} can be invoked by name by typing
$B%3%^%s%IL>$NF~NO$K$O!"Jd40$r;H$($^$9!#(B
$B$?$H$($P!"$D$.$N$h$&$KBG$C$F!"(B
$B%3%^%s%I(B@code{forward-char}$B$r5/F0$G$-$^$9!#(B

@example
M-x forward-char @key{RET}
@end example

@noindent
@c or
$B$"$k$$$O!"(B

@example
M-x forw @key{TAB} c @key{RET}
@end example

@noindent
@c Note that @code{forward-char} is the same command that you invoke with
@c the key @kbd{C-f}.  You can run any Emacs command by name using
@c @kbd{M-x}, whether or not any keys are bound to it.
$B$H$7$^$9!#(B
$B$3$3$G!"(B@code{forward-char}$B$O!"(B
@kbd{C-f}$B%-!<$G5/F0$5$l$k%3%^%s%I$HF1$8$G$9!#(B
$B%3%^%s%I$,%-!<$K%P%$%s%I$7$F$"$k$+$I$&$+$K4X$o$i$:!"(B
@kbd{M-x}$B$G$9$Y$F$N(BEmacs$B%3%^%s%I$rL>A0$G5/F0$G$-$^$9!#(B

@c   If you type @kbd{C-g} while the command name is being read, you cancel
@c the @kbd{M-x} command and get out of the minibuffer, ending up at top level.
$B%3%^%s%IL>$rF~NOCf$K(B@kbd{C-g}$B$rBG$D$H!"(B
@kbd{M-x}$B%3%^%s%I$r<h$j>C$7$F%_%K%P%C%U%!$+$iH4$1=P$7!"(B
$B:G=*E*$K$O%H%C%W%l%Y%k$KLa$j$^$9!#(B

@c   To pass a numeric argument to the command you are invoking with
@c @kbd{M-x}, specify the numeric argument before the @kbd{M-x}.  @kbd{M-x}
@c passes the argument along to the command it runs.  The argument value
@c appears in the prompt while the command name is being read.
@kbd{M-x}$B$G5/F0$9$k%3%^%s%I$K?t0z?t$rEO$9$K$O!"(B
@kbd{M-x}$B$rBG$D$^$($K!"?t0z?t$r;XDj$7$^$9!#(B
@kbd{M-x}$B$O!"<B9T$9$k4X?t$K0z?t$rEO$7$^$9!#(B
$B0z?t$NCM$O!"%3%^%s%IL>$rFI$_9~$s$G$$$k$"$$$@!"%W%m%s%W%H$KI=<($5$l$^$9!#(B

@vindex suggest-key-bindings
@c   If the command you type has a key binding of its own, Emacs mentions
@c this in the echo area, two seconds after the command finishes (if you
@c don't type anything else first).  For example, if you type @kbd{M-x
@c forward-word}, the message says that you can run the same command more
@c easily by typing @kbd{M-f}.  You can turn off these messages by setting
@c @code{suggest-key-bindings} to @code{nil}.
$BF~NO$7$?%3%^%s%I$K@lMQ$N%-!<%P%$%s%I$,$"$k>l9g$K$O!"(B
Emacs$B$O$=$N;]%(%3!<NN0h$KI=<($7$^$9!#(B
$B$3$NI=<($O!"%3%^%s%I$N<B9T$,=*N;$7$?$"$H!"(B2$BIC4VI=<($5$l$^$9(B
$B!J$9$0$K2?$+$rBG$F$P!"$3$N8B$j$G$O$J$$!K!#(B
$B$?$H$($P!"%3%^%s%I(B@kbd{M-x forward-word}$B$rF~NO$7$?>l9g!"(B
@kbd{M-f}$B$HBG$C$?$[$&$,4JC1$KF1$8%3%^%s%I$r<B9T$G$-$k$H$$$&0UL#$N(B
$B%a%C%;!<%8$,I=<($5$l$^$9!#(B
@code{suggest-key-bindings}$B$K(B@code{nil}$B$r@_Dj$9$l$P!"(B
$B$3$l$i$N%a%C%;!<%8I=<($r%*%U$K$G$-$^$9!#(B

@c   Normally, when describing in this manual a command that is run by
@c name, we omit the @key{RET} that is needed to terminate the name.  Thus
@c we might speak of @kbd{M-x auto-fill-mode} rather than @kbd{M-x
@c auto-fill-mode @key{RET}}.  We mention the @key{RET} only when there is
@c a need to emphasize its presence, such as when we show the command
@c together with following arguments.
$BK\=q$G$O!"L>A0$G<B9T$9$k%3%^%s%I$N@bL@$K$*$$$F!"(B
$BL>A0$r=*$($k$?$a$KI,MW$J(B@key{RET}$B$r>JN,$7$^$9!#(B
$B$D$^$j!"(B@kbd{M-x auto-fill-mode @key{RET}}$B$G$O$J$/!"(B
@kbd{M-x auto-fill-mode}$B$H$7$^$9!#(B
$B%3%^%s%IL>$KB3$/0z?t$b<($9>l9g$N$h$&$K!"(B
@key{RET}$B$,I,MW$J$3$H$r6/D4$9$k>l9g$K$N$_!"(B
@key{RET}$B$r=q$-$^$9!#(B

@findex execute-extended-command
@c   @kbd{M-x} works by running the command
@c @code{execute-extended-command}, which is responsible for reading the
@c name of another command and invoking it.
@kbd{M-x}$B$O!"(B@code{execute-extended-command}$B$r<B9T$9$k$3$H$GF0:n$7$^$9!#(B
@code{execute-extended-command}$B$O!"(B
$BB>$N%3%^%s%I$NL>A0$rFI$_<h$C$F!"$=$l$r<B9T$9$kLr3d$rC4$&%3%^%s%I$G$9!#(B