help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

define-generic-mode multiline regexp for highlighting not work if edit h


From: Oleksandr Gavenko
Subject: define-generic-mode multiline regexp for highlighting not work if edit highlighted text.
Date: Sun, 04 Sep 2011 22:50:51 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11

dict -c5 source file format:

FILE is formatted with headwords preceded by 5 or more underscore
characters (_) and a blank line.

I write:

(define-generic-mode
  'dict-c5-mode
  nil
  nil
  '(
    ("^\\(_____+\\)

\\([^[:blank:]].*\\)$" (1 font-lock-function-name-face) (2 font-lock-keyword-face))
    )
  '("\\.c5$" "\\.dict-c5$")
  nil
  nil
  )

If open file or M-x revert-buffer then all highlighted correctly.

If I edit highlighted text (add underscores to 'first 5' or chars to
'headword' or delete chars from 'headword') highlighting disappier.

--
Best regards!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]