all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Geralt <usr.gentoo@googlemail.com>
Cc: martin rudalics <rudalics@gmx.at>, emacs-devel@gnu.org
Subject: Re: ElDoc: adding optional support to display messages in header-line instead of the echo area
Date: Tue, 04 Aug 2009 09:10:46 +0200	[thread overview]
Message-ID: <87skg8kqa1.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <fbdd0e50908031447m72fd8a8bo16e71ca77e2721e4@mail.gmail.com> (Geralt's message of "Mon, 3 Aug 2009 23:47:46 +0200")

Geralt <usr.gentoo@googlemail.com> writes:

Hi!

>> You probably mean something like
>>
>>      (cond
>>       (eldoc-last-message
>>        (if eldoc-display-in-header-line
>>            (setq header-line-format eldoc-last-message)
>>          (message "%s" eldoc-last-message)))
>>       (omessage (message nil)))))
>>
>> here ;-)
>
> can you explain why?

Cause the variable `omessage' is bound to `eldoc-last-message' in the
beginning of the function, and it serves as condition in the `cond'.
After the `let', `eldoc-last-message' set to the new eldoc string.  If
there's non created, cause point is not on a function/var, then the new
value is nil.  If that is the case, but the old message (omessage) is
non-nil, the echo area will be cleared.

> I put the omessage into the ELSE block because somebody on emacs-help
> suggested it and it made sense to me at that time.

Yep, been there, didn't check accurately, didn't object.  But Martin is
right. :-)

Bye,
Tassilo




  reply	other threads:[~2009-08-04  7:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-01  9:46 ElDoc: adding optional support to display messages in header-line instead of the echo area Geralt
2009-08-02  9:33 ` martin rudalics
2009-08-03 21:47   ` Geralt
2009-08-04  7:10     ` Tassilo Horn [this message]
2009-08-04  8:32     ` martin rudalics
2009-08-04 18:50       ` Geralt
2009-08-04 17:05 ` ElDoc: adding optional support to display messages in header-line Stefan Monnier
2009-08-04 19:05   ` Geralt
2009-08-05  2:00     ` Stefan Monnier
2009-08-06 18:50       ` Geralt
2009-08-04 17:07 ` Stefan Monnier
2009-08-04 19:06   ` Geralt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87skg8kqa1.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    --cc=usr.gentoo@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.