comparison lisp/textmodes/tex-mode.el @ 741:587f7a98341d

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sun, 05 Jul 1992 20:52:00 +0000
parents 0bb85f26b79c
children f8688580137c
comparison
equal deleted inserted replaced
740:b39d858a0b19 741:587f7a98341d
1 ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. 1 ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands.
2 2
3 ;; Copyright (C) 1985-1992 Free Software Foundation, Inc. 3 ;; Copyright (C) 1985, 1986, 1989, 1992 Free Software Foundation, Inc.
4 ;; Contributions over the years by William F. Schelter, Dick King, 4 ;; Contributions over the years by William F. Schelter, Dick King,
5 ;; Stephen Gildea, Michael Prange, and Edward M. Reingold. 5 ;; Stephen Gildea, Michael Prange, and Edward M. Reingold.
6 6
7 ;; Latest revision (1992) by Edward M. Reingold <reingold@cs.uiuc.edu>. 7 ;; Latest revision (1992) by Edward M. Reingold <reingold@cs.uiuc.edu>.
8 8
651 (file-name-nondirectory tex-last-temp-file) dir))) 651 (file-name-nondirectory tex-last-temp-file) dir)))
652 (while list 652 (while list
653 (delete-file (concat dir (car list))) 653 (delete-file (concat dir (car list)))
654 (setq list (cdr list)))))) 654 (setq list (cdr list))))))
655 655
656 (setq kill-emacs-hook 'tex-delete-last-temp-files) 656 (add-hook 'kill-emacs-hook 'tex-delete-last-temp-files)
657 657
658 ;;; The commands: 658 ;;; The commands:
659 659
660 (defun tex-region (beg end) 660 (defun tex-region (beg end)
661 "Run TeX on the current region, via a temporary file. 661 "Run TeX on the current region, via a temporary file.
739 (let ((tex-out-file 739 (let ((tex-out-file
740 (if (buffer-file-name) 740 (if (buffer-file-name)
741 (file-name-nondirectory (buffer-file-name)) 741 (file-name-nondirectory (buffer-file-name))
742 (error "Buffer does not seem to be associated with any file"))) 742 (error "Buffer does not seem to be associated with any file")))
743 (file-dir (file-name-directory (buffer-file-name)))) 743 (file-dir (file-name-directory (buffer-file-name))))
744 (save-some-buffers) 744 (if (tex-offer-save)
745 (save-some-buffers))
745 (if (tex-shell-running) 746 (if (tex-shell-running)
746 (tex-kill-job) 747 (tex-kill-job)
747 (tex-start-shell)) 748 (tex-start-shell))
748 (tex-send-command tex-shell-cd-command file-dir) 749 (tex-send-command tex-shell-cd-command file-dir)
749 (tex-send-command tex-command tex-out-file)) 750 (tex-send-command tex-command tex-out-file))
864 (run-hooks 'tex-mode-load-hook) 865 (run-hooks 'tex-mode-load-hook)
865 866
866 (provide 'tex-mode) 867 (provide 'tex-mode)
867 868
868 ;;; tex-mode.el ends here 869 ;;; tex-mode.el ends here
870