bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8345: 23.2; Suggestion: let eldoc show if something is functionp


From: Michael Heerdegen
Subject: bug#8345: 23.2; Suggestion: let eldoc show if something is functionp
Date: Sun, 17 Feb 2013 15:51:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Hello Emacs,
>
> I want to make a suggestion:
>
> Let the notifications of eldoc mode differentiate between functions on
> the one side, and macros and special forms on the other side.  This is
> an essential information for the Elisp programmer concerning the
> arguments.

I still think this is a good idea, because macros and special forms may
handle arguments differently (evaluation), so I want to see whether the
current form is a function call or not.

Probably, using `font-lock-keyword-face' is not so good - since macros
generally are not fontified as such where used in the code.

Maybe we should just accentuate macros and special forms a bit.

Here is a patch that simply underlines macros and special forms in the
eldoc info:

--8<---------------cut here---------------start------------->8---
*** /home/micha/today/eldoc.el  2013-02-17 15:14:07.520210027 +0100
--- /home/micha/gnu-emacs/elisp/test/eldoc.el   2013-02-17 15:08:07.276219422 
+0100
***************
*** 356,362 ****
        (setq doc (copy-sequence args))
        (add-text-properties start end (list 'face argument-face) doc))
        (setq doc (eldoc-docstring-format-sym-doc
!                sym doc 'font-lock-function-name-face))
        doc)))
  
  ;; Return a string containing a brief (one-line) documentation string for
--- 356,365 ----
        (setq doc (copy-sequence args))
        (add-text-properties start end (list 'face argument-face) doc))
        (setq doc (eldoc-docstring-format-sym-doc
!                sym doc (if (functionp sym)
!                              'font-lock-function-name-face
!                            '((:inherit 'font-lock-function-name-face)
!                              (:underline t)))))
        doc)))
  
  ;; Return a string containing a brief (one-line) documentation string for
--8<---------------cut here---------------end--------------->8---


Regards,

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]