[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modern Conventions for Emacs Lisp files?
From: |
Stefan Monnier |
Subject: |
Re: Modern Conventions for Emacs Lisp files? |
Date: |
Mon, 15 Apr 2013 09:13:20 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> => Result: "^;;[;]+\\{1\\} \\(.*\\)"
This is OK (tho a bit inefficient) but things like
"^;;[;]+\\{3\\} \\(.*\\)"
or
"^;;[;]+\\{8,\\} \\(.*\\)"
are problematic because we use a backtracking regexp-matcher, so when
matching ";;;;;" against "[;]+\\{4\\}", it may consider 4 different ways
to match it. For ";;;;;;" that are 4+6=10 ways to match it.
For ";;;;;;;" I already prefer not to count them and for 40 semi-colons
the number of different ways to match it is staggering.
> How can I get the best of both worlds in this case (no infinite loops
> but working fontification)?
Just match outline-regexp and then call outline-level to find the
level number.
Stefan
- Re: Modern Conventions for Emacs Lisp files?, (continued)
- Re: Modern Conventions for Emacs Lisp files?, Thorsten Jolitz, 2013/04/13
- Re: Modern Conventions for Emacs Lisp files?, Stefan Monnier, 2013/04/13
- Re: Modern Conventions for Emacs Lisp files?, Stefan Monnier, 2013/04/13
- Re: Modern Conventions for Emacs Lisp files?, Thorsten Jolitz, 2013/04/14
- Re: Modern Conventions for Emacs Lisp files?, Thorsten Jolitz, 2013/04/15
- Re: Modern Conventions for Emacs Lisp files?, Eli Zaretskii, 2013/04/15
- Re: Modern Conventions for Emacs Lisp files?, Thorsten Jolitz, 2013/04/15
- Re: Modern Conventions for Emacs Lisp files?,
Stefan Monnier <=
- Re: Modern Conventions for Emacs Lisp files?, Bastien, 2013/04/15
- Naming internal functions (was: Modern Conventions for Emacs Lisp files?), Christopher Schmidt, 2013/04/08
- Re: Naming internal functions, Stefan Monnier, 2013/04/08
- Re: Naming internal functions, Christopher Schmidt, 2013/04/15
- Re: Naming internal functions, Eli Zaretskii, 2013/04/15
- Re: Naming internal functions, Christopher Schmidt, 2013/04/15
- Re: Naming internal functions, Eli Zaretskii, 2013/04/15
- Re: Naming internal functions, Christopher Schmidt, 2013/04/15
- Re: Naming internal functions, xfq, 2013/04/15
Re: Modern Conventions for Emacs Lisp files?, Pascal J. Bourguignon, 2013/04/08