diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-07-11 23:55:01 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-07-11 23:55:01 +0000 |
commit | d3fa7bbecb1ac414572c6dd8e02de8d5f4b0b990 (patch) | |
tree | 2920500ac2ceebf8f8ec67c163f6b8283c178d1b /lisp | |
parent | 532cbef7ae41709cd75a9d0bfd7501186280c623 (diff) | |
download | emacs-d3fa7bbecb1ac414572c6dd8e02de8d5f4b0b990.tar.gz |
(tex-validate-region): Skip fwd over whitespace
and punctuation, to find point of mismatch.
(validate-tex-buffer): Don't include the blank lines
before a paragraph in the paragraph being checked.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/textmodes/tex-mode.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index d410035cf84..6990c80f2d6 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -652,11 +652,17 @@ for the invalidity you want to see." (save-excursion (goto-char (point-max)) (while (and (not (input-pending-p)) (not (bobp))) - (let ((end (point))) + (let ((end (point)) + prev-end) ;; Scan the previous paragraph for invalidities. - (search-backward "\n\n" nil 'move) + (if (search-backward "\n\n" nil t) + (progn + (setq prev-end (point)) + (forward-char 2)) + (goto-char (setq prev-end (point-min)))) (or (tex-validate-region (point) end) - (let* ((end (save-excursion (forward-line 1) (point))) + (let* ((oend end) + (end (save-excursion (forward-line 1) (point))) start tem) (beginning-of-line) (setq start (point)) @@ -679,7 +685,8 @@ for the invalidity you want to see." (setq occur-pos-list (cons tem occur-pos-list)) (insert-buffer-substring buffer start end) (forward-char (- start end)) - (insert (format "%3d: " linenum)))))))) + (insert (format "%3d: " linenum))))) + (goto-char prev-end)))) (save-excursion (set-buffer standard-output) (if (null occur-pos-list) @@ -701,6 +708,7 @@ area if a mismatch is found." (while (< 0 (setq max-possible-sexps (1- max-possible-sexps))) (forward-sexp 1))) (error + (skip-syntax-forward " .>") (setq failure-point (point))))) (if failure-point (progn |