>From 5c87b9e72ceddf3459abe8f59e2c6b61316d71d8 Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 8 Sep 2023 17:13:07 +0900 Subject: [PATCH] temporal commit --- latex.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/latex.el b/latex.el index d855b5c5..9a5b753e 100644 --- a/latex.el +++ b/latex.el @@ -8884,6 +8884,12 @@ function would return non-nil and `(match-string 1)' would return (LaTeX-find-matching-begin) (cons (point) (current-column)))) +(defun LaTeX-env-beginning-pos-indent () + "Return a cons: (POINT . INDENT) for current environment's beginning." + (save-excursion + (LaTeX-backward-up-environment) + (cons (point) (LaTeX-current-indentation)))) + (defun LaTeX-hanging-ampersand-position (&optional pos col) "Return indent column for a hanging ampersand (that is, ^\\s-*&). When you know the position and column of the beginning of the @@ -8893,7 +8899,7 @@ COL for efficiency." (beg-pos . beg-col) (if pos (cons pos col) - (LaTeX-env-beginning-pos-col)) + (LaTeX-env-beginning-pos-indent)) (let ((cur-pos (point))) (save-excursion (if (and (search-backward "\\\\" beg-pos t) @@ -8924,7 +8930,7 @@ COL for efficiency." "Return indent column for the current tabular-like line." (cl-destructuring-bind (beg-pos . beg-col) - (LaTeX-env-beginning-pos-col) + (LaTeX-env-beginning-pos-indent) (let ((tabular-like-end-regex (format "\\\\end{%s}" (regexp-opt -- 2.41.0