4

In CEDET, the minor mode semantic-idle-summary-mode displays information about the symbol under point in the echo area. I really like this mode, as it helps me remember, for instance, which arguments the function I'm calling needs.

The problem is, it's a little buggy about displaying in the echo area. Since it automatically activates whenever there's a symbol under point, it sometimes hides useful information that is being displayed in the echo area (after all, that's the area that emacs uses to tell you stuff).

Is there a way to display the summary information somewhere else? A tooltip would be ideal, but one of the ecb frames is acceptable as well.

Malabarba
  • 4,473
  • 2
  • 30
  • 49

3 Answers3

0

I had a similar need as you, and I addressed it with this extension.

As you can see on this screenshot, it shows the function arguments at the point of its invocation, without altering the echo area.

Some neat features are:

  1. Shows you all overloaded functions, including constructors where appropriate.
  2. Highlights in bold the current argument.
  3. Jump to definition functionality for the current function variant.
abo-abo
  • 20,038
  • 3
  • 50
  • 71
0

The first thing that comes to mind is the variable tooltip-use-echo-area which controls where / how tooltips are displayed. When set to t, all tooltips are displayed in the echo area. What is its value on your system? Maybe it would be possible to force cedet to use actual (pop-up) tooltips by setting that variable to nil.

itsjeyd
  • 5,070
  • 2
  • 30
  • 49
0

semantic-idle-summary-mode uses the function eldoc-message and a few other eldoc queries to determine when to display messages. This means it should be pretty good at not covering up useful information.

Since eldoc is the preferred mode for providing similar summary information in Emacs Lisp buffers, the best thing would be to configure eldoc, but I didn't see a way to do it since eldoc-message appears configured to always call message.

Anyway, what that means is you can use defadvice to override eldoc-message to use a tooltip, and you will have your solution.

The below snippit is a guess at how to use defadvice, but I didn't give it a try.

(defadvice eldoc-message (around bruce-mode activate)
  "Make eldoc display messages as a tooltip."
  (if (some condition that means I want to use a tooltip)
      (bruce-eldoc-message (ad-get-arg 0))
    ad-do-it))

(require 'tooltip)

(defun bruce-eldoc-message (&rest args)
  "My version of displaying a message for eldoc."
  (if (null (cdr args))
      ;; One argument
      (tooltip-show (car args))
    ;; Else, use format
    (tooltip-show (apply 'format args)))
  )
Eric
  • 3,959
  • 17
  • 15