]> git.donarmstrong.com Git - lilypond.git/commitdiff
restructuring and commenting paren-highlight.
authorhjunes <hjunes>
Tue, 8 Jul 2003 22:12:01 +0000 (22:12 +0000)
committerhjunes <hjunes>
Tue, 8 Jul 2003 22:12:01 +0000 (22:12 +0000)
ChangeLog
lilypond-indent.el
lilypond-mode.el

index 785823dd0eb3441e3300fefad4ed2a62022a12a1..814051f2cb2d54a5a4a24e6bfcff2c7fffb1f8ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
 
        * Documentation/user/refman.itely: spelling fix.
 
+       * lilypond-mode.el, lilypond-indent.el: restrusture and comment.
+
 2003-07-07  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * input/template/jazz-combo.ly: new file.
index 50db7bb3433585674d7e03ccc634e190cec71613..0ba6240fd4d03503b73b9602828553ac89336603 100644 (file)
@@ -1,7 +1,8 @@
 ;;; lilypond-indent.el --- Auto-indentation for lilypond code
 ;;;
 ;;; Heikki Junes <hjunes@cc.hut.fi>
-;;; * redefine Emacs' show-paren-function and XEmacs' paren-highlight
+;;; * introduce Lilypond-show-paren-function for Emacs and 
+;;;             Lilypond-paren-highlight for XEmacs
 ;;; * match two-char slurs '\( ... \)' and '\[ ... \]' separately.
 ;;; * adopt Emacs' f90-comment-region
 
@@ -16,7 +17,7 @@
 ;;;    * in syntax-highlighting slurs are not always highlighted the right way
 ;;;      e.g. opening slurs are found found better in "#( ( ) ( ) )" than
 ;;;      opening slurs
-;;;    * is locality of show-paren-function and paren-highlight possible?
+;;;    * should make Lilypond-show-paren-mode instead of using show-paren-mode
 
 (defcustom LilyPond-indent-level 4
   "*Indentation of lilypond statements with respect to containing block.")
@@ -569,17 +570,10 @@ builtin 'blink-matching-open' is not used. In syntax table, see
 in XEmacs' paren-highlight."
   (LilyPond-blink-matching-paren dir))
 
-;;; REDEFINITIONS: in future make show-paren-mode and paren-highlight local?
-
 ;;; From Emacs' paren.el, with minimal changes (see "LilyPond"-lines)
 ;; Find the place to show, if there is one,
 ;; and show it until input arrives.
-; (defun show-paren-function ()
-
-
-;;  don't redefine emacs functions. It breaks other modes.
-
-(defun LilyPond-show-paren-function () ; make show-paren-function local ??
+(defun LilyPond-show-paren-function ()
   (if show-paren-mode
       (let (pos dir mismatch face (oldpos (point)))
        (cond ((eq (char-syntax (preceding-char)) ?\))
@@ -684,10 +678,7 @@ in XEmacs' paren-highlight."
 ;;; From XEmacs' paren.el, with minimal changes (see "LilyPond"-lines)
 ;; Find the place to show, if there is one,
 ;; and show it until input arrives.
-(if (string-match "XEmacs\\|Lucid" emacs-version)
-    (paren-set-mode 'paren)) ; works if this is set here (, right place?)
-;(defun paren-highlight ()
-(defun LilyPond-paren-highlight () ; make paren-highlight local ??
+(defun LilyPond-paren-highlight ()
   "This highlights matching parentheses.
 
 See the variables:
index 44d7e79499f10a7486f170a2ba7e210821419e20..44ea6075bba6704f7b2b3783795dee4a9b4cea3b 100644 (file)
@@ -1115,16 +1115,23 @@ LilyPond-xdvi-command\t\tcommand to display dvi files -- bit superfluous"
   (if (not (string-match "XEmacs\\|Lucid" emacs-version))
       (progn
        (make-local-variable 'show-paren-mode)
-       (setq show-paren-mode t)))
+       (setq show-paren-mode t))
+    (paren-set-mode 'paren))
 
   (if (not (string-match "XEmacs\\|Lucid" emacs-version))
       (progn
-       (make-local-variable 'show-paren-function)
-       ;;(setq show-paren-function 'LilyPond-show-paren-function) ; possible ?
+       ;; (make-local-variable 'show-paren-function) ; possible?
+       ;; (setq show-paren-function 'LilyPond-show-paren-function) ; possible?
+       ;;  don't redefine emacs functions. It breaks other modes.
+       ;;  should have an own idle-timer instead
+       ;; (defun show-paren-function () (LilyPond-show-paren-function)) ; for testing
        )
     (progn
-      (make-local-variable 'paren-highlight)
-      ;;(setq paren-highlight 'LilyPond-paren-highlight) ; possible ?
+      ;; (make-local-variable 'paren-highlight) ; possible?
+      ;; (setq paren-highlight 'LilyPond-paren-highlight) ; possible?
+      ;;  don't redefine Xemacs functions. It breaks other modes.
+      ;;  should have an own idle-timer instead
+      ;; (defun paren-highlight () (LilyPond-paren-highlight)) ; for testing
       ))
 
   ;; In XEmacs imenu was synched up with: FSF 20.4