summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-09-19 07:19:54 +0000
committerGlenn Morris <rgm@gnu.org>2007-09-19 07:19:54 +0000
commit739d53dc4650ad715adf2834abfadacf0bc3f294 (patch)
tree38b7c7bccb7509360ad6dd996de4087353f840b6 /lisp/textmodes/tex-mode.el
parentb6babcbd6915807e228a4269833c3de4b2ab3d19 (diff)
downloademacs-739d53dc4650ad715adf2834abfadacf0bc3f294.tar.gz
(tex-terminate-paragraph): Use backward-paragraph.
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 54bd77220e3..e93894267ff 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1167,6 +1167,7 @@ on the line for the invalidity you want to see."
(let ((end (point))
prev-end)
;; Scan the previous paragraph for invalidities.
+ ;; FIXME this should be using something like backward-paragraph.
(if (search-backward "\n\n" nil t)
(progn
(setq prev-end (point))
@@ -1252,9 +1253,13 @@ A prefix arg inhibits the checking."
(interactive "*P")
(or inhibit-validation
(save-excursion
+ ;; For the purposes of this, a "paragraph" is a block of text
+ ;; wherein all the brackets etc are expected to be balanced. It
+ ;; may start after a blank line (ie a "proper" paragraph), or
+ ;; a begin{} or end{} block, etc.
(tex-validate-region
(save-excursion
- (search-backward "\n\n" nil 'move)
+ (backward-paragraph)
(point))
(point)))
(message "Paragraph being closed appears to contain a mismatch"))