]> git.donarmstrong.com Git - lilypond.git/commitdiff
use temp-dir, xemacs-fix
authorHeikki Junes <heikki.junes@hut.fi>
Sun, 18 May 2003 23:36:13 +0000 (23:36 +0000)
committerHeikki Junes <heikki.junes@hut.fi>
Sun, 18 May 2003 23:36:13 +0000 (23:36 +0000)
ChangeLog
lilypond-mode.el

index 64342489ec53d9516267b2c3c147a9c1f5ab5a73..402a4ee82811882ff8ee515cb082984477c3f79a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-19  Heikki Junes  <hjunes@cc.hut.fi>
+
+       * lilypond-mode.el: Use temp-dir for Commands on Buffer/Region.
+       Use inactive regions also in XEmacs.
+
 2003-05-18  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * Documentation/user/refman.itely (Repeat syntax): more updates
index e8d56e14a62459630356b7317595b5308787a745..8d2af5265301e1cff8ca84bcec671039fc088d75 100644 (file)
@@ -211,7 +211,13 @@ in LilyPond-include-path."
 (defun LilyPond-compile-file (command name)
   ;; We maybe should know what we run here (Lily, ly2dvi, tex)
   ;; and adjust our error-matching regex ?
-  (compile-internal command "No more errors" name ))
+  (compile-internal
+   (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))
 
 ;; do we still need this, now that we're using compile-internal?
 (defun LilyPond-save-buffer ()
@@ -522,9 +528,8 @@ Must be the car of an entry in `LilyPond-command-alist'."
 ;; FIXME, this is broken
 (defun LilyPond-region-file (begin end)
   (let (
-       ;; (dir "/tmp/")
-       ;; urg
-       (dir "./")
+       ;; (dir "./")
+       (dir (LilyPond-temp-directory))
        (base LilyPond-region-file-prefix)
        (ext LilyPond-file-extension))
     (concat dir base ext)))
@@ -656,6 +661,13 @@ command."
   (and transient-mark-mode
        (if (string-match "XEmacs\\|Lucid" emacs-version) (mark) mark-active)))
 
+(defun LilyPond-temp-directory ()
+  "Temporary file directory for Commands on Region."
+  (interactive)
+  (if (string-match "XEmacs\\|Lucid" emacs-version)
+      (concat (temp-directory) "/")
+    temporary-file-directory))
+
 ;;; Keymap
 
 (defvar LilyPond-mode-map ()
@@ -1116,8 +1128,10 @@ LilyPond-xdvi-command\t\tcommand to display dvi files -- bit superfluous"
   (easy-menu-add LilyPond-mode-menu)
   (easy-menu-add LilyPond-command-menu)
 
-  ;; Use Command on Region even for deactivated regions.
-  (setq mark-even-if-inactive t)
+  ;; Use Command on Region even for inactive mark (region).
+  (if (string-match "XEmacs\\|Lucid" emacs-version)
+      (setq zmacs-regions nil)
+    (setq mark-even-if-inactive t))
 
   ;; run the mode hook. LilyPond-mode-hook use is deprecated
   (run-hooks 'LilyPond-mode-hook))