changeset 56792:db21eaa33109

(tex-validate-buffer): Distinguish between 0, 1, and many mismatches. (tex-start-shell): Use `set-process-query-on-exit-flag'.
author John Paul Wallington <jpw@pobox.com>
date Wed, 25 Aug 2004 19:04:13 +0000
parents a0d8e0ecba72
children 58864924b0e2
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Wed Aug 25 18:46:04 2004 +0000
+++ b/lisp/textmodes/tex-mode.el	Wed Aug 25 19:04:13 2004 +0000
@@ -1141,10 +1141,13 @@
 					 'occur-target tem)))))
 	    (goto-char prev-end))))
       (with-current-buffer standard-output
-	(if (eq num-matches 0)
-	    (insert "None!\n"))
-	(if (interactive-p)
-	    (message "%d mismatches found" num-matches))))))
+	(let ((no-matches (zerop num-matches)))
+	  (if no-matches
+	      (insert "None!\n"))
+	  (if (interactive-p)
+	      (message "%s mismatch%s found"
+		       (if no-matches "No" num-matches)
+		       (if (> num-matches 1) "es" ""))))))))
 
 (defun tex-validate-region (start end)
   "Check for mismatched braces or $'s in region.
@@ -1459,7 +1462,7 @@
        nil)
     (let ((proc (get-process "tex-shell")))
       (set-process-sentinel proc 'tex-shell-sentinel)
-      (process-kill-without-query proc)
+      (set-process-query-on-exit-flag proc nil)
       (tex-shell)
       (while (zerop (buffer-size))
 	(sleep-for 1)))))
@@ -1928,7 +1931,7 @@
 		(re-search-forward
 		 "^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\)?\\(.*\\)$" nil 'move))
       (let* ((this-error (copy-marker begin-of-error))
-	     (linenum (string-to-int (match-string 1)))
+	     (linenum (string-to-number (match-string 1)))
 	     (error-text (regexp-quote (match-string 3)))
 	     (filename
 	      (save-excursion