From: Stefan Monnier Date: Mon, 14 Apr 2008 22:04:38 +0000 (+0000) Subject: (minibuffer-message): Make sure we can put-text-property. X-Git-Tag: emacs-pretest-23.0.90~6271 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bd5c2732aa2d2dacb43fe047caf7fc45dc18d342;p=emacs.git (minibuffer-message): Make sure we can put-text-property. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6102575cf6..cc9ee1d1f7a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2008-04-14 Stefan Monnier + * minibuffer.el (minibuffer-message): Make sure we can put-text-property. + * emacs-lisp/crm.el: Complete rewrite. * tmm.el (tmm-completion-delete-prompt): Don't hardcode point-min==1. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 7429af3248d..2fec4238230 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -172,8 +172,10 @@ Enclose MESSAGE in [...] if this is not yet the case. If ARGS are provided, then pass MESSAGE through `format'." ;; Clear out any old echo-area message to make way for our new thing. (message nil) - (unless (and (null args) (string-match "\\[.+\\]" message)) - (setq message (concat " [" message "]"))) + (setq message (if (and (null args) (string-match "\\[.+\\]" message)) + ;; Make sure we can put-text-property. + (copy-sequence message) + (concat " [" message "]"))) (when args (setq message (apply 'format message args))) (let ((ol (make-overlay (point-max) (point-max) nil t t))) (unwind-protect