all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 8345@debbugs.gnu.org
Subject: bug#8345: 23.2; Suggestion: let eldoc show if something is functionp
Date: Sun, 17 Feb 2013 15:51:12 +0100	[thread overview]
Message-ID: <871ucf804f.fsf@web.de> (raw)
In-Reply-To: <87wrjmzya4.fsf@web.de> (Michael Heerdegen's message of "Fri, 25 Mar 2011 22:27:15 +0100")

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	other threads:[~2013-02-17 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 21:27 bug#8345: 23.2; Suggestion: let eldoc show if something is functionp Michael Heerdegen
2013-02-17 14:51 ` Michael Heerdegen [this message]
2013-02-18  1:30   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ucf804f.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=8345@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.