> (defun msg-maybe-in-minibuffer (string &rest args) > "Display STRING with `message' or `minibuffer-message', as appropriate." > (if (active-minibuffer-window) > (minibuffer-message (format " [%s]" string)) > (message string)))
I agree 100% with the intention. Typical such messages are the completion messages, for completion functions that can be used both in the minibuffer and in normal buffers. E.g. the pcomplete functions. Of course I'd define it more like (defun msg-maybe-in-minibuffer (format &rest args) "Display STRING with `message' or `minibuffer-message', as appropriate." (if (minibufferp) (minibuffer-message (apply 'format (concat " [" format "]") args)) (apply 'message format args))) I'd even argue that this function should be called "minibuffer-message", since currently minibuffer-message is only used when (minibufferp) is non-nil. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel