Hi, Izumi,


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. 



I'll allow myself a bit of bikeshedding below, but feel free to completely 
dismiss it.



>> 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.



Best,
Artem

Attachment: 0005-split-out-the-electric-version-of-LaTeX-insert-left-.patch
Description: Binary data

Attachment: 0006-amend-TeX-electric-commands-to-allow-alternative-ele.patch
Description: Binary data

Reply via email to