all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Escaped double quote breaks syntax highlighting
@ 2006-07-11 17:53 Tim Johnson
  2006-07-11 18:24 ` Johan Bockgård
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Johnson @ 2006-07-11 17:53 UTC (permalink / raw)


I'm working on a mode for the rebol programming language.
The mode is derived from scheme (using 'define-derived-mode)

Rebol uses ^ (caret) as the escape character.

The syntax table is installed with the following relevant code:
  (modify-syntax-entry ?^ "\\   ")

When the mode is loaded Alt-x describe-syntax shows the following
relevant output:
^				\ 	which means: escape

Unhappily though, when I place the follow sequence: ^"
inside of a string, the syntax highlighting following that sequence
fails to render properly.

What else do I need to do? 
What documentation is available for this topic?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Escaped double quote breaks syntax highlighting
  2006-07-11 17:53 Escaped double quote breaks syntax highlighting Tim Johnson
@ 2006-07-11 18:24 ` Johan Bockgård
  2006-07-11 19:55   ` Tim Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Bockgård @ 2006-07-11 18:24 UTC (permalink / raw)


Tim Johnson <tim@johnsons-web.com> writes:

> Unhappily though, when I place the follow sequence: ^" inside of a
> string, the syntax highlighting following that sequence fails to
> render properly.
>
> What else do I need to do?

Investigate `font-lock-syntax-table'.

> What documentation is available for this topic?

(info "(elisp)Syntactic Font Lock")

-- 
Johan Bockgård

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Escaped double quote breaks syntax highlighting
  2006-07-11 18:24 ` Johan Bockgård
@ 2006-07-11 19:55   ` Tim Johnson
  2006-07-11 20:55     ` Tim Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Johnson @ 2006-07-11 19:55 UTC (permalink / raw)


On 2006-07-11, Johan Bockgård <bojohan+news@dd.chalmers.se> wrote:
> Tim Johnson <tim@johnsons-web.com> writes:
>
>> Unhappily though, when I place the follow sequence: ^" inside of a
>> string, the syntax highlighting following that sequence fails to
>> render properly.
>>
>> What else do I need to do?

 Hi:
> Investigate `font-lock-syntax-table'.

 It is nil in that mode
>> What documentation is available for this topic?
>
> (info "(elisp)Syntactic Font Lock")

  Information that I found references font-lock-syntactic-keywords
  As I posted originally, the variable was nil in the mode.

  I added the following to the derived-mode form:

  (set (make-local-variable 'font-lock-syntactic-keywords)
    '(("\\^\\(\"\\)" 1 "\"")))

  However, I still have the same problem.
  thanks
  tim

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Escaped double quote breaks syntax highlighting
  2006-07-11 19:55   ` Tim Johnson
@ 2006-07-11 20:55     ` Tim Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Johnson @ 2006-07-11 20:55 UTC (permalink / raw)


On 2006-07-11, Tim Johnson <tim@johnsons-web.com> wrote:
>
>   (set (make-local-variable 'font-lock-syntactic-keywords)
>     '(("\\^\\(\"\\)" 1 "\"")))
  
  
   (set (make-local-variable 'font-lock-syntactic-keywords)
        '(("\\^\\(\"\\)" 1 ".")))  

   ;; appears to have the
   ;; correct effect. If I understand the process, here
   ;; we tell emacs that the caret/doublequote combination
   ;; evaluates to the symbol syntax class.

   Comments, corrections are welcome.
   Thanks as always to Johan.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-11 20:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 17:53 Escaped double quote breaks syntax highlighting Tim Johnson
2006-07-11 18:24 ` Johan Bockgård
2006-07-11 19:55   ` Tim Johnson
2006-07-11 20:55     ` Tim Johnson

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.