+2003-06-10 Heikki Junes <hjunes@cc.hut.fi>
+
+ * lilypond-indent.el: Match better slurs in scheme expressions.
+ Refontify buffer if a block-comment-ender, '}' after '%', is inserted.
+
2003-06-10 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/chord-name.scm (set-chord-name-style): Update for 'ignatzek.
(setq paren-regexp (concat (mapconcat 'car (mapcar 'cdr regexp-alist) "\\|") "\\|"
(mapconcat 'cdr (mapcar 'cdr regexp-alist) "\\|")))))
(if (and (eq dir 1)
- (memq (char-after oldpos) '(?[ ?{)))
+ (memq (char-after oldpos) '(?[ ?{ ?\()))
(forward-char 1))
(while (and (if (not (eq dir 1))
(> level 0)
(progn
(if (sequencep bracket-type)
(if (looking-at "..[][)(]") (forward-char 1)))
- (if (looking-at ".[][><)(]") (forward-char 1)))
+ (if (and (not (looking-at "[)(]"))
+ (looking-at ".[][><)(]")) (forward-char 1)))
(backward-char 1))
(if (= level 0)
(point)
(interactive)
(let ((oldpos (point)))
(self-insert-command 1)
- (if (and blink-matching-paren
- (not (LilyPond-inside-string-or-comment-p))
- (save-excursion (re-search-backward
- (concat (mapconcat 'cdr (mapcar 'cdr LilyPond-parens-regexp-alist) "\\|") "\\|)") nil t)
- (eq oldpos (1- (match-end 0)))))
- (progn (backward-char 1)
- (LilyPond-blink-matching-paren)
- (forward-char 1)))))
+ ;; Refontify buffer if a block-comment-ender '%}' is inserted
+ (if (and (eq (char-before (point)) ?})
+ (eq (char-before (- (point) 1)) ?%))
+ (font-lock-fontify-buffer)
+ ;; Match paren if the cursor is not inside string or comment.
+ (if (and blink-matching-paren
+ (not (LilyPond-inside-string-or-comment-p))
+ (save-excursion (re-search-backward
+ (concat (mapconcat 'cdr (mapcar 'cdr LilyPond-parens-regexp-alist) "\\|") "\\|)") nil t)
+ (eq oldpos (1- (match-end 0)))))
+ (progn (backward-char 1)
+ (LilyPond-blink-matching-paren)
+ (forward-char 1))))))
;;; REDEFINITIONS
(defun scan-sexps (pos dir)