auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [text \begin{array} still causes problems] (was: Indenting condition


From: Ikumi Keita
Subject: Re: [text \begin{array} still causes problems] (was: Indenting conditionals)
Date: Fri, 25 Mar 2022 17:08:21 +0900

Hi Uwe,

>>>>> Uwe Brauer <oub@mat.ucm.es> writes:
> The source of the problem is that the \begin{array} should be at the
> beginning of the line, or at least not having «text» before it (not
> sure about the \end{array}.

[...]

> In any case would someone like to implement this better and even more
> general that is all \begin{something} should start at with a newline?

How about this?

(defun foo ()
  (interactive)
  (while (re-search-forward ".\\\\begin" nil t)
    (save-excursion
      (goto-char (1+ (match-beginning 0)))
      (if (y-or-n-p "Break line here? ")
        (newline-and-indent)))))

Bye,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]