Skip to content

font lock string face #64

Open
Open
@DanGrayson

Description

@DanGrayson

I use the code

(defconst M2-mode-font-lock-keywords ' ( "///\\(/?/?[^/]\\|\\(//\\)*////[^/]\\)*\\(//\\)*///" . 'font-lock-string-face) )

to try to highlight strings delimited by /// ... ///, but the regular expression is so complicated (with backtracking) that it can sometimes cause a delay up to 45 seconds when using C-s to search through a file, as @mikestillman has observed.

We could simplify the regular expression drastically to "///.*///", and not worry about getting every single case correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions