Function: tex-delete-last-temp-files

tex-delete-last-temp-files is a byte-compiled function defined in tex-mode.el.gz.

Signature

(tex-delete-last-temp-files &optional NOT-ALL)

Documentation

Delete any junk files from last temp file.

If NOT-ALL is non-nil, save the .dvi file.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(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 (and (file-directory-p dir)
			(file-name-all-completions
			 (file-name-base tex-last-temp-file)
			 dir))))
	(while 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))))))