]> git.donarmstrong.com Git - lilypond.git/blobdiff - elisp/lilypond-mode.el
Enhancement: 2 new markup-cmds: draw-dashed-line; draw-dotted-line
[lilypond.git] / elisp / lilypond-mode.el
index f014d1ca8bab7f89b5f8f8cc8b01777fd4072b57..bab58f29ed13ed44a2c15d59f6e8d60d4b943995 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; lilypond-mode.el -- Major mode for editing GNU LilyPond music scores
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;  
-;;;; Copyright (C) 1999--2010 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 1999--2012 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)
@@ -286,15 +286,14 @@ in LilyPond-include-path."
 (defun LilyPond-compile-file (command name)
   ;; We maybe should know what we run here (Lily, lilypond, tex)
   ;; and adjust our error-matching regex ?
-  (compile-internal
+  (compilation-start
    (if (eq LilyPond-command-current 'LilyPond-command-master)
        command
      ;; use temporary directory for Commands on Buffer/Region
      ;; hm.. the directory is set twice, first to default-dir
-     (concat "cd " (LilyPond-temp-directory) "; " command))
-   "No more errors" name))
+     (concat "cd " (LilyPond-temp-directory) "; " command))))
 
-;; do we still need this, now that we're using compile-internal?
+;; do we still need this, now that we're using compilation-start?
 (defun LilyPond-save-buffer ()
   "Save buffer and set default command for compiling."
   (interactive)
@@ -995,17 +994,17 @@ command."
 (defun LilyPond-menu-keywords ()
   "Make Insert Tag menu. 
 
-The Insert Tag -menu is splitted into parts if it is long enough."
+The Insert Tag -menu is split into parts if it is long enough."
 
   (let ((li (mapcar 'LilyPond-menu-keywords-item LilyPond-menu-keywords))
        (w (round (sqrt (length LilyPond-menu-keywords))))
-       (splitted '())
+       (split '())
        (imin 0) imax lw rw)
     (while (< imin (length LilyPond-menu-keywords))
       (setq imax (- (min (+ imin w) (length LilyPond-menu-keywords)) 1))
       (setq lw (nth imin LilyPond-menu-keywords)) 
       (setq rw (nth imax LilyPond-menu-keywords))
-      (add-to-list 'splitted
+      (add-to-list 'split
          (let ((l (list (concat (substring lw 0 (min 7 (length lw))) 
                                " ... " 
                                (substring rw 0 (min 7 (length rw)))))))
@@ -1013,7 +1012,7 @@ The Insert Tag -menu is splitted into parts if it is long enough."
             (add-to-list 'l (nth imin li))
             (setq imin (1+ imin)))
           (reverse l))))
-    (if (> (length LilyPond-menu-keywords) 12) (reverse splitted) li)))
+    (if (> (length LilyPond-menu-keywords) 12) (reverse split) li)))
 
 ;;; LilyPond-mode-menu should not be interactive, via "M-x LilyPond-<Tab>"
 (easy-menu-define LilyPond-mode-menu
@@ -1155,11 +1154,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