summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2013-06-16 22:05:29 +0200
committerDavid Kastrup <dak@gnu.org>2014-12-06 13:25:26 +0100
commit030bef2d4f4a7824c2c889b2abce0176ec6de884 (patch)
tree02409e5c8d1d28c1a766bebf02703700f3738e27 /elisp
parent548baf434eb7f66c849172afd388dcbc75926643 (diff)
Issue 4208/1: elisp/lilypond-indent.el: Use ?\[ and ?\] instead of ?[ and ?]
The unescaped character constants confuse Emacs' delimiter matching.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/lilypond-indent.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/elisp/lilypond-indent.el b/elisp/lilypond-indent.el
index bc04ed5a38..5e82148ccb 100644
--- a/elisp/lilypond-indent.el
+++ b/elisp/lilypond-indent.el
@@ -154,11 +154,11 @@ Returns nil if line starts inside a string"
;; start there too. If LilyPond-indent-level is zero, use
;; LilyPond-brace-offset instead
(+ (if (and (bolp) (zerop LilyPond-indent-level))
- (cond ((= (following-char) ?{)
+ (cond ((= (following-char) ?{)
LilyPond-brace-offset)
- ((= (following-char) ?<)
+ ((= (following-char) ?<)
LilyPond-angle-offset)
- ((= (following-char) ?[)
+ ((= (following-char) ?\[)
LilyPond-square-offset)
((= (following-char) ?\))
LilyPond-scheme-paren-offset)
@@ -196,7 +196,7 @@ Return the amount the indentation changed by."
(setq indent (+ indent (- LilyPond-close-brace-offset LilyPond-indent-level))))
((= (following-char) ?>)
(setq indent (+ indent (- LilyPond-close-angle-offset LilyPond-indent-level))))
- ((= (following-char) ?])
+ ((= (following-char) ?\])
(setq indent (+ indent (- LilyPond-close-square-offset LilyPond-indent-level))))
((and (= (following-char) ?\)) (LilyPond-inside-scheme-p))
(setq indent (+ indent (- LilyPond-close-scheme-paren-offset LilyPond-indent-level))))
@@ -204,7 +204,7 @@ Return the amount the indentation changed by."
(setq indent (+ indent LilyPond-brace-offset)))
((= (following-char) ?<)
(setq indent (+ indent LilyPond-angle-offset)))
- ((= (following-char) ?[)
+ ((= (following-char) ?\[)
(setq indent (+ indent LilyPond-square-offset)))
((and (= (following-char) ?\() (LilyPond-inside-scheme-p))
(setq indent (+ indent LilyPond-scheme-paren-offset)))
@@ -326,7 +326,7 @@ Argument LIM limit."
;; duh .. a single '>', as in chords '<< ... >>', was not matched here
( ?} . ("{" . "}"))
;; ligatures '\[ ... \]' are skipped in the following expression
- ( ?] . ("\\([^\\]\\([\\][\\]\\)*\\|^\\)[[]" . "\\([^\\]\\([\\][\\]\\)*\\|^\\)[]]"))
+ ( ?\] . ("\\([^\\]\\([\\][\\]\\)*\\|^\\)[[]" . "\\([^\\]\\([\\][\\]\\)*\\|^\\)[]]"))
( "\\]" . ("\\([^\\]\\|^\\)\\([\\][\\]\\)*[\\][[]" . "\\([^\\]\\|^\\)\\([\\][\\]\\)*[\\][]]"))
( "\\)" . ("\\([^\\]\\|^\\)\\([\\][\\]\\)*[\\][(]" . "\\([^\\]\\|^\\)\\([\\][\\]\\)*[\\][)]"))
))
@@ -335,7 +335,7 @@ Argument LIM limit."
(defconst LilyPond-parens-alist
`( ( ?< . ?> )
( ?{ . ?} )
- ( ?[ . ?] )
+ ( ?\[ . ?\] )
( "\\[" . "\\]" )
( ?\( . ?\) )
( "\\(" . "\\)" )
@@ -406,7 +406,7 @@ slur-paren-p defaults to nil.
(if (not (save-excursion (goto-char (match-end 0))
;; skip over strings and comments
(LilyPond-inside-string-or-comment-p)))
- (if (memq match '(?} ?> ?] ?\)))
+ (if (memq match '(?} ?> ?\] ?\)))
;; count closing brackets
(progn (setq level (1+ level))
;; slurs may be close to each other, e.g.,
@@ -492,7 +492,7 @@ builtin 'blink-matching-open' is not used. In syntax table, see
;; Test if a ligature \] or expressional slur \) was encountered
(setq bracket-type (char-after (point)))
(setq char-before-bracket-type nil)
- (if (memq bracket-type '(?] ?\) ?[ ?\())
+ (if (memq bracket-type '(?\] ?\) ?\[ ?\())
(progn
(setq np -1)
(while (eq (char-before (- (point) (setq np (+ np 1)))) ?\\)