diff --git a/yatex.el b/yatex.el index 6a5f115..ce42042 100644 --- a/yatex.el +++ b/yatex.el @@ -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 ---------- diff --git a/yatexlib.el b/yatexlib.el index ea774ce..fccd06c 100644 --- a/yatexlib.el +++ b/yatexlib.el @@ -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?"))