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

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

Re: Regex Expression for syntax highlight between delimiters


From: Tim Johnson
Subject: Re: Regex Expression for syntax highlight between delimiters
Date: Sun, 12 Feb 2006 09:45:02 -0900
User-agent: Mutt/1.4.2.1i

* Tim Johnson <tim@johnsons-web.com> [060211 22:14]:
> Hello:
> The following form is used to provide syntax highlighting for
> a 'lisp variant. The regex expression for 'font-lock-string-face
> doesn't work. The other forms do work as expected.
> (cond (running-xemacs)  ;; Xemacs doesn't have 'font-lock-add-keywords
>   (t
>     (make-local-variable 'lisp-font-lock-keywords-tj)
>     (defvar newlisp-font-lock-keywords-tj  ;; faces defined in 'extra-faces
>     (list
>       (list tj-newlisp-user-keywords '1 'font-lock-user-keyword-face)
>       (list tj-newlisp-user-lib-keywords '1 'font-lock-user-lib-face)
>       (list tj-newlisp-constant-keywords '1 'font-lock-constant-face)
>       '("\\[text\\][^\"]*[.]*[^\"]*\\[/text\\]" 1 font-lock-string-face t) ;; 
> This one doesn't work
>       ) "Additional keywords and groups for lisp-mode")))
> ;; .......
> 
> The regex is meant to highlight the delimiters "[text]" & "[/text]" and
> everything between (multi-line string literal). The regex itself was tested 
> with re-builder, seems
> to work there. 
> 
> Can anyone tell me what else I need to do here? 
 
  Okay. I fixed this one. 
  [^#]\\(\\[text\\][^{}]*\\[/text\\]\\) 
  is the regex that I need. 
  But comments are still welcome...
  tim


-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com




reply via email to

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