Re[1]: [cedet-semantic] Multiline Summary
Brought to you by:
zappo
|
From: Eric M. L. <er...@si...> - 2003-10-14 17:11:11
|
Hi,
The eldoc adaptation semantic (in senator.el) uses `eldoc-message' to
display the string, so I was somewhat surprised that it wouldn't work.
(I was unaware of the feature to begin with.)
I looked in eldoc, and it obeys the multiline flag before calling
eldoc-message. As such, your solution mimics what eldoc is doing in
several places. I will adapt your patch for the next version of
semantic (2.0 beta 1).
Thanks!
Eric
>>> BAM <so...@gm...> seems to think that:
>Setting eldoc-echo-area-use-multiline-p seems to have no effect on the
>length of semantic-summary-mode's display. Am I correct in thinking that
>semantic does not use this setting, or I am just stupid?
>
>If is, could truncation be added to
>senator-eldoc-print-current-symbol-info? It's sort of distracting to
>have half the screen taken up by the summary output when I move over an
>object declaration.
>
>What I did was use the mule functions as below, but this just chops off
>blindly, so it may not be an ideal solution.
>
>(setq semantic-summary-max-length (- (* 3 (window-width) ) 1 ))
>(defun senator-eldoc-print-current-symbol-info ()
> "Print information using `eldoc-message' while in function
>`eldoc-mode'.
>You can override the info collecting part with
>`eldoc-current-symbol-info'."
> (let* ((s (semantic-fetch-overload 'eldoc-current-symbol-info))
> found)
>
> (if s (setq found (funcall s))
> (setq found (senator-eldoc-print-current-symbol-info-default)))
>
> (eldoc-message (truncate-string-to-width
> (cond ((stringp found)
> found)
> ((semantic-token-p found)
> (semantic-summarize-nonterminal
> found nil senator-eldoc-use-color))
> (t nil)) semantic-summary-max-length))))
>
>If I'm missing something completely obvious, just let me know.
>
--
Eric Ludlam: za...@gn..., er...@si...
Home: http://www.ludlam.net Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: www.gnu.org
|