CVSROOT: /cvsroot/auctex
Module name: auctex
Changes by: Ralf Angeli <angeli> 07/12/25 21:46:27
Index: latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.439
retrieving revision 5.440
diff -u -b -r5.439 -r5.440
--- latex.el 11 Oct 2007 20:30:35 -0000 5.439
+++ latex.el 25 Dec 2007 21:46:27 -0000 5.440
@@ -2883,18 +2883,26 @@
(verb-macros (regexp-opt (append (LaTeX-verbatim-macros-with-delims)
(LaTeX-verbatim-macros-with-braces)))))
(save-excursion
+ ;; Look for the start of a verbatim macro in the current line.
(when (re-search-backward (concat (regexp-quote TeX-esc)
"\\(?:" verb-macros "\\)\\([EMAIL
PROTECTED])")
(line-beginning-position) t)
+ ;; Determine start and end of verbatim macro.
(let ((beg (point))
(end (if (not (string-match "[ [{]" (match-string 1)))
(cdr (LaTeX-verbatim-macro-boundaries))
(TeX-find-macro-end))))
- (when (and end (> (- end (line-beginning-position))
- (current-fill-column)))
+ ;; Determine if macro end is behind fill column.
+ (when (and end
+ (> (- end (line-beginning-position))
+ (current-fill-column))
+ (> end final-breakpoint))
+ ;; Search backwards for place to break before the macro.
(goto-char beg)
(skip-chars-backward "^ \n")
- (when (bolp)
+ ;; Determine if point ended up at the beginning of the line.
+ (when (save-excursion (skip-chars-backward " \t%") (bolp))
+ ;; Search forward for a place to break after the macro.
(goto-char end)
(skip-chars-forward "^ \n" (point-max)))
(setq final-breakpoint (point))))))
_______________________________________________
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs