]> git.donarmstrong.com Git - lilypond.git/commitdiff
use only '.ly'-extension
authorHeikki Junes <heikki.junes@hut.fi>
Thu, 15 May 2003 19:45:14 +0000 (19:45 +0000)
committerHeikki Junes <heikki.junes@hut.fi>
Thu, 15 May 2003 19:45:14 +0000 (19:45 +0000)
ChangeLog
lilypond-mode.el

index 5e591cff6fa096961d502f54487dfa99d3e13c74..4b80ec943085762dd65886dbc8d9eb0992e823a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
 2003-05-15  Heikki Junes  <hjunes@cc.hut.fi>
 
        * lilypond-mode.el: Allow Midi on buffer.
+       Use only '.ly'-extension, remove '.sly' and '.fly'.
 
 2003-05-14  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
index 6b5fea2f3e5ec6fc6c6fd3ab0b0b94131049936f..3a6b6555f5a3790e06cff88a8956a17bf7417868 100644 (file)
@@ -379,10 +379,10 @@ LilyPond-expand-list.
                        (string :tag "Next Key")))))
 
 ;; drop this?
-(defcustom LilyPond-file-extensions '(".ly" ".sly" ".fly")
-  "*File extensions used by manually generated TeX files."
+(defcustom LilyPond-file-extension ".ly"
+  "*File extension used in LilyPond sources."
   :group 'LilyPond
-  :type '(repeat (string :format "%v")))
+  :type 'string)
 
 
 (defcustom LilyPond-expand-alist 
@@ -435,7 +435,7 @@ Must be the car of an entry in `LilyPond-command-alist'."
   (let* ((default (cond ((if (string-equal name LilyPond-region-file-prefix)
                             (LilyPond-check-files (concat name ".tex")
                                                   (list name)
-                                                  LilyPond-file-extensions)
+                                                  (list LilyPond-file-extension))
                           (if (verify-visited-file-modtime (current-buffer))
                               (if (buffer-modified-p)
                                   (if (y-or-n-p "Save buffer before next command? ")
@@ -521,21 +521,19 @@ Must be the car of an entry in `LilyPond-command-alist'."
        ;; urg
        (dir "./")
        (base LilyPond-region-file-prefix)
-       ;; Hmm
-       (ext (if (string-match "^[\\]score" (buffer-substring begin end))
-                ".ly"
-              (if (< 50 (abs (- begin end)))
-                  ".fly"
-                ".sly"))))
+       (ext LilyPond-file-extension))
     (concat dir base ext)))
 
+;;; Commands on Region work if there is an appropriate '\score'.
 (defun LilyPond-command-region (begin end)
   "Run LilyPond on the current region."
   (interactive "r")
   (write-region begin end (LilyPond-region-file begin end) nil 'nomsg)
   (LilyPond-command (LilyPond-command-query
                     (LilyPond-region-file begin end))
-                   '(lambda () (LilyPond-region-file begin end))))
+                   '(lambda () (LilyPond-region-file begin end)))
+  ;; Region may deactivate even if buffer was intact, reactivate?
+  )
 
 (defun LilyPond-command-buffer ()
   "Run LilyPond on buffer."