bug-lilypond
[Top][All Lists]
Advanced

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

Re: emacs mode


From: Chris Jackson
Subject: Re: emacs mode
Date: Mon, 15 Apr 2002 21:50:56 +0100
User-agent: Mutt/1.3.28i

On Mon, Apr 15, 2002 at 08:41:59PM +0200, Rune Zedeler wrote:
> "<" doesn't get interpreted correctly at the start of lines.
> I.e. typing
> 
> <
> >
> 
> gives a wrong colouring and a "mismatches parentheses" warning.

*aargh* I should have noticed that. Try this fix?

-- 
chris


Index: lilypond-font-lock.el
===================================================================
RCS file: /home/lilypond/lilypond/lilypond-font-lock.el,v
retrieving revision 1.15
diff -p -u -r1.15 lilypond-font-lock.el
--- lilypond-font-lock.el       15 Apr 2002 08:10:11 -0000      1.15
+++ lilypond-font-lock.el       15 Apr 2002 19:44:41 -0000
@@ -139,7 +139,7 @@
       '("\\([][}{]\\)" 0 font-lock-warning-face t)
       ;; these regexps allow angle-brackets to be highlighted when and only 
when they delimit simultaneous music
       ;; fontify open < but leave crescendos \< alone
-      '("[^\\]\\(<\\)" 1 font-lock-warning-face t)
+      '("\\([^\\]\\|^\\)\\(<\\)" 2 font-lock-warning-face t)
       ;; fontify the close-brackets in <a b c--> (tenuto) and <a b c-^> 
(marcato)
       '("[_^-]\\s-*[-^]\\s-*\\(>\\)" 1 font-lock-warning-face t) 
       ;; but leave a b c-> (accent) alone, accounting for whitespace
Index: lilypond-indent.el
===================================================================
RCS file: /home/lilypond/lilypond/lilypond-indent.el,v
retrieving revision 1.3
diff -p -u -r1.3 lilypond-indent.el
--- lilypond-indent.el  9 Apr 2002 09:13:40 -0000       1.3
+++ lilypond-indent.el  15 Apr 2002 19:44:41 -0000
@@ -255,7 +255,7 @@ Argument LIM limit."
 ;; are handled by the syntax table
 
 (defconst LilyPond-parens-regexp-alist
-  `( ( ?>  .  ("[^\\]<" . "[^ \\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>"))
+  `( ( ?>  .  ("\\([^\\]\\|^\\)<" . "[^ 
\\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>"))
      ;; a b c->, a b c^> and a b c_> are not close-angle-brackets, they're 
accents
      ;; but a b c^-> and a b c^^> are close brackets with tenuto/marcato 
before them
      ;; also \> and \< are hairpins




reply via email to

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