Subject: Re: bug#6192: 24.0.50; eldoc-mode: unexpected recentering

From: martin rudalics <[email-masked]>
Date: Sun, 16 May 2010 20:50:58 +0200

> I still not sure I understand.  When you wrote:
 >
 >    > I have tried the trunk with -Q now and can't trigger the resizing any
 >    > more, neither with a hook nor when setting it manually.
 >
 > I took you to mean you started with -Q, evalled (add-hook
 > 'emacs-lisp-mode-hook 'turn-on-eldoc-mode), visited an elisp file and
 > then did not observe the echo area resizing (and consequent
 > recentering).  When I do that I not see resizing; I only (and always)
 > observe the resizing when (add-hook 'emacs-lisp-mode-hook
 > 'turn-on-eldoc-mode) is in .emacs and Emacs starts with this.  Are you
 > now saying you don't (now) see resizing in the latter case?

That's what I'm saying, yes.  I've been nagged by the bug some two years
ago.  At that time I had the add-hook in my .emacs and never tried with
Emacs -Q or anything else.  I apparently considered the possibility that
the bug had something to do with my other customizations.  I then also
literally replaced the line

	      argument-face 'font-lock-warning-face

with

  	      argument-face 'font-lock-string-face

(I know that because I still have this commented out in my .emacs.  The
fact that it's commented out means that eventually something must have
changed so that I didn't need it any more but I wasn't very sure about
that change.  Sadly, I have forgotten all about this.  I also found a
face `eldoc-highlight-unsupplied-argument' customized in my .emacs and
now cannot tell what it has been used for.)

Anyway.  With a trunk built on April 19th of this year I cannot
reproduce any echo area resizing neither (a) with (add-hook ...) in my
.emacs, (b) with (add-hook ...) evaluated in Emacs -Q before opening an
.el file, and (c) with (turn-on-eldoc-mode) evaluated after opening an
.el file.  As with Eli here the echo area doesn't resize any more.

 > No, the Eldoc message is shown with faces and the echo area is resized
 > (because the argument face is bold).  Eldoc mode sets the faces via
 > propertize, which evidently is not affected by font-locking.

There's an `add-text-properties' in `eldoc-highlight-function-argument'.

BTW did you check how customizing `eldoc-echo-area-use-multiline-p' fits
into this?

martin