Mercurial > hg > xemacs-beta
comparison lisp/auctex/tex-buf.el @ 153:25f70ba0133c r20-3b3
Import from CVS: tag r20-3b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:38:25 +0200 |
parents | ec9a17fef872 |
children |
comparison
equal
deleted
inserted
replaced
152:4c132ee2d62b | 153:25f70ba0133c |
---|---|
1 ;;; tex-buf.el - External commands for AUC TeX. | 1 ;;; tex-buf.el - External commands for AUC TeX. |
2 ;; | 2 ;; |
3 ;; Maintainer: Per Abrahamsen <auc-tex@sunsite.auc.dk> | 3 ;; Maintainer: Per Abrahamsen <auc-tex@sunsite.auc.dk> |
4 ;; Version: 9.7l | 4 ;; Version: 9.7p |
5 | 5 |
6 ;; Copyright (C) 1991 Kresten Krab Thorup | 6 ;; Copyright (C) 1991 Kresten Krab Thorup |
7 ;; Copyright (C) 1993, 1996 Per Abrahamsen | 7 ;; Copyright (C) 1993, 1996 Per Abrahamsen |
8 ;; | 8 ;; |
9 ;; This program is free software; you can redistribute it and/or modify | 9 ;; This program is free software; you can redistribute it and/or modify |
20 ;; along with this program; if not, write to the Free Software | 20 ;; along with this program; if not, write to the Free Software |
21 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | 22 |
23 ;;; Code: | 23 ;;; Code: |
24 | 24 |
25 (defvar no-doc | 25 (require 'tex) |
26 "This function is part of AUC TeX, but has not yet been loaded. | |
27 Full documentation will be available after autoloading the function." | |
28 "Documentation for autoload functions.") | |
29 | 26 |
30 ;;; Customization: | 27 ;;; Customization: |
31 | 28 |
32 (defvar TeX-process-asynchronous (not (eq system-type 'ms-dos)) | 29 (defcustom TeX-process-asynchronous (not (eq system-type 'ms-dos)) |
33 "*Use asynchronous processes.") | 30 "*Use asynchronous processes." |
34 | 31 :group 'TeX-commands |
35 (defvar TeX-shell | 32 :type 'boolean) |
33 | |
34 (defcustom TeX-shell | |
36 (if (memq system-type '(ms-dos emx windows-nt)) | 35 (if (memq system-type '(ms-dos emx windows-nt)) |
37 shell-file-name | 36 shell-file-name |
38 "/bin/sh") | 37 "/bin/sh") |
39 "Name of shell used to parse TeX commands.") | 38 "Name of shell used to parse TeX commands." |
40 | 39 :group 'TeX-commands |
41 (defvar TeX-shell-command-option | 40 :type 'file) |
41 | |
42 (defcustom TeX-shell-command-option | |
42 (cond ((memq system-type '(ms-dos emx windows-nt) ) | 43 (cond ((memq system-type '(ms-dos emx windows-nt) ) |
43 (cond ((boundp 'shell-command-option) | 44 (cond ((boundp 'shell-command-option) |
44 shell-command-option) | 45 shell-command-option) |
45 ((boundp 'shell-command-switch) | 46 ((boundp 'shell-command-switch) |
46 shell-command-switch) | 47 shell-command-switch) |
47 (t | 48 (t |
48 "/c"))) | 49 "/c"))) |
49 (t ;Unix & EMX (Emacs 19 port to OS/2) | 50 (t ;Unix & EMX (Emacs 19 port to OS/2) |
50 "-c")) | 51 "-c")) |
51 "Shell argument indicating that next argument is the command.") | 52 "Shell argument indicating that next argument is the command." |
53 :group 'TeX-commands | |
54 :type 'string) | |
52 | 55 |
53 ;;; Interactive Commands | 56 ;;; Interactive Commands |
54 ;; | 57 ;; |
55 ;; The general idea is, that there is one process and process buffer | 58 ;; The general idea is, that there is one process and process buffer |
56 ;; associated with each master file, and one process and process buffer | 59 ;; associated with each master file, and one process and process buffer |
268 (save-excursion (set-buffer buffer) (save-buffer))) | 271 (save-excursion (set-buffer buffer) (save-buffer))) |
269 (if (file-newer-than-file-p name derived) | 272 (if (file-newer-than-file-p name derived) |
270 (setq found t)))))) | 273 (setq found t)))))) |
271 found)) | 274 found)) |
272 | 275 |
273 (defvar TeX-save-query t | 276 (defcustom TeX-save-query t |
274 "*If non-nil, ask user for permission to save files before starting TeX.") | 277 "*If non-nil, ask user for permission to save files before starting TeX." |
278 :group 'TeX-commands | |
279 :type 'boolean) | |
275 | 280 |
276 (defun TeX-command-query (name) | 281 (defun TeX-command-query (name) |
277 "Query the user for a what TeX command to use." | 282 "Query the user for a what TeX command to use." |
278 (let* ((default (cond ((if (string-equal name TeX-region) | 283 (let* ((default (cond ((if (string-equal name TeX-region) |
279 (TeX-check-files (concat name ".dvi") | 284 (TeX-check-files (concat name ".dvi") |
356 | 361 |
357 (defvar TeX-after-start-process-function nil | 362 (defvar TeX-after-start-process-function nil |
358 "Hooks to run after starting an asynchronous process. | 363 "Hooks to run after starting an asynchronous process. |
359 Used by Japanese TeX to set the coding system.") | 364 Used by Japanese TeX to set the coding system.") |
360 | 365 |
361 (defvar TeX-show-compilation nil | 366 (defcustom TeX-show-compilation nil |
362 "*If non-nil, show output of TeX compilation in other window.") | 367 "*If non-nil, show output of TeX compilation in other window." |
368 :group 'TeX-commands | |
369 :type 'boolean) | |
363 | 370 |
364 (defun TeX-run-command (name command file) | 371 (defun TeX-run-command (name command file) |
365 "Create a process for NAME using COMMAND to process FILE. | 372 "Create a process for NAME using COMMAND to process FILE. |
366 Return the new process." | 373 Return the new process." |
367 (let ((default TeX-command-default) | 374 (let ((default TeX-command-default) |
904 (extension | 911 (extension |
905 (concat TeX-region "." extension)) | 912 (concat TeX-region "." extension)) |
906 (t | 913 (t |
907 TeX-region)))) | 914 TeX-region)))) |
908 | 915 |
909 (defvar TeX-region "_region_" | 916 (defcustom TeX-region "_region_" |
910 "*Base name for temporary file for use with TeX-region.") | 917 "*Base name for temporary file for use with TeX-region." |
918 :group 'TeX-commands | |
919 :type 'string) | |
911 | 920 |
912 ;;; Parsing | 921 ;;; Parsing |
913 | 922 |
914 ;;; - Global Parser Variables | 923 ;;; - Global Parser Variables |
915 | 924 |
1194 (goto-char (point-min)) | 1203 (goto-char (point-min)) |
1195 (pop-to-buffer old-buffer))) | 1204 (pop-to-buffer old-buffer))) |
1196 | 1205 |
1197 ;;; Error Messages | 1206 ;;; Error Messages |
1198 | 1207 |
1199 (defvar TeX-error-description-list | 1208 (defcustom TeX-error-description-list |
1200 '(("Bad \\\\line or \\\\vector argument.*" . | 1209 '(("Bad \\\\line or \\\\vector argument.*" . |
1201 "The first argument of a \\line or \\vector command, which specifies the | 1210 "The first argument of a \\line or \\vector command, which specifies the |
1202 slope, is illegal\.") | 1211 slope, is illegal\.") |
1203 | 1212 |
1204 ("Bad math environment delimiter.*" . | 1213 ("Bad math environment delimiter.*" . |
1601 (".*" . "No help available")) ; end definition | 1610 (".*" . "No help available")) ; end definition |
1602 "A list of the form (\"err-regexp\" . \"context\") used by function | 1611 "A list of the form (\"err-regexp\" . \"context\") used by function |
1603 \\{TeX-help-error} to display help-text on an error message or warning. | 1612 \\{TeX-help-error} to display help-text on an error message or warning. |
1604 err-regexp should be a regular expression matching the error message | 1613 err-regexp should be a regular expression matching the error message |
1605 given from TeX/LaTeX, and context should be some lines describing that | 1614 given from TeX/LaTeX, and context should be some lines describing that |
1606 error") | 1615 error" |
1616 :group 'TeX-output | |
1617 :type '(repeat (cons :tag "Entry" | |
1618 (regexp :tag "Match") | |
1619 (string :format "Description:\n%v")))) | |
1607 | 1620 |
1608 (provide 'tex-buf) | 1621 (provide 'tex-buf) |
1609 | 1622 |
1610 ;;; tex-buf.el ends here | 1623 ;;; tex-buf.el ends here |