Mercurial > hg > xemacs-beta
diff lisp/simple.el @ 5885:c8bbb32fe124
Always return a string, #'current-message.
lisp/ChangeLog addition:
2015-04-04 Aidan Kehoe <kehoea@parhasard.net>
* gutter-items.el (append-progress-feedback):
* gutter-items.el (abort-progress-feedback):
Correct comments in both these functions, it's the progress stack
being adjusted, not the message stack.
* simple.el (message-stack):
Describe my recent change in the structure of this.
* simple.el (current-message):
Adjust the implementation of this to always return the string
displayed.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 04 Apr 2015 13:49:30 +0100 |
parents | f9e59cd39a9a |
children | bd4d2c8ef9cc |
line wrap: on
line diff
--- a/lisp/simple.el Fri Apr 03 00:27:59 2015 +0100 +++ b/lisp/simple.el Sat Apr 04 13:49:30 2015 +0100 @@ -4190,8 +4190,12 @@ (defvar message-stack nil "An alist of label/string pairs representing active echo-area messages. The first element in the list is currently displayed in the echo area. -Do not modify this directly--use the `message' or -`display-message'/`clear-message' functions.") + +Each string is represented by a STRING START END triplet, reflecting the +MESSAGE, START, and END arguments to `append-message'. + +Do not modify this directly--use the `message', `display-message', or +`clear-message' functions.") (defvar remove-message-hook 'log-message "A function or list of functions to be called when a message is removed @@ -4566,7 +4570,8 @@ (defun current-message (&optional frame) "Return the current message in the echo area, or nil. The FRAME argument is currently unused." - (cdr (car message-stack))) + (subseq (cadar message-stack) (or (caddar message-stack) 0) + (fourth (car message-stack)))) ;;; may eventually be frame-dependent (defun current-message-label (&optional frame)