Don't use "print" for displaying a message.
This commit is contained in:
parent
6830ceb7d0
commit
1ba2ce6859
11 changed files with 43 additions and 42 deletions
|
@ -334,7 +334,7 @@ where it was before the command that made the change.
|
|||
Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
|
||||
earlier changes, back to the limit of the undo information available.
|
||||
If all recorded changes have already been undone, the undo command
|
||||
prints an error message and does nothing.
|
||||
displays an error message and does nothing.
|
||||
|
||||
Any command other than an undo command breaks the sequence of undo
|
||||
commands. Starting from that moment, the previous undo commands become
|
||||
|
@ -592,12 +592,13 @@ is relative to the accessible portion (@pxref{Narrowing}). By contrast,
|
|||
region and the line number relative to the whole buffer.
|
||||
|
||||
@kbd{M-x what-page} counts pages from the beginning of the file, and
|
||||
counts lines within the page, printing both numbers. @xref{Pages}.
|
||||
counts lines within the page, showing both numbers in the echo area.
|
||||
@xref{Pages}.
|
||||
|
||||
@kindex M-=
|
||||
@findex count-lines-region
|
||||
While on this subject, we might as well mention @kbd{M-=} (@code{count-lines-region}),
|
||||
which prints the number of lines in the region (@pxref{Mark}).
|
||||
which displays the number of lines in the region (@pxref{Mark}).
|
||||
@xref{Pages}, for the command @kbd{C-x l} which counts the lines in the
|
||||
current page.
|
||||
|
||||
|
@ -605,7 +606,7 @@ current page.
|
|||
@findex what-cursor-position
|
||||
The command @kbd{C-x =} (@code{what-cursor-position}) can be used to find out
|
||||
the column that the cursor is in, and other miscellaneous information about
|
||||
point. It prints a line in the echo area that looks like this:
|
||||
point. It displays a line in the echo area that looks like this:
|
||||
|
||||
@smallexample
|
||||
Char: c (0143, 99, 0x63) point=21044 of 26883(78%) column 53
|
||||
|
@ -633,7 +634,7 @@ percentage of the total size.
|
|||
columns from the left edge of the window.
|
||||
|
||||
If the buffer has been narrowed, making some of the text at the
|
||||
beginning and the end temporarily inaccessible, @kbd{C-x =} prints
|
||||
beginning and the end temporarily inaccessible, @kbd{C-x =} displays
|
||||
additional text describing the currently accessible range. For example, it
|
||||
might display this:
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ Display the number of days in the current region
|
|||
@kindex M-= @r{(Calendar mode)}
|
||||
@findex calendar-count-days-region
|
||||
To determine the number of days in the region, type @kbd{M-=}
|
||||
(@code{calendar-count-days-region}). The numbers of days printed is
|
||||
(@code{calendar-count-days-region}). The numbers of days shown is
|
||||
@emph{inclusive}; that is, it includes the days specified by mark and
|
||||
point.
|
||||
|
||||
|
@ -290,7 +290,7 @@ Exit from calendar (@code{exit-calendar}).
|
|||
@kindex p d @r{(Calendar mode)}
|
||||
@cindex day of year
|
||||
@findex calendar-print-day-of-year
|
||||
To print the number of days elapsed since the start of the year, or
|
||||
To display the number of days elapsed since the start of the year, or
|
||||
the number of days remaining in the year, type the @kbd{p d} command
|
||||
(@code{calendar-print-day-of-year}). This displays both of those
|
||||
numbers in the echo area. The number of days elapsed includes the
|
||||
|
|
|
@ -185,7 +185,7 @@ to run as if the display were a text-only terminal.
|
|||
Run Emacs in @dfn{batch mode}, which means that the text being edited is
|
||||
not displayed and the standard terminal interrupt characters such as
|
||||
@kbd{C-z} and @kbd{C-c} continue to have their normal effect. Emacs in
|
||||
batch mode outputs to @code{stderr} only what would normally be printed
|
||||
batch mode outputs to @code{stderr} only what would normally be displayed
|
||||
in the echo area under program control, and functions which would
|
||||
normally read from the minibuffer take their input from @code{stdin}.
|
||||
|
||||
|
|
|
@ -83,8 +83,8 @@ preference---other users editing the same file might not want the same
|
|||
minor modes you prefer.
|
||||
|
||||
The buffer-local minor modes include Abbrev mode, Auto Fill mode,
|
||||
Auto Save mode, Font-Lock mode, ISO Accents mode, Outline minor mode,
|
||||
Overwrite mode, and Binary Overwrite mode.
|
||||
Auto Save mode, Font-Lock mode, Glasses mode, ISO Accents mode,
|
||||
Outline minor mode, Overwrite mode, and Binary Overwrite mode.
|
||||
|
||||
Abbrev mode allows you to define abbreviations that automatically expand
|
||||
as you type them. For example, @samp{amd} might expand to @samp{abbrev
|
||||
|
@ -1176,7 +1176,7 @@ to execute the macro. The macro name is a Lisp symbol, and defining it in
|
|||
this way makes it a valid command name for calling with @kbd{M-x} or for
|
||||
binding a key to with @code{global-set-key} (@pxref{Keymaps}). If you
|
||||
specify a name that has a prior definition other than another keyboard
|
||||
macro, an error message is printed and nothing is changed.
|
||||
macro, an error message is shown and nothing is changed.
|
||||
|
||||
@findex insert-kbd-macro
|
||||
Once a macro has a command name, you can save its definition in a file.
|
||||
|
@ -1965,7 +1965,7 @@ command. Here is the Lisp program to do this:
|
|||
@end example
|
||||
|
||||
If the value of the @code{disabled} property is a string, that string
|
||||
is included in the message printed when the command is used:
|
||||
is included in the message displayed when the command is used:
|
||||
|
||||
@example
|
||||
(put 'delete-region 'disabled
|
||||
|
|
|
@ -75,7 +75,7 @@ would stand for the file name @file{/u/rms/gnu/new/foo}.
|
|||
|
||||
@findex cd
|
||||
@findex pwd
|
||||
The command @kbd{M-x pwd} prints the current buffer's default
|
||||
The command @kbd{M-x pwd} displays the current buffer's default
|
||||
directory, and the command @kbd{M-x cd} sets it (to a value read using
|
||||
the minibuffer). A buffer's default directory changes only when the
|
||||
@code{cd} command is used. A file-visiting buffer's default directory
|
||||
|
@ -218,16 +218,16 @@ in the echo area.
|
|||
another copy. It selects the existing buffer containing that file.
|
||||
However, before doing so, it checks that the file itself has not changed
|
||||
since you visited or saved it last. If the file has changed, a warning
|
||||
message is printed. @xref{Interlocking,,Simultaneous Editing}.
|
||||
message is shown. @xref{Interlocking,,Simultaneous Editing}.
|
||||
|
||||
@cindex maximum buffer size exceeded, error message
|
||||
Since Emacs reads the visited file in its entirety, files whose size
|
||||
is larger than the maximum Emacs buffer size (@pxref{Buffers}) cannot be
|
||||
visited; if you try, Emacs will print an error message saying that the
|
||||
visited; if you try, Emacs will display an error message saying that the
|
||||
maximum buffer size has been exceeded.
|
||||
|
||||
@cindex creating files
|
||||
What if you want to create a new file? Just visit it. Emacs prints
|
||||
What if you want to create a new file? Just visit it. Emacs displays
|
||||
@samp{(New file)} in the echo area, but in other respects behaves as if
|
||||
you had visited an existing empty file. If you make any changes and
|
||||
save them, the file is created.
|
||||
|
@ -748,7 +748,7 @@ date of the existing file on disk to verify that it has not changed since the
|
|||
file was last visited or saved. If the date does not match, it implies
|
||||
that changes were made in the file in some other way, and these changes are
|
||||
about to be lost if Emacs actually does save. To prevent this, Emacs
|
||||
prints a warning message and asks for confirmation before saving.
|
||||
displays a warning message and asks for confirmation before saving.
|
||||
Occasionally you will know why the file was changed and know that it does
|
||||
not matter; then you can answer @kbd{yes} and proceed. Otherwise, you should
|
||||
cancel the save with @kbd{C-g} and investigate the situation.
|
||||
|
@ -2642,7 +2642,7 @@ example of specifying a file name pattern:
|
|||
C-x C-d /u2/emacs/src/*.c @key{RET}
|
||||
@end example
|
||||
|
||||
Normally, @kbd{C-x C-d} prints a brief directory listing containing
|
||||
Normally, @kbd{C-x C-d} displays a brief directory listing containing
|
||||
just file names. A numeric argument (regardless of value) tells it to
|
||||
make a verbose listing including sizes, dates, and owners (like
|
||||
@samp{ls -l}).
|
||||
|
|
|
@ -352,7 +352,7 @@ tell it to. @xref{Bugs}.
|
|||
|
||||
@item Echo Area
|
||||
The echo area is the bottom line of the screen, used for echoing the
|
||||
arguments to commands, for asking questions, and printing brief messages
|
||||
arguments to commands, for asking questions, and showing brief messages
|
||||
(including error messages). The messages are stored in the buffer
|
||||
@samp{*Messages*} so you can review them later. @xref{Echo Area}.
|
||||
|
||||
|
@ -389,7 +389,7 @@ See `end of line.'
|
|||
An error occurs when an Emacs command cannot execute in the current
|
||||
circumstances. When an error occurs, execution of the command stops
|
||||
(unless the command has been programmed to do otherwise) and Emacs
|
||||
reports the error by printing an error message (q.v.@:). Type-ahead
|
||||
reports the error by displaying an error message (q.v.@:). Type-ahead
|
||||
is discarded. Then Emacs is ready to read another editing command.
|
||||
|
||||
@item Error Message
|
||||
|
@ -549,7 +549,7 @@ listings of text in Emacs buffers. @xref{Hardcopy}.
|
|||
command does. @xref{Help}.
|
||||
|
||||
@item Help Echo
|
||||
Help echo is a short message printed in the echo area when the mouse
|
||||
Help echo is a short message displayed in the echo area when the mouse
|
||||
pointer is located on portions of display that require some
|
||||
explanations. Emacs displays help echo for menu items, parts of the
|
||||
mode line, tool-bar buttons, etc. On graphics displays, the messages
|
||||
|
@ -894,7 +894,7 @@ The Emacs kill commands set the primary selection and the yank command
|
|||
uses the primary selection when appropriate. @xref{Killing}.
|
||||
|
||||
@item Prompt
|
||||
A prompt is text printed to ask the user for input. Displaying a prompt
|
||||
A prompt is text used to ask the user for input. Displaying a prompt
|
||||
is called prompting. Emacs prompts always appear in the echo area
|
||||
(q.v.@:). One kind of prompting happens when the minibuffer is used to
|
||||
read an argument (@pxref{Minibuffer}); the echoing which happens when
|
||||
|
|
|
@ -185,8 +185,8 @@ programming language you are editing (@code{info-lookup-symbol}).
|
|||
@findex describe-key-briefly
|
||||
The most basic @kbd{C-h} options are @kbd{C-h c}
|
||||
(@code{describe-key-briefly}) and @w{@kbd{C-h k}} (@code{describe-key}).
|
||||
@kbd{C-h c @var{key}} prints in the echo area the name of the command
|
||||
that @var{key} is bound to. For example, @kbd{C-h c C-f} prints
|
||||
@kbd{C-h c @var{key}} displays in the echo area the name of the command
|
||||
that @var{key} is bound to. For example, @kbd{C-h c C-f} displays
|
||||
@samp{forward-char}. Since command names are chosen to describe what
|
||||
the commands do, this is a good way to get a very brief description of
|
||||
what @var{key} does.
|
||||
|
@ -246,7 +246,7 @@ f} command, then go on editing.
|
|||
@kindex C-h w
|
||||
@findex where-is
|
||||
@kbd{C-h w @var{command} @key{RET}} tells you what keys are bound to
|
||||
@var{command}. It prints a list of the keys in the echo area. If it
|
||||
@var{command}. It displays a list of the keys in the echo area. If it
|
||||
says the command is not on any key, you must use @kbd{M-x} to run it.
|
||||
@kbd{C-h w} runs the command @code{where-is}.
|
||||
|
||||
|
@ -482,7 +482,7 @@ mode.
|
|||
@kindex C-h l
|
||||
@findex view-lossage
|
||||
If something surprising happens, and you are not sure what commands you
|
||||
typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} prints the last
|
||||
typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} displays the last
|
||||
100 command characters you typed in. If you see commands that you don't
|
||||
know, you can use @kbd{C-h c} to find out what they do.
|
||||
|
||||
|
@ -490,7 +490,7 @@ know, you can use @kbd{C-h c} to find out what they do.
|
|||
@findex describe-mode
|
||||
Emacs has numerous major modes, each of which redefines a few keys and
|
||||
makes a few other changes in how editing works. @kbd{C-h m}
|
||||
(@code{describe-mode}) prints documentation on the current major mode,
|
||||
(@code{describe-mode}) displays documentation on the current major mode,
|
||||
which normally describes all the commands that are changed in this
|
||||
mode.
|
||||
|
||||
|
@ -551,6 +551,6 @@ various situations with solutions or workarounds in many cases.
|
|||
When a region of text is ``active,'' so that you can select it with
|
||||
the mouse or a key like @kbd{RET}, it often has associated help text.
|
||||
Areas of the mode line are examples. This help will normally be
|
||||
printed in the echo area when you move point into the active text. In
|
||||
shown in the echo area when you move point into the active text. In
|
||||
a window system you can display the help text as a ``tooltip''
|
||||
(sometimes known as ``balloon help''). @xref{Tooltips}.
|
||||
|
|
|
@ -46,10 +46,10 @@ while. It comes back after a few seconds, or as soon as you type
|
|||
anything.
|
||||
|
||||
@item
|
||||
If in the minibuffer you use a command whose purpose is to print a
|
||||
message in the echo area, such as @kbd{C-x =}, the message is printed
|
||||
normally, and the minibuffer is hidden for a while. It comes back
|
||||
after a few seconds, or as soon as you type anything.
|
||||
If in the minibuffer you use a command whose purpose is to display a
|
||||
message in the echo area, such as @kbd{C-x =}, the message hides the
|
||||
minibuffer for a while. The minibuffer contents come back after a few
|
||||
seconds, or as soon as you type anything.
|
||||
|
||||
@item
|
||||
Echoing of keystrokes does not take place while the minibuffer is in
|
||||
|
@ -254,7 +254,7 @@ Complete the minibuffer text, but don't go beyond one word
|
|||
Submit the text in the minibuffer as the argument, possibly completing
|
||||
first as described below (@code{minibuffer-complete-and-exit}).
|
||||
@item ?
|
||||
Print a list of all possible completions of the text in the minibuffer
|
||||
Display a list of all possible completions of the text in the minibuffer
|
||||
(@code{minibuffer-list-completions}).
|
||||
@end table
|
||||
|
||||
|
|
|
@ -123,18 +123,18 @@ feedback. You can change this behavior by setting a variable
|
|||
(@pxref{Display Custom}).
|
||||
|
||||
@cindex error message in the echo area
|
||||
If a command cannot be executed, it may print an @dfn{error message}
|
||||
If a command cannot be executed, it may display an @dfn{error message}
|
||||
in the echo area. Error messages are accompanied by beeping or by
|
||||
flashing the screen. The error also discards any input you have typed
|
||||
ahead.
|
||||
|
||||
Some commands print informative messages in the echo area. These
|
||||
Some commands display informative messages in the echo area. These
|
||||
messages look much like error messages, but they are not announced with
|
||||
a beep and do not throw away input. Sometimes the message tells you
|
||||
what the command has done, when this is not obvious from looking at the
|
||||
text being edited. Sometimes the sole purpose of a command is to print
|
||||
a message giving you specific information---for example, @kbd{C-x =}
|
||||
prints a message describing the character position of point in the text
|
||||
text being edited. Sometimes the sole purpose of a command is to show
|
||||
you a message giving you specific information---for example, @kbd{C-x =}
|
||||
displays a message describing the character position of point in the text
|
||||
and its current column in the window. Commands that take a long time
|
||||
often display messages ending in @samp{...} while they are working, and
|
||||
add @samp{done} at the end when they are finished.
|
||||
|
|
|
@ -358,7 +358,7 @@ the next page, and @minus{}1 means the previous one.
|
|||
@kindex C-x l
|
||||
@findex count-lines-page
|
||||
The @kbd{C-x l} command (@code{count-lines-page}) is good for deciding
|
||||
where to break a page in two. It prints in the echo area the total number
|
||||
where to break a page in two. It displays in the echo area the total number
|
||||
of lines in the current page, and then divides it up into those preceding
|
||||
the current line and those following, as in
|
||||
|
||||
|
@ -1366,7 +1366,7 @@ text that belongs inside. Afterward, use the command @kbd{C-c @}}
|
|||
@kindex C-j @r{(@TeX{} mode)}
|
||||
There are two commands for checking the matching of braces. @kbd{C-j}
|
||||
(@code{tex-terminate-paragraph}) checks the paragraph before point, and
|
||||
inserts two newlines to start a new paragraph. It prints a message in
|
||||
inserts two newlines to start a new paragraph. It outputs a message in
|
||||
the echo area if any mismatch is found. @kbd{M-x tex-validate-region}
|
||||
checks a region, paragraph by paragraph. The errors are listed in the
|
||||
@samp{*Occur*} buffer, and you can use @kbd{C-c C-c} or @kbd{Mouse-2} in
|
||||
|
@ -1664,7 +1664,7 @@ Move to the beginning of the next line that isn't an nroff command
|
|||
@item M-p
|
||||
Like @kbd{M-n} but move up (@code{backward-text-line}).
|
||||
@item M-?
|
||||
Prints in the echo area the number of text lines (lines that are not
|
||||
Displays in the echo area the number of text lines (lines that are not
|
||||
nroff commands) in the region (@code{count-text-lines}).
|
||||
@end table
|
||||
|
||||
|
|
|
@ -699,7 +699,7 @@ to display your locale settings.
|
|||
You can use the @kbd{M-!} command to execute these commands from
|
||||
Emacs, and then copy the output from the @samp{*Messages*} buffer into
|
||||
the bug report. Alternatively, @kbd{M-x getenv @key{RET} LC_ALL
|
||||
@key{RET}} will print the value of @code{LC_ALL} in the echo area, and
|
||||
@key{RET}} will display the value of @code{LC_ALL} in the echo area, and
|
||||
you can copy its output from the @samp{*Messages*} buffer.
|
||||
|
||||
@item
|
||||
|
|
Loading…
Add table
Reference in a new issue