changeset 238:5260b7ee9fdf dev

YaTeX-intelligent-newline-align should not put \\ to final row.
author yuuji@gentei.org
date Sun, 29 Jan 2012 16:13:07 +0900
parents af1e6c48eac0
children 5de195a540c7
files yatexenv.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/yatexenv.el	Sun Jan 29 16:09:22 2012 +0900
+++ b/yatexenv.el	Sun Jan 29 16:13:07 2012 +0900
@@ -2,7 +2,7 @@
 ;;; YaTeX environment-specific functions.
 ;;; yatexenv.el
 ;;; (c) 1994-2006 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sat Jan 28 22:27:24 2012 on firestorm
+;;; Last modified Sun Jan 29 16:08:09 2012 on firestorm
 ;;; $Id$
 
 ;;;
@@ -188,6 +188,13 @@
 	(while (YaTeX-re-search-active-forward
 		"\\(&\\)\\|\\(\\\\\\\\\\)" YaTeX-comment-prefix p t)
 	  (if (match-beginning 1) (setq cols (1+ cols)) (throw 'done t)))))
+    (if (> cols 0)
+	(save-excursion
+	  (forward-line -1)
+	  (end-of-line)
+	  (skip-chars-backward " \t")
+	  (or (and (= (preceding-char) ?\\) (= (char-after (- (point) 2)) ?\\))
+	      (insert "\\\\"))))
     (save-excursion
       (while (>= (setq cols (1- cols)) 0)
 	(insert "& ")))

yatex.org