Subject: Re: bug#23897: 25.1.50; Argument at point not being highlighted in eldoc hints

From: Kaushal Modi <[email-masked]>
Date: Thu, 07 Jul 2016 20:31:29 +0000

Looks like the fixes will be needed in major modes?

For instance, by adding the following debug statement in
elisp--highlight-function-argument function in elisp-mode.el,

=====
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index f360791..16365dd 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1481,6 +1481,7 @@ elisp--highlight-function-argument
  (setq doc (copy-sequence args))
  (add-text-properties start end (list 'face argument-face) doc))
       (setq doc (eldoc-docstring-format-sym-doc prefix doc))
+      (message "debug: doc = %S" doc)
       doc)))

 ;; Return a string containing a brief (one-line) documentation string for
=====

I get the below when the cursor is after a defun:

debug: doc = #("defun: (NAME ARGLIST &optional DOCSTRING DECL &rest BODY)"
0 5 (face font-lock-keyword-face))

I get the same debug output in both emacs-25 and master builds. So I am
wondering if this doc output needs to be adjusted to the change in the
format function then ..

Also, I can see if debug of incorrect face display in both mode-line (when
I am using the minibuffer to eval stuff using M-: binding) and echo area.

On Thu, Jul 7, 2016 at 3:45 PM Eli Zaretskii <[email-masked]> wrote:

> > From: Kaushal Modi <[email-masked]>
> > Date: Thu, 07 Jul 2016 19:31:26 +0000
> > Cc: martin rudalics <[email-masked]>, Dmitry Gutov <[email-masked]>
> >
> > [0644e6f56d2be82dd716478eb65e7b3c761d813d] Fix copying properties in
> 'format' when it produces padding
> >
> > Building emacs using that commit shows that bug.
>
> Then the fix will have to be in the code which calls format, because
> the above commit is going to stay.
>
> If no one beats me to it, I will look into this in a day or two.
>
> Thanks for the analysis.
>
-- 

-- 
Kaushal Modi