]> git.donarmstrong.com Git - lilypond.git/commitdiff
revert before a command if needed.
authorHeikki Junes <heikki.junes@hut.fi>
Thu, 5 Dec 2002 21:20:02 +0000 (21:20 +0000)
committerHeikki Junes <heikki.junes@hut.fi>
Thu, 5 Dec 2002 21:20:02 +0000 (21:20 +0000)
ChangeLog
lilypond-mode.el

index 3f31dfee58c3fdd29c41de366f7fc527c46adbc5..6634db59aad2f1d0a69b89a213d420ff83bf9412 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-05  Heikki Junes <hjunes@cc.hut.fi>
+
+       * lilypond-mode.el: Propose reverting buffer before a command if
+       it was edited with an another editor.
+
 2002-12-05  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * python/GNUmakefile (INSTALLATION_DIR1): install Python module
index e56a32acdda99822c5ded3b68130b4ec65fe5c61..819f255e1c3bae4b5ffc8a39e5463abc5bcd8452 100644 (file)
@@ -22,7 +22,7 @@
 (require 'easymenu)
 (require 'compile)
 
-(defconst LilyPond-version "1.7.8"
+(defconst LilyPond-version "1.7.9"
   "`LilyPond-mode' version number.")
 
 (defconst LilyPond-help-address "bug-lilypond@gnu.org"
@@ -326,9 +326,12 @@ Must be the car of an entry in `LilyPond-command-alist'."
                             (LilyPond-check-files (concat name ".tex")
                                                   (list name)
                                                   LilyPond-file-extensions)
-                          (if (buffer-modified-p) 
-                              (if (y-or-n-p "Save buffer before next command? ")
-                                  (LilyPond-save-buffer)))
+                          (if (verify-visited-file-modtime (current-buffer))
+                              (if (buffer-modified-p)
+                                  (if (y-or-n-p "Save buffer before next command? ")
+                                      (LilyPond-save-buffer)))
+                            (if (y-or-n-p "The command will be invoked to an already saved buffer. Revert it? ")
+                                (revert-buffer t t)))
                           ;;"LilyPond"
                           LilyPond-command-default))
                        (t LilyPond-command-default)))