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

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

Re: changing syntax for a forward slash


From: Tim Johnson
Subject: Re: changing syntax for a forward slash
Date: Thu, 06 Jul 2006 16:56:52 -0000
User-agent: slrn/0.9.8.0 (Linux)

On 2006-07-05, Kevin Rodgers <ihs_4664@yahoo.com> wrote:
> Tim Johnson wrote:
>> - .. /                       _       which means: symbol
>> I use the following form as part of font-lock-keywords:
>> (,(concat "\\<\\(" rebol-functions-regexp "\\)\\>") 
>>   0 font-lock-keyword-face)
>
> As / seems to be an operator in your language I suggest changing its
> syntax from symbol to punctuation.

  Thank you Kevin:
  I'm following your advice. I have also changed the 'boundary
  subexpression to identify the end of a keyword:
  it is now: "\\)\\(\\>\\|/\\)"

  and the relevant sexp looks like this
 (,(concat "\\<\\(" rebol-functions-regexp "\\)\\(\\>\\|/\\)") 
   0 font-lock-keyword-face)
 
  Now, when I code: append/only the 'append/' is highlighted
  and 'only' is not.
 
  One more step: I would like to exclude '/' from being highlighted
  so that one 'append' is highlighted.

  So I would like to know how to prevent the '/' from being
  "consumed" by the regexp.

  I'm now reading the info page on regexps but still do not
  deduce a solution.

  Any ideas?
  regards
  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]