unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* wrapper fn for message and minibuffer-message?
@ 2005-10-04 21:58 Drew Adams
  2005-10-05 15:53 ` Stefan Monnier
  0 siblings, 1 reply; 24+ messages in thread
From: Drew Adams @ 2005-10-04 21:58 UTC (permalink / raw)


Ignore if already discussed or idea seems useless.

I have some commands that users can use either at top level or when in the
minibuffer. (In the latter case, they are bound to keys.)  I use the
following wrapper function, and I wonder if such a function might not be
useful generally, for defining Emacs commands that are likely to be (also)
bound in a minibuffer map.

Some toggle commands are examples of use cases - toggles that can take
effect while still inputting in the minibuffer.

(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)))

No, this does not provide the generality of `message', which accepts a
format string and possibly other args to be formatted.  It might
nevertheless be useful.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-10-21 22:30 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-04 21:58 wrapper fn for message and minibuffer-message? Drew Adams
2005-10-05 15:53 ` Stefan Monnier
2005-10-05 16:23   ` Drew Adams
2005-10-06  5:28   ` Richard M. Stallman
2005-10-06 15:52     ` Drew Adams
2005-10-07  3:04       ` Richard M. Stallman
2005-10-07 22:29         ` Drew Adams
2005-10-09 18:16           ` Richard M. Stallman
2005-10-09 21:25             ` Drew Adams
2005-10-10 18:06               ` Richard M. Stallman
2005-10-10 19:52               ` Drew Adams
2005-10-15 13:08                 ` Juri Linkov
2005-10-15 14:39                   ` Drew Adams
2005-10-15 14:57                     ` Juri Linkov
2005-10-16 14:40                   ` Richard M. Stallman
2005-10-17  8:04                     ` Searching in the minibuffer (was: wrapper fn for message and minibuffer-message?) Juri Linkov
2005-10-17 21:57                       ` Richard M. Stallman
2005-10-18  8:05                         ` Searching in the minibuffer Juri Linkov
2005-10-19  2:43                           ` Richard M. Stallman
2005-10-19 15:55                             ` Juri Linkov
2005-10-20  4:54                               ` Richard M. Stallman
2005-10-21 15:38                                 ` Juri Linkov
2005-10-21 22:19                                   ` Richard M. Stallman
2005-10-21 22:30                                     ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).