emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: messages override minibuffer input


From: Johannes Weiner
Subject: Re: messages override minibuffer input
Date: Wed, 12 Sep 2007 12:24:13 +0200
User-agent: Mutt/1.5.16 (2007-06-11)

Hi,

On Wed, Sep 12, 2007 at 11:25:45AM +0200, Johannes Weiner wrote:
> > (defun optional-message (fmt &rest args)
> >   "Display a message if there's nothing better being displayed."
> >   (or (active-minibuffer-window)
> >       (not (eq (current-message) optional-message))
> >       (message "%s" (setq optional-message (apply 'format fmt args)))))
> 
> ELISP> (progn (setq foo "foo") (message foo) (eq (current-message) foo))
> nil
> 
> This function calls `message' only when the minibuffer is active.

Whoops, got it backwards.  The call to `message' happens only when the
minibuffer is inactive.  But anyway, the second argument to `or' still seems
useless to me, because `current-message' returns a new string object.

        Hannes

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]