lilypond-devel
[Top][All Lists]
Advanced

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

Re: Lilypond and Emacs mode for Emacs 22


From: Heikki Junes
Subject: Re: Lilypond and Emacs mode for Emacs 22
Date: Fri, 14 Oct 2005 15:38:01 +0300
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

Milan Zamazal wrote:

"NS" == Nicolas Sceaux <address@hidden> writes:

   NS> Using in Emacs 22.0.50.1, I applied the following patch.

The following additional patch seems to be needed to avoid an error in
post-command-hook:

------------------------------------------------------------------------

--- lilypond0/lilypond-font-lock.el     2005-10-13 11:12:36.000000000 +0200
+++ lilypond/lilypond-font-lock.el      2005-10-13 15:03:48.000000000 +0200
@@ -180,8 +180,8 @@
  (setq context (parse-partial-sexp (point-min) (point)))
  (cond ((nth 3 context)) ; inside string
        ((nth 4 context)) ; inside a comment
-       ((eq (char-syntax (char-before (point))) ?\\)) ; found escape-char
-       ((and (eq (char-syntax (char-before (- (point) 1))) ?\\)
+       ((eq (char-syntax (or (char-before (point)) 0)) ?\\)) ; found 
escape-char
+       ((and (eq (char-syntax (or (char-before (- (point) 1)) 0)) ?\\)
              (memq (char-before (point)) '( ?\) ?\] )))) ; found escape-char
        ((memq (char-before (point)) '( ?\) ))
         (LilyPond-mode-set-syntax-table '( ?\( ?\) )))
------------------------------------------------------------------------


Regards,

Milan Zamazal
Thanks for hunting a bug. (char-syntax nil) gives indeed an error.
Especially, (char-before (point)) is nil at the beginning of the file being edited.

Fixed in CVS.

Heikki




reply via email to

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