Mercurial > hg > xemacs-beta
comparison man/lispref/display.texi @ 280:7df0dd720c89 r21-0b38
Import from CVS: tag r21-0b38
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:32:22 +0200 |
parents | 11cf20601dec |
children | 341dac730539 |
comparison
equal
deleted
inserted
replaced
279:c20b2fb5bb0a | 280:7df0dd720c89 |
---|---|
1 @c -*-texinfo-*- | 1 @c -*-texinfo-*- |
2 @c This is part of the XEmacs Lisp Reference Manual. | 2 @c This is part of the XEmacs Lisp Reference Manual. |
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. | 3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998 Free Software Foundation, Inc. |
4 @c See the file lispref.texi for copying conditions. | 4 @c See the file lispref.texi for copying conditions. |
5 @setfilename ../../info/display.info | 5 @setfilename ../../info/display.info |
6 @node Display, Hash Tables, Annotations, Top | 6 @node Display, Hash Tables, Annotations, Top |
7 @chapter Emacs Display | 7 @chapter Emacs Display |
8 | 8 |
11 | 11 |
12 @menu | 12 @menu |
13 * Refresh Screen:: Clearing the screen and redrawing everything on it. | 13 * Refresh Screen:: Clearing the screen and redrawing everything on it. |
14 * Truncation:: Folding or wrapping long text lines. | 14 * Truncation:: Folding or wrapping long text lines. |
15 * The Echo Area:: Where messages are displayed. | 15 * The Echo Area:: Where messages are displayed. |
16 * Warnings:: Display of Warnings. | |
16 * Invisible Text:: Hiding part of the buffer text. | 17 * Invisible Text:: Hiding part of the buffer text. |
17 * Selective Display:: Hiding part of the buffer text (the old way). | 18 * Selective Display:: Hiding part of the buffer text (the old way). |
18 * Overlay Arrow:: Display of an arrow to indicate position. | 19 * Overlay Arrow:: Display of an arrow to indicate position. |
19 * Temporary Displays:: Displays that go away automatically. | 20 * Temporary Displays:: Displays that go away automatically. |
20 * Blinking:: How XEmacs shows the matching open parenthesis. | 21 * Blinking:: How XEmacs shows the matching open parenthesis. |
69 maintains, so that the next time the display is updated it will be | 70 maintains, so that the next time the display is updated it will be |
70 redrawn from scratch. Normally this occurs the next time that | 71 redrawn from scratch. Normally this occurs the next time that |
71 @code{next-event} or @code{sit-for} is called; however, a display update | 72 @code{next-event} or @code{sit-for} is called; however, a display update |
72 will not occur if there is input pending. @xref{Command Loop}. | 73 will not occur if there is input pending. @xref{Command Loop}. |
73 | 74 |
74 @deffn Command force-redisplay | |
75 @cindex force redisplay | |
76 This function causes an immediate update of the display in all | |
77 circumstances, whether or not input is pending. (This function does | |
78 not exist in FSF Emacs.) | |
79 @end deffn | |
80 | |
81 @defun force-cursor-redisplay | 75 @defun force-cursor-redisplay |
82 This function causes an immediate update of the cursor on the selected | 76 This function causes an immediate update of the cursor on the selected |
83 frame. (This function does not exist in FSF Emacs.) | 77 frame. (This function does not exist in FSF Emacs.) |
84 @end defun | 78 @end defun |
85 | 79 |
86 @node Truncation | 80 @node Truncation |
87 @section Truncation | 81 @section Truncation |
88 @cindex line wrapping | 82 @cindex line wrapping |
206 ---------- Echo Area ---------- | 200 ---------- Echo Area ---------- |
207 @end group | 201 @end group |
208 @end example | 202 @end example |
209 @end defun | 203 @end defun |
210 | 204 |
205 In addition to only displaying a message, XEmacs allows you to | |
206 @dfn{label} your messages, giving you fine-grained control of their | |
207 display. Message label is a symbol denoting the message type. Some | |
208 standard labels are: | |
209 | |
210 @itemize @bullet | |
211 @item @code{message}---default label used by the @code{message} | |
212 function; | |
213 | |
214 @item @code{error}---default label used for reporting errors; | |
215 | |
216 @item @code{progress}---progress indicators like | |
217 @samp{Converting... 45%} (not logged by default); | |
218 | |
219 @item @code{prompt}---prompt-like messages like @samp{Isearch: foo} (not | |
220 logged by default); | |
221 | |
222 @item @code{command}---helper command messages like @samp{Mark set} (not | |
223 logged by default); | |
224 | |
225 @item @code{no-log}---messages that should never be logged | |
226 @end itemize | |
227 | |
228 Several messages may be stacked in the echo area at once. Lisp programs | |
229 may access these messages, or remove them as appropriate, via the | |
230 message stack. | |
231 | |
232 @defun display-message label message &optional frame stdout-p | |
233 This function displays @var{message} (a string) labeled as @var{label}, | |
234 as described above. | |
235 | |
236 The @var{frame} argument specifies the frame to whose minibuffer the | |
237 message should be printed. This is currently unimplemented. The | |
238 @var{stdout-p} argument is used internally. | |
239 | |
240 @example | |
241 (display-message 'command "Mark set") | |
242 @end example | |
243 @end defun | |
244 | |
245 @defun lmessage label string &rest arguments | |
246 This function displays a message @var{string} with label @var{label}. | |
247 It is similar to @code{message} in that it accepts a @code{printf}-like | |
248 strings and any number of arguments. | |
249 | |
250 @example | |
251 @group | |
252 ;; @r{Display a command message.} | |
253 (lmessage 'command "Comment column set to %d" comment-column) | |
254 @end group | |
255 | |
256 @group | |
257 ;; @r{Display a progress message.} | |
258 (lmessage 'progress "Fontifying %s... (%d)" buffer percentage) | |
259 @end group | |
260 | |
261 @group | |
262 ;; @r{Display a message that should not be logged.} | |
263 (lmessage 'no-log "Done") | |
264 @end group | |
265 @end example | |
266 @end defun | |
267 | |
268 @defun clear-message &optional label frame stdout-p no-restore | |
269 This function remove any message with the given @var{label} | |
270 from the message-stack, erasing it from the echo area if it's currently | |
271 displayed there. | |
272 | |
273 If a message remains at the head of the message-stack and | |
274 @var{no-restore} is @code{nil}, it will be displayed. The string which | |
275 remains in the echo area will be returned, or @code{nil} if the | |
276 message-stack is now empty. If @var{label} is nil, the entire | |
277 message-stack is cleared. | |
278 | |
279 @example | |
280 ;; @r{Show a message, wait for 2 seconds, and restore old minibuffer} | |
281 ;; @r{contents.} | |
282 (message "A message") | |
283 @print{} A message | |
284 @result{} "A Message" | |
285 (lmessage 'my-label "Newsflash! Newsflash!") | |
286 @print{} Newsflash! Newsflash! | |
287 @result{} "Newsflash! Newsflash!" | |
288 (sit-for 2) | |
289 (clear-message 'my-label) | |
290 @print{} A message | |
291 @result{} "A message" | |
292 @end example | |
293 | |
294 Unless you need the return value or you need to specify a label, | |
295 you should just use @code{(message nil)}. | |
296 @end defun | |
297 | |
298 @defun current-message &optional frame | |
299 This function returns the current message in the echo area, or | |
300 @code{nil}. The @var{frame} argument is currently unused. | |
301 @end defun | |
302 | |
211 Some of the messages displayed in the echo area are also recorded in the | 303 Some of the messages displayed in the echo area are also recorded in the |
212 @samp{ *Message-Log*} buffer. | 304 @samp{ *Message-Log*} buffer. Exactly which messages will be recorded |
213 | 305 can be tuned using the following variables. |
214 @ignore | 306 |
215 @defopt message-log-max | |
216 This variable specifies how many lines to keep in the @samp{*Messages*} | |
217 buffer. The value @code{t} means there is no limit on how many lines to | |
218 keep. The value @code{nil} disables message logging entirely. Here's | |
219 how to display a message and prevent it from being logged: | |
220 @defopt log-message-max-size | 307 @defopt log-message-max-size |
221 This variable specifies how many lines to keep in the @samp{* Message-Log*} | 308 This variable specifies the maximum size of the @samp{ *Message-log*} |
222 buffer. The value @code{t} means there is no limit on how many lines to | |
223 keep. The value @code{nil} disables message logging entirely. Here's | |
224 how to display a message and prevent it from being logged: | |
225 | |
226 @example | |
227 (let (message-log-max) | |
228 (message @dots{})) | |
229 @end example | |
230 @end defopt | |
231 @end ignore | |
232 @defopt log-message-max-size | |
233 This variable specifies the maximum size of @samp{* Message-Log*} | |
234 buffer. | 309 buffer. |
235 @end defopt | 310 @end defopt |
236 | 311 |
312 @defvar log-message-ignore-labels | |
313 This variable specifies the labels whose messages will not be logged. | |
314 It should be a list of symbols. | |
315 @end defvar | |
316 | |
317 @defvar log-message-ignore-regexps | |
318 This variable specifies the regular expressions matching messages that | |
319 will not be logged. It should be a list of regular expressions. | |
320 | |
321 Normally, packages that generate messages that might need to be ignored | |
322 should label them with @code{progress}, @code{prompt}, or @code{no-log}, | |
323 so they can be filtered by @code{log-message-ignore-labels}. | |
324 @end defvar | |
325 | |
237 @defvar echo-keystrokes | 326 @defvar echo-keystrokes |
238 This variable determines how much time should elapse before command | 327 This variable determines how much time should elapse before command |
239 characters echo. Its value must be an integer, which specifies the | 328 characters echo. Its value must be a number, which specifies the number |
240 number of seconds to wait before echoing. If the user types a prefix | 329 of seconds to wait before echoing. If the user types a prefix key (such |
241 key (such as @kbd{C-x}) and then delays this many seconds before | 330 as @kbd{C-x}) and then delays this many seconds before continuing, the |
242 continuing, the prefix key is echoed in the echo area. Any subsequent | 331 prefix key is echoed in the echo area. Any subsequent characters in the |
243 characters in the same command will be echoed as well. | 332 same command will be echoed as well. |
244 | 333 |
245 If the value is zero, then command input is not echoed. | 334 If the value is zero, then command input is not echoed. |
246 @end defvar | 335 @end defvar |
247 | 336 |
248 @defvar cursor-in-echo-area | 337 @defvar cursor-in-echo-area |
251 appears at the end of the message. Otherwise, the cursor appears at | 340 appears at the end of the message. Otherwise, the cursor appears at |
252 point---not in the echo area at all. | 341 point---not in the echo area at all. |
253 | 342 |
254 The value is normally @code{nil}; Lisp programs bind it to @code{t} | 343 The value is normally @code{nil}; Lisp programs bind it to @code{t} |
255 for brief periods of time. | 344 for brief periods of time. |
345 @end defvar | |
346 | |
347 @node Warnings | |
348 @section Warnings | |
349 | |
350 XEmacs contains a facility for unified display of various warnings. | |
351 Unlike errors, warnings are displayed in the situations when XEmacs | |
352 encounters a problem that is recoverable, but which should be fixed for | |
353 safe future operation. | |
354 | |
355 For example, warnings are printed by the startup code when it encounters | |
356 problems with X keysyms, when there is an error in @file{.emacs}, and in | |
357 other problematic situations. Unlike messages, warnings are displayed | |
358 in a separate buffer, and include an explanatory message that may span | |
359 across several lines. Here is an example of how a warning is displayed: | |
360 | |
361 @example | |
362 (1) (initialization/error) An error has occured while loading ~/.emacs: | |
363 | |
364 Symbol's value as variable is void: bogus-variable | |
365 | |
366 To ensure normal operation, you should investigate the cause of the error | |
367 in your initialization file and remove it. Use the `-debug-init' option | |
368 to XEmacs to view a complete error backtrace. | |
369 @end example | |
370 | |
371 Each warning has a @dfn{class} and a @dfn{priority level}. The class is | |
372 a symbol describing what sort of warning this is, such as | |
373 @code{initialization}, @code{resource} or @code{key-mapping}. | |
374 | |
375 The warning priority level specifies how important the warning is. The | |
376 recognized warning levels, in increased order of priority, are: | |
377 @code{debug}, @code{info}, @code{notice}, @code{warning}, @code{error}, | |
378 @code{critical}, @code{alert} and @code{emergency}. | |
379 | |
380 @defun display-warning class message &optional level | |
381 This function displays a warning message @var{message} (a string). | |
382 @var{class} should be a warning class symbol, as described above, or a | |
383 list of such symbols. @var{level} describes the warning priority level. | |
384 If unspecified, it default to @code{warning}. | |
385 | |
386 @example | |
387 @group | |
388 (display-warning 'resource | |
389 "Bad resource specification encountered: | |
390 something like | |
391 | |
392 Emacs*foo: bar | |
393 | |
394 You should replace the * with a . in order to get proper behavior when | |
395 you use the specifier and/or `set-face-*' functions.") | |
396 @end group | |
397 | |
398 @group | |
399 ---------- Warning buffer ---------- | |
400 (1) (resource/warning) Bad resource specification encountered: | |
401 something like | |
402 | |
403 Emacs*foo: bar | |
404 | |
405 You should replace the * with a . in order to get proper behavior when | |
406 you use the specifier and/or `set-face-*' functions. | |
407 ---------- Warning buffer ---------- | |
408 @end group | |
409 @end example | |
410 @end defun | |
411 | |
412 @defun lwarn class level message &rest args | |
413 This function displays a formatted labeled warning message. As above, | |
414 @var{class} should be the warning class symbol, or a list of such | |
415 symbols, and @var{level} should specify the warning priority level | |
416 (@code{warning} by default). | |
417 | |
418 Unlike in @code{display-warning}, @var{message} may be a formatted | |
419 message, which will be, together with the rest of the arguments, passed | |
420 to @code{format}. | |
421 | |
422 @example | |
423 (lwarn 'message-log 'warning | |
424 "Error caught in `remove-message-hook': %s" | |
425 (error-message-string e)) | |
426 @end example | |
427 @end defun | |
428 | |
429 @defvar log-warning-minimum-level | |
430 This variable specifies the minimum level of warnings that should be | |
431 generated. Warnings with level lower than defined by this variable are | |
432 completely ignored, as if they never happened. | |
433 @end defvar | |
434 | |
435 @defvar display-warning-minimum-level | |
436 This variable specifies the minimum level of warnings that should be | |
437 displayed. Unlike @code{log-warning-minimum-level}, setting this | |
438 function does not suppress warnings entirely---they are still generated | |
439 in the @samp{*Warnings*} buffer, only they are not displayed by default. | |
440 @end defvar | |
441 | |
442 @defvar log-warning-suppressed-classes | |
443 This variable specifies a list of classes that should not be logged or | |
444 displayed. If any of the class symbols associated with a warning is the | |
445 same as any of the symbols listed here, the warning will be completely | |
446 ignored, as it they never happened. | |
447 @end defvar | |
448 | |
449 @defvar display-warning-suppressed-classes | |
450 This variable specifies a list of classes that should not be logged or | |
451 displayed. If any of the class symbols associated with a warning is the | |
452 same as any of the symbols listed here, the warning will not be | |
453 displayed. The warning will still logged in the *Warnings* buffer | |
454 (unless also contained in `log-warning-suppressed-classes'), but the | |
455 buffer will not be automatically popped up. | |
256 @end defvar | 456 @end defvar |
257 | 457 |
258 @node Invisible Text | 458 @node Invisible Text |
259 @section Invisible Text | 459 @section Invisible Text |
260 | 460 |