Index: TeXmacs-1.0.6-static-gnu-linux/progs/texmacs/texmacs/tm-files.scm =================================================================== --- TeXmacs-1.0.6-static-gnu-linux.orig/progs/texmacs/texmacs/tm-files.scm 2005-12-02 19:06:49.000000000 +0100 +++ TeXmacs-1.0.6-static-gnu-linux/progs/texmacs/texmacs/tm-files.scm 2006-11-03 11:47:28.934099500 +0100 @@ -55,7 +55,11 @@ (url-exists? (url-glue file "~")) (url-newer? (url-glue file "~") file) (dialogue-confirm? "Load more recent autosave file?" #t)) - (texmacs-load-buffer (url-glue file "~") fm where #t) + (begin + (texmacs-load-buffer (url-glue file "~") fm where #t) + ;; the following two lines are a hack that does the exact opposite of pretend-save-buffer + (init-add-package "dummy package name used as hack to set need_save flag in load-buffer-sub") + (init-remove-package "dummy package name used as hack to set need_save flag in load-buffer-sub")) (texmacs-load-buffer file fm where #f)))) (tm-define (load-buffer . l) @@ -87,8 +91,12 @@ (dialogue (if (dialogue-confirm? "Recover autosave file?" #t) (with t (texmacs-load-tree name "texmacs") - (set-buffer (get-name-buffer) t)) - (system-remove name)))))) + (new-buffer) + (set-buffer (get-name-buffer) t) + ;; the following two lines are a hack that does the exact opposite of pretend-save-buffer + (init-add-package "dummy package name used as hack to set need_save flag in recover-auto-save") + (init-remove-package "dummy package name used as hack to set need_save flag in recover-auto-save"))) + (system-remove name))))) (define (notify-autosave var val) (if (has-view?) ; delayed-autosave would crash at initialization time