aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond1993-04-26 05:15:08 +0000
committerEric S. Raymond1993-04-26 05:15:08 +0000
commit8241d7b92d1f8fc76fc2abedbec042c564da250a (patch)
treec300ecc5642772697da105de9146546f8ad33d0b
parent54f91c5b0288e867ab69127ed06e816255152a4a (diff)
downloademacs-8241d7b92d1f8fc76fc2abedbec042c564da250a.tar.gz
emacs-8241d7b92d1f8fc76fc2abedbec042c564da250a.zip
Doc fixes. Also a few teaks to pacify the byte-compiler.
-rw-r--r--lisp/textmodes/tex-mode.el41
1 files changed, 21 insertions, 20 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 0bd135aaebc..28e0284c69d 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -26,8 +26,7 @@
26 26
27;;; Code: 27;;; Code:
28 28
29;; This was a pain. Now, make-comint should autoload comint. 29(require 'comint)
30;; (require 'comint)
31(require 'compile) 30(require 'compile)
32 31
33;;;###autoload 32;;;###autoload
@@ -217,6 +216,8 @@ Set by \\[tex-region], \\[tex-buffer], and \\[tex-file].")
217 216
218;(defalias 'TeX-mode 'tex-mode) ;in loaddefs. 217;(defalias 'TeX-mode 'tex-mode) ;in loaddefs.
219 218
219(defvar compare-windows-whitespace nil) ; Pacify the byte-compiler
220
220;;; This would be a lot simpler if we just used a regexp search, 221;;; This would be a lot simpler if we just used a regexp search,
221;;; but then it would be too slow. 222;;; but then it would be too slow.
222;;;###autoload 223;;;###autoload
@@ -287,9 +288,10 @@ tex-show-queue-command
287 Command string used by \\[tex-show-print-queue] to show the print 288 Command string used by \\[tex-show-print-queue] to show the print
288 queue that \\[tex-print] put your job on. 289 queue that \\[tex-print] put your job on.
289 290
290Entering Plain-tex mode calls the value of text-mode-hook, then the value of 291Entering Plain-tex mode calls the value of `text-mode-hook', then the value
291tex-mode-hook, and then the value of plain-tex-mode-hook. When the special 292of `tex-mode-hook', and then the value of `plain-tex-mode-hook'. When the
292subshell is initiated, the value of tex-shell-hook is called." 293special subshell is initiated, the value of `tex-shell-hook' is called."
294
293 (interactive) 295 (interactive)
294 (tex-common-initialization) 296 (tex-common-initialization)
295 (setq mode-name "TeX") 297 (setq mode-name "TeX")
@@ -390,10 +392,10 @@ tex-show-queue-command
390 Command string used by \\[tex-show-print-queue] to show the print 392 Command string used by \\[tex-show-print-queue] to show the print
391 queue that \\[tex-print] put your job on. 393 queue that \\[tex-print] put your job on.
392 394
393Entering SliTeX mode calls the value of text-mode-hook, then the value of 395Entering SliTeX mode calls the value of `text-mode-hook', then the value of
394tex-mode-hook, then the value of latex-mode-hook, and then the value of 396`tex-mode-hook', then the value of `latex-mode-hook', and then the value of
395slitex-mode-hook. When the special subshell is initiated, the value of 397`slitex-mode-hook'. When the special subshell is initiated, the value of
396tex-shell-hook is called." 398`tex-shell-hook' is called."
397 (interactive) 399 (interactive)
398 (tex-common-initialization) 400 (tex-common-initialization)
399 (setq mode-name "SliTeX") 401 (setq mode-name "SliTeX")
@@ -504,7 +506,7 @@ inserts \" characters."
504 tex-close-quote))))) 506 tex-close-quote)))))
505 507
506(defun validate-tex-buffer () 508(defun validate-tex-buffer ()
507 "Check current buffer for paragraphs containing mismatched $'s. 509 "Check current buffer for paragraphs containing mismatched $s.
508As each such paragraph is found, a mark is pushed at its beginning, 510As each such paragraph is found, a mark is pushed at its beginning,
509and the location is displayed for a few seconds." 511and the location is displayed for a few seconds."
510 (interactive) 512 (interactive)
@@ -614,7 +616,7 @@ Puts point on a blank line between them."
614This makes a list of error descriptors, compilation-error-list. 616This makes a list of error descriptors, compilation-error-list.
615For each source-file, line-number pair in the buffer, 617For each source-file, line-number pair in the buffer,
616the source file is read in, and the text location is saved in 618the source file is read in, and the text location is saved in
617compilation-error-list. The function next-error, assigned to 619compilation-error-list. The function `next-error', assigned to
618\\[next-error], takes the next error off the list and visits its location. 620\\[next-error], takes the next error off the list and visits its location.
619 621
620This function works on TeX compilations only. It is necessary for 622This function works on TeX compilations only. It is necessary for
@@ -626,8 +628,6 @@ line numbers for the errors."
626 (modify-syntax-entry ?\} "_") 628 (modify-syntax-entry ?\} "_")
627 (modify-syntax-entry ?\[ "_") 629 (modify-syntax-entry ?\[ "_")
628 (modify-syntax-entry ?\] "_") 630 (modify-syntax-entry ?\] "_")
629 (make-variable-buffer-local 'compilation-error-regexp)
630 (setq compilation-error-regexp "^l\.[0-9]+ ")
631 (let (text-buffer 631 (let (text-buffer
632 last-filename last-linenum) 632 last-filename last-linenum)
633 ;; Don't reparse messages already seen at last parse. 633 ;; Don't reparse messages already seen at last parse.
@@ -636,7 +636,7 @@ line numbers for the errors."
636 ;; This matters for grep. 636 ;; This matters for grep.
637 (if (bobp) 637 (if (bobp)
638 (forward-line 2)) 638 (forward-line 2))
639 (while (re-search-forward compilation-error-regexp nil t) 639 (while (re-search-forward "^l\.[0-9]+ " nil t)
640 (let (linenum filename 640 (let (linenum filename
641 error-marker text-marker) 641 error-marker text-marker)
642 ;; Extract file name and line number from error message. 642 ;; Extract file name and line number from error message.
@@ -649,7 +649,7 @@ line numbers for the errors."
649 (insert ?\)) 649 (insert ?\))
650 (backward-sexp) 650 (backward-sexp)
651 (forward-char) 651 (forward-char)
652 (setq filename (compilation-grab-filename)) 652 (setq filename (current-word))
653 ;; Locate the erring file and line. 653 ;; Locate the erring file and line.
654 (if (and (equal filename last-filename) 654 (if (and (equal filename last-filename)
655 (= linenum last-linenum)) 655 (= linenum last-linenum))
@@ -726,10 +726,11 @@ line numbers for the errors."
726 (setq default-directory directory)))) 726 (setq default-directory directory))))
727 727
728(defun tex-send-command (command &optional file background) 728(defun tex-send-command (command &optional file background)
729 "Send COMMAND to tex-shell, substituting optional FILE for *; in background 729 "Send COMMAND to tex-shell, substituting optional FILE for *.
730if optional BACKGROUND is t. If COMMAND has no *, FILE will be appended, 730Do this in background if optional BACKGROUND is t. If COMMAND has no *,
731preceded by a blank, to COMMAND. If FILE is nil, no substitution will be made 731FILE will be appended, preceded by a blank, to COMMAND. If FILE is nil, no
732in COMMAND. COMMAND can be any expression that evaluates to a command string." 732substitution will be made in COMMAND. COMMAND can be any expression that
733evaluates to a command string."
733 (save-excursion 734 (save-excursion
734 (let* ((cmd (eval command)) 735 (let* ((cmd (eval command))
735 (star (string-match "\\*" cmd)) 736 (star (string-match "\\*" cmd))
@@ -959,7 +960,7 @@ Runs the shell command defined by `tex-show-queue-command'."
959 (tex-append (file-name-nondirectory (buffer-file-name)) "")) 960 (tex-append (file-name-nondirectory (buffer-file-name)) ""))
960 (file-dir (file-name-directory (buffer-file-name)))) 961 (file-dir (file-name-directory (buffer-file-name))))
961 (tex-send-command tex-shell-cd-command file-dir) 962 (tex-send-command tex-shell-cd-command file-dir)
962 (tex-send-command bibtex-command tex-out-file))) 963 (tex-send-command tex-bibtex-command tex-out-file)))
963 964
964(run-hooks 'tex-mode-load-hook) 965(run-hooks 'tex-mode-load-hook)
965 966