From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel 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 Message-ID: <87skg8kqa1.fsf@thinkpad.tsdh.de> References: <4A755D64.6070400@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1249369860 23675 80.91.229.12 (4 Aug 2009 07:11:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2009 07:11:00 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: Geralt Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 04 09:10:52 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYEAe-00070J-Ix for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2009 09:10:52 +0200 Original-Received: from localhost ([127.0.0.1]:46097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYEAd-00018S-Pb for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2009 03:10:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYEAY-00018C-AG for emacs-devel@gnu.org; Tue, 04 Aug 2009 03:10:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYEAT-00017Z-EA for emacs-devel@gnu.org; Tue, 04 Aug 2009 03:10:45 -0400 Original-Received: from [199.232.76.173] (port=33013 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYEAT-00017W-8o for emacs-devel@gnu.org; Tue, 04 Aug 2009 03:10:41 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:38077) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MYEAS-0000hL-Md for emacs-devel@gnu.org; Tue, 04 Aug 2009 03:10:40 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYEAS-0003nl-1k for emacs-devel@gnu.org; Tue, 04 Aug 2009 03:10:40 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id B0F3978A0F1C; Tue, 4 Aug 2009 09:10:38 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22563-04; Tue, 4 Aug 2009 09:10:38 +0200 (CEST) X-CHKRCPT: Envelopesender vrfy tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (unknown [141.26.95.166]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 1BAA678A0EC7; Tue, 4 Aug 2009 09:10:38 +0200 (CEST) Mail-Copies-To: never In-Reply-To: (Geralt's message of "Mon, 3 Aug 2009 23:47:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113651 Archived-At: Geralt writes: Hi! >> You probably mean something like >> >> =C2=A0 =C2=A0 =C2=A0(cond >> =C2=A0 =C2=A0 =C2=A0 (eldoc-last-message >> =C2=A0 =C2=A0 =C2=A0 =C2=A0(if eldoc-display-in-header-line >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq header-line-format eldoc-= last-message) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "%s" eldoc-last-message))) >> =C2=A0 =C2=A0 =C2=A0 (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