Mercurial > emacs
comparison lisp/minibuffer.el @ 94091:14fafab62797
(minibuffer-message): Make sure we can put-text-property.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 14 Apr 2008 22:04:38 +0000 |
parents | 28e2f73174d6 |
children | 29e80ebed169 |
comparison
equal
deleted
inserted
replaced
94090:6027fc6333c9 | 94091:14fafab62797 |
---|---|
170 or until the next input event arrives, whichever comes first. | 170 or until the next input event arrives, whichever comes first. |
171 Enclose MESSAGE in [...] if this is not yet the case. | 171 Enclose MESSAGE in [...] if this is not yet the case. |
172 If ARGS are provided, then pass MESSAGE through `format'." | 172 If ARGS are provided, then pass MESSAGE through `format'." |
173 ;; Clear out any old echo-area message to make way for our new thing. | 173 ;; Clear out any old echo-area message to make way for our new thing. |
174 (message nil) | 174 (message nil) |
175 (unless (and (null args) (string-match "\\[.+\\]" message)) | 175 (setq message (if (and (null args) (string-match "\\[.+\\]" message)) |
176 (setq message (concat " [" message "]"))) | 176 ;; Make sure we can put-text-property. |
177 (copy-sequence message) | |
178 (concat " [" message "]"))) | |
177 (when args (setq message (apply 'format message args))) | 179 (when args (setq message (apply 'format message args))) |
178 (let ((ol (make-overlay (point-max) (point-max) nil t t))) | 180 (let ((ol (make-overlay (point-max) (point-max) nil t t))) |
179 (unwind-protect | 181 (unwind-protect |
180 (progn | 182 (progn |
181 (unless (zerop (length message)) | 183 (unless (zerop (length message)) |