summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorHeikki Junes <heikki.junes@hut.fi>2005-10-14 12:35:25 +0000
committerHeikki Junes <heikki.junes@hut.fi>2005-10-14 12:35:25 +0000
commit1ef65a651bc0af68f169b0052f2bad8984471e11 (patch)
treee8890bf89227a47eb10e1bd3a90e93fc802b6e75 /elisp
parentcfbe7661413b152a10293f3da7fb412e325254f9 (diff)
* elisp/lilypond-font-lock.el, elisp/lilypond-indent.el: Avoid nil
as an argument for char-syntax: use (char-syntax (or nil 0)) instead of (char-syntax nil), thanks to Milan Zamazal.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/lilypond-font-lock.el4
-rw-r--r--elisp/lilypond-indent.el2
2 files changed, 3 insertions, 3 deletions
diff --git a/elisp/lilypond-font-lock.el b/elisp/lilypond-font-lock.el
index 9e71ad6f02..224ab779de 100644
--- a/elisp/lilypond-font-lock.el
+++ b/elisp/lilypond-font-lock.el
@@ -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 '( ?\( ?\) )))
diff --git a/elisp/lilypond-indent.el b/elisp/lilypond-indent.el
index fd9ce60dab..de988f9ff5 100644
--- a/elisp/lilypond-indent.el
+++ b/elisp/lilypond-indent.el
@@ -383,7 +383,7 @@ slur-paren-p defaults to nil.
;; match concurrent one-char opening and closing slurs
(if (and (eq dir 1)
(not (sequencep bracket-type))
- (eq (char-syntax (char-after oldpos)) ?\()
+ (eq (char-syntax (or (char-after oldpos) 0)) ?\()
(not (eq (char-after oldpos) ?<)))
;; anyway do not count open slur, since already level = -1
(progn (forward-char 1)