From: Heikki Junes Date: Thu, 15 May 2003 19:45:14 +0000 (+0000) Subject: use only '.ly'-extension X-Git-Tag: release/1.7.20~52 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=85205a4f62d4264f6e9486239d8519d9e822dce7;p=lilypond.git use only '.ly'-extension --- diff --git a/ChangeLog b/ChangeLog index 5e591cff6f..4b80ec9430 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ 2003-05-15 Heikki Junes * lilypond-mode.el: Allow Midi on buffer. + Use only '.ly'-extension, remove '.sly' and '.fly'. 2003-05-14 Han-Wen Nienhuys diff --git a/lilypond-mode.el b/lilypond-mode.el index 6b5fea2f3e..3a6b6555f5 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -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."