[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs mode
From: |
Chris Jackson |
Subject: |
Re: Emacs mode |
Date: |
Mon, 18 Mar 2002 13:28:58 +0000 |
User-agent: |
Mutt/1.3.27i |
On Mon, Mar 18, 2002 at 01:28:07PM +0100, Rune Zedeler wrote:
> Finally I installed the new emacs-mode.
> The worst thing is that it only matches the curly brackets (and not '[]'
> '()' or '<>').
> Please fix at least '<>' before 1.6
By 'match' I guess you mean blink on the beginning-< when an end > is
inserted. This is because I removed <> and () from the emacs syntax
table for .ly files. The built-in parenthesis-matching function relies
on the syntax table to determine what is a paren.
However in lily, to make indentation and fontifying work properly with
accents or dynamic markings in chords (e.g. < f \> a c-> > ), we need a
regexp to denote a member of a parenthesis-pair. Emacs syntax tables
will only accept single characters (or double characters, in the case of
comments). A similar problem occurs with () meaning either Scheme or a
phrasing-slur, depending on context, and the emacs syntax table
doesn't understand context.
I suppose a solution might be to write a lily-specific paren-blinking
function.
(meanwhile this patch will take care of [ ] ...)
--- lilypond-font-lock.el~ Fri Mar 15 13:17:12 2002
+++ lilypond-font-lock.el Mon Mar 18 13:19:38 2002
@@ -163,7 +163,7 @@
(lambda (x) (modify-syntax-entry
(car x) (cdr x) LilyPond-mode-syntax-table)))
'(( ?\( . "." ) ( ?\) . "." )
- ( ?\[ . "." ) ( ?\] . "." )
+ ( ?\[ . "(]" ) ( ?\] . ")[" )
( ?\{ . "(}2b" )
( ?\} . "){4b" )
( ?\< . "." )( ?\> . ".")
--
chris
- Emacs mode, Rune Zedeler, 2002/03/18
- Re: Emacs mode,
Chris Jackson <=