]> git.donarmstrong.com Git - lilypond.git/blobdiff - elisp/lilypond-mode.el
Imported Upstream version 2.14.2
[lilypond.git] / elisp / lilypond-mode.el
index 97778dc460352650fa20ef0621a7426c2f7e0c54..d39b0d1d2fc827dc86d16ee11e83051572cc1835 100644 (file)
@@ -1,15 +1,26 @@
-;;;;
-;;;; lilypond-mode.el --- Major mode for editing GNU LilyPond music scores
-;;;;
-;;;; source file of the GNU LilyPond music typesetter
+;;;; lilypond-mode.el -- Major mode for editing GNU LilyPond music scores
+;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;  
-;;;; (c) 1999--2009 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;; 
+;;;; Copyright (C) 1999--2011 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;; Changed 2001--2003 Heikki Junes <heikki.junes@hut.fi>
 ;;;;    * Add PS-compilation, PS-viewing and MIDI-play (29th Aug 2001)
 ;;;;    * Keyboard shortcuts (12th Sep 2001)
 ;;;;    * Inserting tags, inspired on sgml-mode (11th Oct 2001)
 ;;;;    * Autocompletion & Info (23rd Nov 2002)
+;;;;
+;;;; LilyPond is free software: you can redistribute it and/or modify
+;;;; it under the terms of the GNU General Public License as published by
+;;;; the Free Software Foundation, either version 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; LilyPond is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+
 
 ;;; Inspired on auctex
 
@@ -32,7 +43,7 @@
   "File prefix for commands on buffer or region.")
 
 (defvar LilyPond-master-file nil
-  "Master file that Lilypond will be run on.")
+  "Master file that LilyPond will be run on.")
 
 ;; FIXME: find ``\score'' in buffers / make settable?
 (defun LilyPond-get-master-file ()
@@ -756,7 +767,7 @@ command."
   (define-key LilyPond-mode-map "\C-cb" 'LilyPond-what-beat)
   (define-key LilyPond-mode-map "\C-cf" 'font-lock-fontify-buffer)
   (define-key LilyPond-mode-map "\C-ci" 'LilyPond-insert-tag-current)
-  ;; the following will should be overriden by Lilypond Quick Insert Mode
+  ;; the following will should be overridden by LilyPond Quick Insert Mode
   (define-key LilyPond-mode-map "\C-cq" 'LilyPond-quick-insert-mode)
   (define-key LilyPond-mode-map "\C-c;" 'LilyPond-comment-region)
   (define-key LilyPond-mode-map ")" 'LilyPond-electric-close-paren)
@@ -1144,11 +1155,12 @@ LilyPond-command-alist\t\talist from name to command"
 
   ;; Use Command on Region even for inactive mark (region).
   (if (string-match "XEmacs\\|Lucid" emacs-version)
-      (setq zmacs-regions nil)
+      (progn
+       (setq zmacs-regions nil)
+       (make-local-hook 'post-command-hook)) ; XEmacs requires
     (setq mark-even-if-inactive t))
 
   ;; Context dependent syntax tables in LilyPond-mode
-  (make-local-hook 'post-command-hook) ; XEmacs requires
   (add-hook 'post-command-hook 'LilyPond-mode-context-set-syntax-table nil t)
 
   ;; Turn on paren-mode buffer-locally, i.e., in LilyPond-mode