From: Heikki Junes Date: Mon, 5 May 2003 19:38:51 +0000 (+0000) Subject: fix syntax-table. X-Git-Tag: release/1.7.20~67 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=66a5b4ee6d91d23158bfbf20b0edc1bb6b0fc4af;p=lilypond.git fix syntax-table. --- diff --git a/ChangeLog b/ChangeLog index 3fa2841960..2683fb5527 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-05-05 Heikki Junes + + * lilypond-mode.el: Move comments of parenthesis matching below. + + * lilypond-font-lock.el: Fix parent-matching for Emacs: + Emacs knows only "13"-style, XEmacs knows also "1b3b", etc. + + * lilypond-indent.el: Add TODO. + 2003-05-03 Heikki Junes * lilypond-mode.el: Fix XEmacs: diff --git a/lilypond-font-lock.el b/lilypond-font-lock.el index f8518df97c..ae8d0e3616 100644 --- a/lilypond-font-lock.el +++ b/lilypond-font-lock.el @@ -122,17 +122,17 @@ (defvar LilyPond-mode-syntax-table nil "Syntax table used in `LilyPond-mode' buffers.") -;; (if LilyPond-mode-syntax-table () (setq LilyPond-mode-syntax-table (make-syntax-table)) + ;; NOTE: Emacs knows only "13"-style (used), XEmacs knows also "1b3b", etc. (mapcar (function (lambda (x) (modify-syntax-entry (car x) (cdr x) LilyPond-mode-syntax-table))) '(( ?\( . "." ) ( ?\) . "." ) - ( ?\[ . "(]" ) ( ?\] . ")[" ) ;; all the other paren characters are now handled by - ( ?\{ . ". 2b" ) ;; lily-specific indenting/matching code in lilypond-indent.el - ( ?\} . ". 4b" ) + ( ?\[ . "(]" ) ( ?\] . ")[" ) ; all the other paren characters are now handled by + ( ?\{ . ". 2" ) ; lily-specific indenting/matching code in lilypond-indent.el + ( ?\} . ". 4" ) ( ?\< . "." )( ?\> . ".") ( ?\$ . "." ) ( ?\& . "." ) ( ?\* . "." ) ( ?\+ . "." ) @@ -141,7 +141,7 @@ ( ?\- . "." ) ( ?\_ . "." ) ( ?\^ . "." ) ; accent positioners: puctuation characters ( ?\' . "w") ( ?\, . "w") ; transposing octaves, parts of words (notes) ( ?\" . "\"" ) ; string quote characters - ( ?\% . "< 1b3b" ) ; (block-)comment starter (or ender) + ( ?\% . "< 13" ) ; (block-)comment starter (or ender) ( ?\n . ">") ; newline: comment ender ( ?\r . ">") ; formfeed: comment ender )) diff --git a/lilypond-indent.el b/lilypond-indent.el index 4e11faae60..ca463e838c 100644 --- a/lilypond-indent.el +++ b/lilypond-indent.el @@ -5,6 +5,11 @@ ;;; Variables for customising indentation style +;;; TODO: +;;; * emulate show-paren-mode +;;; * separate slurs '(' and ')' from '\(' and '\)' +;;; * blinking is not shonw in Emacs, but is shown in XEmacs + (defcustom LilyPond-indent-level 4 "*Indentation of lilypond statements with respect to containing block.") @@ -435,7 +440,3 @@ the syntax table" (progn (backward-char 1) (LilyPond-blink-matching-open close-char) (forward-char 1))))) - - -;;; TODO: -;;; emulate show-paren-mode diff --git a/lilypond-mode.el b/lilypond-mode.el index 677e2a76d9..6937de863a 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -19,9 +19,6 @@ ;;; Look lilypond-init.el or Documentation/topdocs/INSTALL.texi ;;; for installing instructions. -;;; TODO: -;;; * parenthesis matching - (require 'easymenu) (require 'compile) @@ -675,9 +672,9 @@ command." (define-key LilyPond-mode-map "\C-cs" 'LilyPond-insert-tag-score) (define-key LilyPond-mode-map "\C-c:" 'LilyPond-un-comment-region) (define-key LilyPond-mode-map "\C-c;" 'comment-region) - (define-key LilyPond-mode-map ")" 'LilyPond-electric-close-paren) ; urgh - (define-key LilyPond-mode-map ">" 'LilyPond-electric-close-paren) ; argh - (define-key LilyPond-mode-map "}" 'LilyPond-electric-close-paren) ; ..rgh + (define-key LilyPond-mode-map ")" 'LilyPond-electric-close-paren) + (define-key LilyPond-mode-map ">" 'LilyPond-electric-close-paren) + (define-key LilyPond-mode-map "}" 'LilyPond-electric-close-paren) (define-key LilyPond-mode-map [(shift iso-lefttab)] 'LilyPond-autocompletion) (define-key LilyPond-mode-map "\C-c\t" 'LilyPond-info-index-search) ) @@ -1080,8 +1077,8 @@ LilyPond-xdvi-command\t\tcommand to display dvi files -- bit superfluous" (setq imenu-generic-expression LilyPond-imenu-generic-expression) (imenu-add-to-menubar "Index") - (easy-menu-add LilyPond-mode-menu) ;; automatically added in Emacs, but - (easy-menu-add LilyPond-command-menu) ;; explicitly added in XEmacs + (easy-menu-add LilyPond-mode-menu) ; automatically added in Emacs, but + (easy-menu-add LilyPond-command-menu) ; explicitly added in XEmacs ;; run the mode hook. LilyPond-mode-hook use is deprecated (run-hooks 'LilyPond-mode-hook))