comparison lisp/simple.el @ 1703:f561c3904bb3

[xemacs-hg @ 2003-09-20 01:46:53 by youngs] 2003-09-20 Ilya N. Golubev <gin@mo.msk.ru> * simple.el (raw-append-message): Allow user to specify alternative function for displaying message. (redisplay-echo-area-function): New. (clear-message): Allow user to specify function for finishing message display. (undisplay-echo-area-function): New. 2003-09-20 Ilya N. Golubev <gin@mo.msk.ru> * xemacs/mini.texi (Minibuffer): Add customizing message display reference. * lispref/display.texi (Customizing Message Display): New, describe `redisplay-echo-area-function', `undisplay-echo-area-function', `minibuffer-echo-wait-function'. (The Echo Area): Add menu. 2003-09-20 Ilya N. Golubev <gin@mo.msk.ru> * cmdloop.c (Fcommand_loop_1): Allow specifying elisp function for waiting user input while displaying message while in minibuffer. (Vminibuffer_echo_wait_function): New, associated variable... (vars_of_cmdloop): ... initialize it.
author youngs
date Sat, 20 Sep 2003 01:47:03 +0000
parents 01c57eb70ae9
children 292ead991a10
comparison
equal deleted inserted replaced
1702:245980c04067 1703:f561c3904bb3
4050 "List of symbols indicating labels of messages which shouldn't be logged. 4050 "List of symbols indicating labels of messages which shouldn't be logged.
4051 See `display-message' for some common labels. See also `log-message'." 4051 See `display-message' for some common labels. See also `log-message'."
4052 :type '(repeat (symbol :tag "Label")) 4052 :type '(repeat (symbol :tag "Label"))
4053 :group 'log-message) 4053 :group 'log-message)
4054 4054
4055 (defcustom redisplay-echo-area-function 'redisplay-echo-area
4056 "The function to call to display echo area buffer."
4057 :type 'function
4058 :group 'log-message)
4059
4060 (defcustom undisplay-echo-area-function nil
4061 "The function to call to undisplay echo area buffer."
4062 :type 'function
4063 :group 'log-message)
4064
4055 ;;Subsumed by view-lossage 4065 ;;Subsumed by view-lossage
4056 ;; Not really, I'm adding it back by popular demand. -slb 4066 ;; Not really, I'm adding it back by popular demand. -slb
4057 (defun show-message-log () 4067 (defun show-message-log ()
4058 "Show the \" *Message-Log*\" buffer, which contains old messages and errors." 4068 "Show the \" *Message-Log*\" buffer, which contains old messages and errors."
4059 (interactive) 4069 (interactive)
4143 (or frame (setq frame (selected-frame))) 4153 (or frame (setq frame (selected-frame)))
4144 (let ((clear-stream (and message-stack (eq 'stream (frame-type frame))))) 4154 (let ((clear-stream (and message-stack (eq 'stream (frame-type frame)))))
4145 (remove-message label frame) 4155 (remove-message label frame)
4146 (let ((inhibit-read-only t)) 4156 (let ((inhibit-read-only t))
4147 (erase-buffer " *Echo Area*")) 4157 (erase-buffer " *Echo Area*"))
4158 (if undisplay-echo-area-function
4159 (funcall undisplay-echo-area-function))
4148 ;; If outputting to the terminal, make sure we clear the left side. 4160 ;; If outputting to the terminal, make sure we clear the left side.
4149 (when (or clear-stream 4161 (when (or clear-stream
4150 (and (eq 'stream (frame-type frame)) 4162 (and (eq 'stream (frame-type frame))
4151 (not (device-left-side-clear-p (frame-device frame))))) 4163 (not (device-left-side-clear-p (frame-device frame)))))
4152 (set-device-clear-left-side (frame-device frame) nil) 4164 (set-device-clear-left-side (frame-device frame) nil)
4224 4236
4225 ;; Don't redisplay the echo area if we are executing a macro. 4237 ;; Don't redisplay the echo area if we are executing a macro.
4226 (if (not executing-kbd-macro) 4238 (if (not executing-kbd-macro)
4227 (if (eq 'stream (frame-type frame)) 4239 (if (eq 'stream (frame-type frame))
4228 (send-string-to-terminal message stdout-p (frame-device frame)) 4240 (send-string-to-terminal message stdout-p (frame-device frame))
4229 (redisplay-echo-area)))))) 4241 (funcall redisplay-echo-area-function))))))
4230 4242
4231 (defun display-message (label message &optional frame stdout-p) 4243 (defun display-message (label message &optional frame stdout-p)
4232 "Print a one-line message at the bottom of the frame. First argument 4244 "Print a one-line message at the bottom of the frame. First argument
4233 LABEL is an identifier for this message. MESSAGE is the string to display. 4245 LABEL is an identifier for this message. MESSAGE is the string to display.
4234 Use `clear-message' to remove a labelled message. 4246 Use `clear-message' to remove a labelled message.