auctex-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] fix delete-property handling


From: Ikumi Keita
Subject: Re: [PATCH] fix delete-property handling
Date: Sat, 20 Apr 2024 03:33:33 +0900

Hi Artem,

>>>>> Artem Yurchenko <artemyurchenko@zoho.com> writes:
> I'm attaching two patches for the current master. I've tried to fix
> all of the regressions you've pointed out and apply all of the
> suggestions you've made.

Thank you!

>>> 2. Suppose that TeX-electric-math is a pair of dollars. Then typing $ 
>>> at 
>>> $E = mc^2-!- 
>>> inserts two dollars, not one dollar.

> I am personally still not a fan for special casing of dollars in a
> situation like that.

> While it can happen in some situations as you've pointed out, we're
> supporting this «insert the matching sign» behaviour only for the
> dollar sign. All other electric math options do not get this benefit.
> Furthermore, it's easily amended by typing C-d.

> Furthemore, if we had 
> $E = mc^2-!- bar-bar $ foo-foo
> and typed $, we would get 
> $E = mc^2$-!- bar-bar $ foo-foo
> which moves previously math-mode «bar-bar» into text-mode and
> previously text-mode «foo-foo» into (an unclosed) math-mode.

> With the new behaviour from my previous pacthes, it would turn into 
> $E = mc^2$-!-$ bar-bar $ foo-foo,
> preserving the modes.

> All in all, given that neither solution is without flaws, I lean in
> favour of the consistent one.

Your argument makes sense, so I think AUCTeX can accept that suggestion.
Are there anyone who object to this new behavior? (It is only relevant
for users who customized `TeX-refuse-unmatched-dollar' to non-nil.)

I'll comment on other minor matters.

> +(define-obsolete-variable-alias 'TeX-refuse-unmatched-dollar
> +  'TeX-refuse-nested-math "13.4"

The next AUCTeX version would be 14. (The ELPA releases already reached
14.) So the version should be "14" or "14.1".

> +(defun TeX-insert-dollar-mode (arg)

In general, an elisp function whose name ends with "-mode" is a major or
minor mode function, or is expected to do something related to major or
minor modes, at least within AUCTeX source. Thus I'd like you to change
this name `TeX-insert-dollar-mode' to `TeX-insert-dollar-action' or
something like that for coherency. (Since it can be considered as a
private helper function, you might as well assign it a name
"TeX--insert-..."; but that isn't much important.)

In addition, I'd request to provide appropriate patches for
doc/auctex.texi and doc/changes.texi, too. :-)

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



reply via email to

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