all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Johnson <tim@johnsons-web.com>
Subject: Re: changing syntax for a forward slash
Date: Thu, 06 Jul 2006 16:56:52 -0000	[thread overview]
Message-ID: <slrneaqfcs.avk.tim@linus.johnson.com> (raw)
In-Reply-To: mailman.3789.1152118126.9609.help-gnu-emacs@gnu.org

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

  parent reply	other threads:[~2006-07-06 16:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-02 22:57 changing syntax for a forward slash Tim Johnson
2006-07-05 16:47 ` Kevin Rodgers
     [not found] ` <mailman.3789.1152118126.9609.help-gnu-emacs@gnu.org>
2006-07-06 16:56   ` Tim Johnson [this message]
2006-07-06 17:24     ` Johan Bockgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrneaqfcs.avk.tim@linus.johnson.com \
    --to=tim@johnsons-web.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.