yatex
diff yatexenv.el @ 269:032d4c4bf7ac
Fix escape chars. Thanks to hiroohongo.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 15 Apr 2012 22:57:17 +0900 |
parents | ceca2d094d6f |
children | 5921f28ef77c |
line diff
1.1 --- a/yatexenv.el Sat Feb 11 12:19:43 2012 +0900 1.2 +++ b/yatexenv.el Sun Apr 15 22:57:17 2012 +0900 1.3 @@ -2,7 +2,7 @@ 1.4 ;;; YaTeX environment-specific functions. 1.5 ;;; yatexenv.el 1.6 ;;; (c) 1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] 1.7 -;;; Last modified Sat Feb 11 12:15:22 2012 on firestorm 1.8 +;;; Last modified Sun Feb 12 11:15:33 2012 on firestorm 1.9 ;;; $Id$ 1.10 1.11 ;;; 1.12 @@ -259,11 +259,17 @@ 1.13 ;;; 1.14 (defun YaTeX-intelligent-newline-document () 1.15 "New paragraph by null line or `\\par'." 1.16 - (if (save-excursion (re-search-backward "\\\\par\\>" nil t)) 1.17 - (progn 1.18 - (YaTeX-indent-line) 1.19 - (insert "\\par"))) 1.20 - (newline) 1.21 + (if (< (count-lines 1.22 + (or (get 'YaTeX-inner-environment 'point) 1.23 + (max 1 (- (point) 17))) ;"\begin{document}\n" == 17 1.24 + (point)) 1.25 + 2) 1.26 + nil 1.27 + (if (save-excursion (re-search-backward "\\\\par\\>" nil t)) 1.28 + (progn 1.29 + (YaTeX-indent-line) 1.30 + (insert "\\par"))) 1.31 + (newline)) 1.32 (YaTeX-indent-line)) 1.33 1.34 ;;;