diff options
| author | Glenn Morris | 2007-09-19 07:24:17 +0000 |
|---|---|---|
| committer | Glenn Morris | 2007-09-19 07:24:17 +0000 |
| commit | 41c12ad8763e633735e1b9b7e2d786ec20219341 (patch) | |
| tree | 42d098534ec2254ea7a77f4970da3582dd424e42 | |
| parent | b5355a9aee6dc6ce7fa109faee0b6c294455b0be (diff) | |
| download | emacs-41c12ad8763e633735e1b9b7e2d786ec20219341.tar.gz emacs-41c12ad8763e633735e1b9b7e2d786ec20219341.zip | |
(tex-terminate-paragraph): Use backward-paragraph.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5766439ebb9..71a81882461 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | 2007-09-19 Glenn Morris <rgm@gnu.org> | 1 | 2007-09-19 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * textmodes/tex-mode.el (tex-terminate-paragraph): Use | 3 | * textmodes/tex-mode.el (tex-terminate-paragraph): Use |
| 4 | backward-paragraph. | 4 | backward-paragraph. Leave point at the site of any mismatch. |
| 5 | 5 | ||
| 6 | 2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | 7 | ||
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index cfd5afebe4e..3a7a9880d38 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1188,6 +1188,7 @@ on the line for the invalidity you want to see." | |||
| 1188 | (let ((end (point)) | 1188 | (let ((end (point)) |
| 1189 | prev-end) | 1189 | prev-end) |
| 1190 | ;; Scan the previous paragraph for invalidities. | 1190 | ;; Scan the previous paragraph for invalidities. |
| 1191 | ;; FIXME this should be using something like backward-paragraph. | ||
| 1191 | (if (search-backward "\n\n" nil t) | 1192 | (if (search-backward "\n\n" nil t) |
| 1192 | (progn | 1193 | (progn |
| 1193 | (setq prev-end (point)) | 1194 | (setq prev-end (point)) |
| @@ -1273,9 +1274,13 @@ A prefix arg inhibits the checking." | |||
| 1273 | (interactive "*P") | 1274 | (interactive "*P") |
| 1274 | (or inhibit-validation | 1275 | (or inhibit-validation |
| 1275 | (save-excursion | 1276 | (save-excursion |
| 1277 | ;; For the purposes of this, a "paragraph" is a block of text | ||
| 1278 | ;; wherein all the brackets etc are expected to be balanced. It | ||
| 1279 | ;; may start after a blank line (ie a "proper" paragraph), or | ||
| 1280 | ;; a begin{} or end{} block, etc. | ||
| 1276 | (tex-validate-region | 1281 | (tex-validate-region |
| 1277 | (save-excursion | 1282 | (save-excursion |
| 1278 | (search-backward "\n\n" nil 'move) | 1283 | (backward-paragraph) |
| 1279 | (point)) | 1284 | (point)) |
| 1280 | (point))) | 1285 | (point))) |
| 1281 | (message "Paragraph being closed appears to contain a mismatch")) | 1286 | (message "Paragraph being closed appears to contain a mismatch")) |