[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scope environment in TikZ
From: |
Ikumi Keita |
Subject: |
Re: scope environment in TikZ |
Date: |
Fri, 18 Nov 2022 14:24:32 +0900 |
>>>>> Arash Esbati <arash@gnu.org> writes:
> My suggestion is actually this (I copied a wrong version in my last
> message :-():
> (defun LaTeX--env-parse-args (args)
> "Helper function to insert arguments defined by ARGS."
> (let ((TeX-exit-mark (or TeX-exit-mark
> (point-marker))))
> (LaTeX-find-matching-begin)
> (end-of-line)
> (TeX-parse-arguments args)
> (goto-char (marker-position TeX-exit-mark))
> (set-marker TeX-exit-mark nil)))
> In your example above, the point will be indeed inside "{}" after 'C-c
> C-e' with no query at all. Compare these examples:
> (LaTeX-add-environments
> '("foo" LaTeX-env-args t)
> '("bar" LaTeX-env-args nil)
> '("baz" LaTeX-env-args "Title"))
Sorry, my example didn't make sense. There t should have been some
string literal such as "Title".
> C-c C-e baz RET gives:
> \begin{baz}{}
> *
> \end{baz}
Ah, this is it. Now I see it works very well.
> For me, t behaves as described in the manual "Insert empty braces, leave
> point between the braces.". Does the above make sense?
Certainly.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
P.S.
By the way, you can do
(goto-char TeX-exit-mark)
instead of
(goto-char (marker-position TeX-exit-mark))
in the new `LaTeX--env-parse-args'.
- scope environment in TikZ, Ikumi Keita, 2022/11/10
- Re: scope environment in TikZ, Arash Esbati, 2022/11/10
- Re: scope environment in TikZ, Ikumi Keita, 2022/11/11
- Re: scope environment in TikZ, Ikumi Keita, 2022/11/14
- Re: scope environment in TikZ, Arash Esbati, 2022/11/15
- Re: scope environment in TikZ, Ikumi Keita, 2022/11/16
- Re: scope environment in TikZ, Arash Esbati, 2022/11/16
- Re: scope environment in TikZ, Ikumi Keita, 2022/11/17
- Re: scope environment in TikZ, Arash Esbati, 2022/11/17
- Re: scope environment in TikZ,
Ikumi Keita <=
- Re: scope environment in TikZ, Arash Esbati, 2022/11/18
- Re: scope environment in TikZ, Ikumi Keita, 2022/11/21
- Re: scope environment in TikZ, Arash Esbati, 2022/11/21
- Re: scope environment in TikZ, Ikumi Keita, 2022/11/21