yatex

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 diff
     1.1 --- a/yatexenv.el	Sun Jan 29 16:09:22 2012 +0900
     1.2 +++ b/yatexenv.el	Sun Jan 29 16:13:07 2012 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX environment-specific functions.
     1.5  ;;; yatexenv.el
     1.6  ;;; (c) 1994-2006 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Sat Jan 28 22:27:24 2012 on firestorm
     1.8 +;;; Last modified Sun Jan 29 16:08:09 2012 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;;;
    1.12 @@ -188,6 +188,13 @@
    1.13  	(while (YaTeX-re-search-active-forward
    1.14  		"\\(&\\)\\|\\(\\\\\\\\\\)" YaTeX-comment-prefix p t)
    1.15  	  (if (match-beginning 1) (setq cols (1+ cols)) (throw 'done t)))))
    1.16 +    (if (> cols 0)
    1.17 +	(save-excursion
    1.18 +	  (forward-line -1)
    1.19 +	  (end-of-line)
    1.20 +	  (skip-chars-backward " \t")
    1.21 +	  (or (and (= (preceding-char) ?\\) (= (char-after (- (point) 2)) ?\\))
    1.22 +	      (insert "\\\\"))))
    1.23      (save-excursion
    1.24        (while (>= (setq cols (1- cols)) 0)
    1.25  	(insert "& ")))