At 12:31 PM 10/1/99 -0400, Kevin Delia wrote:
> Are there any know problems with speedbar and folding mode? When I
>use speedbar to look at my files that are folded, I don't see any of my
>methods; conversely, when I look at my files that don't use folding, all
>the methods show (logically, the answer to my question is yes, there is
>a problem, but I'm also wondering if anyone else has experienced this
>and has a solution). Also, I have linefeed characters in my source
>files that don't seem to work with speedbar.
Paul Kinnucan <[EMAIL PROTECTED]> writes:
> speedbar uses imenu by default to determine what to show. imenu builds its
> list from the contents of the buffer. I don't know how folding mode works
> but if it renders parts of the buffer invisible to imenu, then you won't
> see the invisible parts in speedbar.
Folding mode use a combination of narrowing and a method called
`selective-display' to hide the content of the buffer. Both methods
have been available since Emacs 18 when folding mode originally was
developed.
The selective display mechanism works by replacing newline characters
by carriage returns which the Emacs display engine considers to be the
start of a invisible area. This has the implication that every
package that searches for the beginning of lines must also consider CR
to be the start of lines (regexp:s containing "^" and "$" doesn't
work). In addition, they should not fail when a buffer contain
extremely long lines. For example by matching using regexps that
contain ".*" sequences, a rexexp stack overflow is likely to occur;
"[^\n\r]*" is a better choice.
This problem is not limited to folding mode but occurs for all
packages that use selective-display.
-- Anders
--
;; .signature -- File added to the end of mail, containing joke or info.
(defvar me '((profession . "Compiler Designer") (company . "IAR Systems")
(age . 30) (country . "Sweden") (hair . "Long") (water-skier . t)))
;; .signature ends here.