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).
>>> BAM <solnul@...> 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
>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
>You can override the info collecting part with
> (let* ((s (semantic-fetch-overload 'eldoc-current-symbol-info))
> (if s (setq found (funcall s))
> (setq found (senator-eldoc-print-current-symbol-info-default)))
> (eldoc-message (truncate-string-to-width
> (cond ((stringp found)
> ((semantic-token-p found)
> 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: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org