[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ElDoc: adding optional support to display messages in header-line in
From: |
Tassilo Horn |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Geralt <address@hidden> 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
Re: ElDoc: adding optional support to display messages in header-line, Stefan Monnier, 2009/08/04