# HG changeset patch # User yuuji@gentei.org # Date 1327821187 -32400 # Node ID 5260b7ee9fdfdc85b5e8bb9bf41ede69a4eb3104 # Parent af1e6c48eac0d621ba5026f5a59948c10d3f2b83 YaTeX-intelligent-newline-align should not put \\ to final row. diff -r af1e6c48eac0 -r 5260b7ee9fdf yatexenv.el --- 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 "& ")))