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: Kevin Rodgers
Subject: Re: changing syntax for a forward slash
Date: Wed, 05 Jul 2006 10:47:41 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

Tim Johnson wrote:
Hello:
I am working with a major mode derived from 'scheme-mode.
The forward slash '/' has a significance in the rebol language
that is similar to '.' in python or '->' in perl. In rebol. '/' is referred to as the "refinement operator".

for the following function call: append/only
I would like append to be highlighted as a keyword but not only

The output from describe-syntax shows the following entry:
- .. /                  _       which means: symbol

I take this to mean that the syntax table stores '/' as
a part of the symbol syntax class.

I use the following form as part of font-lock-keywords:
(,(concat "\\<\\(" rebol-functions-regexp "\\)\\>") 0 font-lock-keyword-face)

I am unclear as to whether I should be modifying the syntax
table or whether I should be modifying the last argument to
concat

As / seems to be an operator in your language I suggest changing its
syntax from symbol to punctuation.

--
Kevin





reply via email to

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