From: Heikki Junes Date: Tue, 6 May 2003 21:30:32 +0000 (+0000) Subject: fontify ligature-slurs, commenting. X-Git-Tag: release/1.7.20~65 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5f4c723f182730bd4b82064c9d21c91c4e218bdc;p=lilypond.git fontify ligature-slurs, commenting. --- diff --git a/ChangeLog b/ChangeLog index 8e4b9b4d30..97cfcdc199 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-05-06 Heikki Junes + + * lilypond-mode.el: un-commenting works after syntax-table fix. + + * lilypond-font-lock.el: fontify \[- and \]-slurs as horizontal + group, verbose commenting for syntax table. + + * lilypond-indent.el: add TODO for ligature slurs. + 2003-05-05 Heikki Junes * lilypond-mode.el: Move comments of parenthesis matching away, diff --git a/lilypond-font-lock.el b/lilypond-font-lock.el index ae8d0e3616..b60b6579e7 100644 --- a/lilypond-font-lock.el +++ b/lilypond-font-lock.el @@ -10,8 +10,8 @@ ;; Author: 1995-1996 Barry A. Warsaw ;; 1992-1994 Tim Peters ;; Created: Feb 1992 -;; Version: 1.7.12 -;; Last Modified: 26DEC2003 +;; Version: 1.7.18 +;; Last Modified: 6MAY2003 ;; Keywords: lilypond languages music notation ;; This software is provided as-is, without express or implied @@ -88,7 +88,8 @@ ;; "on top", ... horizontal grouping: ;; - brackets '{[]}' ;; - ties '~' - '("\\([][~}{]\\)" 0 font-lock-warning-face t) +;; - ligatures \[, \] + '("\\([][~}{]\\|\\\\[][]\\)" 0 font-lock-warning-face t) ;; "on top", ... vertical grouping: ;; - '<>'-chord brackets with '\\'-voice sep., not marcato '->' @@ -129,21 +130,28 @@ (mapcar (function (lambda (x) (modify-syntax-entry (car x) (cdr x) LilyPond-mode-syntax-table))) - '(( ?\( . "." ) ( ?\) . "." ) - ( ?\[ . "(]" ) ( ?\] . ")[" ) ; all the other paren characters are now handled by - ( ?\{ . ". 2" ) ; lily-specific indenting/matching code in lilypond-indent.el - ( ?\} . ". 4" ) + '( + ;; also '['- and ']'-slurs should be handled by lilypond-indent.el + ;; in order to match also '\['- and '\]'-slurs in ligatures + ( ?\[ . "(]" ) ( ?\] . ")[" ) ; handled by the syntax table + ;; all the other paren characters are now handled by + ;; lily-specific indenting/matching code in lilypond-indent.el + ( ?\( . "." ) ( ?\) . "." ) ( ?\< . "." )( ?\> . ".") + ( ?\{ . ". 2" ) ; also 2nd char in begin of block-comment + ( ?\} . ". 4" ) ; also 2nd char in end of block-comment + ( ?\% . "< 13" ) ; comment starter, 1st char in block-comments + ( ?\n . ">") ; newline: comment ender + ( ?\r . ">") ; formfeed: comment ender + ( ?\\ . "\\" ) ; escape characters (as '\n' in strings) + ( ?\" . "\"" ) ; string quote characters + ;; word constituents (e.g., belonging to a note) + ( ?\' . "w") ( ?\, . "w") ; transposing octaves + ;; punctuation characters (separate symbols from another) ( ?\$ . "." ) ( ?\& . "." ) - ( ?\* . "." ) ( ?\+ . "." ) - ( ?\/ . "." ) ( ?\= . "." ) - ( ?\| . "." ) (?\\ . "\\" ) - ( ?\- . "." ) ( ?\_ . "." ) ( ?\^ . "." ) ; accent positioners: puctuation characters - ( ?\' . "w") ( ?\, . "w") ; transposing octaves, parts of words (notes) - ( ?\" . "\"" ) ; string quote characters - ( ?\% . "< 13" ) ; (block-)comment starter (or ender) - ( ?\n . ">") ; newline: comment ender - ( ?\r . ">") ; formfeed: comment ender + ( ?\* . "." ) ( ?\+ . "." ) ( ?\/ . "." ) ( ?\= . "." ) + ( ?\| . "." ) ; bar line + ( ?\- . "." ) ( ?\_ . "." ) ( ?\^ . "." ) ; accent positioners )) ) diff --git a/lilypond-indent.el b/lilypond-indent.el index 3a10a11ed6..a9a9ae66c1 100644 --- a/lilypond-indent.el +++ b/lilypond-indent.el @@ -8,6 +8,8 @@ ;;; TODO: ;;; * emulate show-paren-mode ;;; * separate '('- and ')'-slurs from '\('- and '\)'-slurs. +;;; * include '['- and ']'-slurs from syntax table +;;; in order to match also '\['- and '\]'-slurs in ligatures (defcustom LilyPond-indent-level 4 "*Indentation of lilypond statements with respect to containing block.") diff --git a/lilypond-mode.el b/lilypond-mode.el index 9f5e626963..dd69872a8a 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -22,7 +22,7 @@ (require 'easymenu) (require 'compile) -(defconst LilyPond-version "1.7.12" +(defconst LilyPond-version "1.7.18" "`LilyPond-mode' version number.") (defconst LilyPond-help-address "bug-lilypond@gnu.org" @@ -501,7 +501,7 @@ Must be the car of an entry in `LilyPond-command-alist'." (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) ) -;; FIXME, does not find commend ender +;;; Refer to syntax-table (in lilypond-font-lock.el) for comment characters. (defun LilyPond-un-comment-region (start end level) "Remove up to LEVEL comment characters from each line in the region." (interactive "*r\np")