Milan Zamazal wrote:
"NS" == Nicolas Sceaux <[EMAIL PROTECTED]> 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
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel