diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-03-23 18:19:20 +0000 | 
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-03-23 18:19:20 +0000 | 
| commit | a15849cbd891825a607b6c1505bc9f823bee54c0 (patch) | |
| tree | c82f5d213a5e54b6cea7674621a75cd9f27ef724 | |
| parent | ec26e1b924b5c039cf944593acf9bff7405879b8 (diff) | |
| download | emacs-a15849cbd891825a607b6c1505bc9f823bee54c0.tar.gz | |
(tex-delete-last-temp-files): New arg NOT-ALL.
(tex-region): Pass new arg.
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 14 | 
1 files changed, 10 insertions, 4 deletions
| diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 4beecdab124..26466716529 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -871,14 +871,20 @@ evaluates to a command string."        (comint-send-input)        (setq tex-send-command-modified-tick (buffer-modified-tick buf))))) -(defun tex-delete-last-temp-files () -  "Delete any junk files from last temp file." +(defun tex-delete-last-temp-files (&optional not-all) +  "Delete any junk files from last temp file. +If NOT-ALL is non-nil, save the `.dvi' file."    (if tex-last-temp-file        (let* ((dir (file-name-directory tex-last-temp-file))               (list (file-name-all-completions                      (file-name-nondirectory tex-last-temp-file) dir)))          (while list -          (delete-file (concat dir (car list))) +	  (if not-all +	      (and +	       ;; If arg is non-nil, don't delete the .dvi file. +	       (not (string-match "\\.dvi$" (car list))) +	       (delete-file (concat dir (car list)))) +	    (delete-file (concat dir (car list))))            (setq list (cdr list))))))  (add-hook 'kill-emacs-hook 'tex-delete-last-temp-files) @@ -913,7 +919,7 @@ The value of `tex-command' specifies the command to use to run TeX."           (zap-directory            (file-name-as-directory (expand-file-name tex-directory)))           (tex-out-file (concat zap-directory tex-zap-file))) -    (tex-delete-last-temp-files) +    (tex-delete-last-temp-files t)      ;; Write the new temp file.      (save-excursion        (save-restriction | 
