diff options
author | David Kastrup <dak@gnu.org> | 2013-06-16 22:11:09 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2014-12-06 13:25:26 +0100 |
commit | a2c45742078a527a0f418ac45239467e0c5c380f (patch) | |
tree | e06921d282b3c070773febde430ce5e2d8dce068 /elisp | |
parent | 030bef2d4f4a7824c2c889b2abce0176ec6de884 (diff) |
Issue 4208/2: Emacs mode: both # and $ should start Scheme
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/lilypond-indent.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/elisp/lilypond-indent.el b/elisp/lilypond-indent.el index 5e82148ccb..70d24f9b18 100644 --- a/elisp/lilypond-indent.el +++ b/elisp/lilypond-indent.el @@ -452,17 +452,16 @@ slur-paren-p defaults to nil. (let ( (test-point (point)) (level 0) ) (save-excursion - (if (or (and (/= (point) (point-max)) - (= (char-after (point)) ?\() - (or (= (char-after (- (point) 1)) ?#) - (and (= (char-after (- (point) 2)) ?#) - (= (char-after (- (point) 1)) ?`)))) - (and (re-search-backward "#(\\|#`(" nil t) + (if (or (and (eq (char-after (point)) ?\() + (save-excursion + (skip-chars-backward "'`") + (memq (char-before) '(?# ?$)))) + (and (re-search-backward "[#$][`']?(" nil t) (progn (search-forward "(") (setq level 1) (while (and (> level 0) - (re-search-forward "(\\|)" test-point t) + (re-search-forward "[()]" test-point t) (setq match (char-after (match-beginning 0))) (<= (point) test-point)) (if (= match ?\() |