>     Moreover I don't think that anything is "broken" in the following:
>
>        ;; Underline innermost grouping, so that you can more easily see what
>        ;; belongs together.  2005-05-12: Font-lock can go into an
>        ;; unbreakable endless loop on this -- something's broken.
>        
;;("[\\][\\][(]\\(?:\\?:\\)?\\(\\(?:[^\\\"]+\\|[\\]\\(?:[^\\]\\|[\\][^(]\\)\\)+?\\)[\\][\\][)]"
>         ;;1 'underline prepend)
>
>     I believe that `font-lock-fontify-keywords-region' starts backtracking
>     and this can take hours in more complicated cases.
>
> That sounds like "broken" to me.  Whether it takes hours, or forever,
> either way Font Lock mode will be very unpleasant to use.
>
>       Anyway, regexps are
>     not suited to handle this.  If you are willing to pay for two additional
>     buffer-local variables such as
>
> I believe you, and it is ok to add local variables for this purpose.
> (Their names should start with `font-lock-' so that people understand
> what they are for.  Or perhaps with `lisp-fl-' since they are
> specifically for Lisp mode.)
>

Note that I only fixed the endless looping behavior here.  My code is
not suitable when you use a support mode like jit-lock and change the
delimiters of regexp groups.  You would have to refontify text manually
which is not very desirable.  I'll try to handle this in a more
user-friendly way.



_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to