comparison lispref/display.texi @ 32261:c354d0540694

Document `display-message-or-buffer'.
author Miles Bader <miles@gnu.org>
date Sun, 08 Oct 2000 01:41:04 +0000
parents 15b8a53f1d7a
children d8a494b62fbd
comparison
equal deleted inserted replaced
32260:b3df18daadfb 32261:c354d0540694
210 ---------- Echo Area ---------- 210 ---------- Echo Area ----------
211 Minibuffer depth is 0. 211 Minibuffer depth is 0.
212 ---------- Echo Area ---------- 212 ---------- Echo Area ----------
213 @end group 213 @end group
214 @end example 214 @end example
215
216 To automatically display a message in the echo area or in a pop-buffer,
217 depending on its size, use @code{display-message-or-buffer}.
215 @end defun 218 @end defun
216 219
217 @tindex with-temp-message 220 @tindex with-temp-message
218 @defmac with-temp-message message &rest body 221 @defmac with-temp-message message &rest body
219 This construct displays a message in the echo area temporarily, during 222 This construct displays a message in the echo area temporarily, during
240 This function displays a message like @code{message}, but uses a dialog 243 This function displays a message like @code{message}, but uses a dialog
241 box (or a pop-up menu) whenever that is possible. If it is impossible 244 box (or a pop-up menu) whenever that is possible. If it is impossible
242 to use a dialog box or pop-up menu, because the terminal does not 245 to use a dialog box or pop-up menu, because the terminal does not
243 support them, then @code{message-box} uses the echo area, like 246 support them, then @code{message-box} uses the echo area, like
244 @code{message}. 247 @code{message}.
248 @end defun
249
250 @defun display-message-or-buffer message &optional buffer-name not-this-window frame
251 This function displays the message @var{message}, which may be either a
252 string or a buffer. If it is shorter than the maximum height of the
253 echo area, as defined by @code{max-mini-window-height}, it is displayed
254 in the echo area, using @code{message}. Otherwise,
255 @code{display-buffer} is used to show it in a pop-up buffer.
256
257 Returns either the string shown in the echo area, or when a pop-up
258 buffer is used, the window used to display it.
259
260 If @var{message} is a string, then the optional argument
261 @var{buffer-name} is the name of the buffer used to display it when a
262 pop-up buffer is used, defaulting to @samp{*Message*}. In the case
263 where @var{message} is a string and displayed in the echo area, it is
264 not specified whether the contents are inserted into the buffer anyway.
265
266 The optional arguments @var{not-this-window} and @var{frame} are as for
267 @code{display-buffer}, and only used if a buffer is displayed.
245 @end defun 268 @end defun
246 269
247 @defun current-message 270 @defun current-message
248 This function returns the message currently being displayed in the 271 This function returns the message currently being displayed in the
249 echo area, or @code{nil} if there is none. 272 echo area, or @code{nil} if there is none.