Mercurial > hgrepos > hgweb.cgi > yatex
changeset 187:2f91947a43a1 dev
YaTeX-end-environment
should not warn if opening structure is coming before closing one.
author | yuuji@gentei.org |
---|---|
date | Thu, 15 Dec 2011 13:39:36 +0900 |
parents | 61996cd55816 |
children | af2098da767b |
files | yatex.el yatexlib.el |
diffstat | 2 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/yatex.el Thu Dec 01 23:02:36 2011 +0900 +++ b/yatex.el Thu Dec 15 13:39:36 2011 +0900 @@ -1,15 +1,15 @@ ;;; -*- Emacs-Lisp -*- ;;; Yet Another tex-mode for emacs - //–ì’¹// -;;; yatex.el rev. 1.74.5 +;;; yatex.el rev. 1.74.6 ;;; (c)1991-2011 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu Dec 1 23:00:13 2011 on firestorm +;;; Last modified Thu Dec 15 13:37:47 2011 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ (require 'comment) (require 'yatexlib) -(defconst YaTeX-revision-number "1.74.5" +(defconst YaTeX-revision-number "1.74.6" "Revision number of running yatex.el") ;---------- Local variables ----------
--- a/yatexlib.el Thu Dec 01 23:02:36 2011 +0900 +++ b/yatexlib.el Thu Dec 15 13:39:36 2011 +0900 @@ -2,7 +2,7 @@ ;;; YaTeX and yahtml common libraries, general functions and definitions ;;; yatexlib.el ;;; (c)1994-2009 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu Oct 13 09:36:20 2011 on firestorm +;;; Last modified Thu Dec 15 13:37:26 2011 on firestorm ;;; $Id$ ;; General variables @@ -912,7 +912,7 @@ (goto-char m0) (put 'YaTeX-inner-environment 'indent (current-column)) (throw 'begin t))))) - (buffer-substring + (YaTeX-buffer-substring (progn (skip-chars-forward open) (1+ (point))) (progn (skip-chars-forward close) (point))))))) @@ -998,9 +998,16 @@ (let ((env (YaTeX-inner-environment))) (if (not env) (error "No premature environment") (save-excursion - (if (YaTeX-search-active-forward - (YaTeX-replace-format-args YaTeX-struct-end env "" "") - YaTeX-comment-prefix nil t) + (if (and + (YaTeX-re-search-active-forward + (concat + "\\(" (YaTeX-replace-format-args + YaTeX-struct-end env "" "") + "\\)\\|\\(" (YaTeX-replace-format-args + YaTeX-struct-begin env "" "") + "\\)") + YaTeX-comment-prefix nil t) + (match-beginning 1)) ;is closing struc. (if (y-or-n-p (concat "Environment `" env "' may be already closed. Force close?"))