emacs-devel
[Top][All Lists]
Advanced

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

Re: electric-pair-mode as a minor mode?


From: Stefan Monnier
Subject: Re: electric-pair-mode as a minor mode?
Date: Sun, 29 Mar 2015 20:54:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> could go somewhere into lisp/message.el if it weren't so fragile: the
> comment syntax could change according to `message-yank-cited-prefix' and
> also I has to be a comment only if it starts in the first column...
> Do you follow?  Know any way to handle these cases?

I guess you'd have to use syntax-propertize-function to catch&handle the
"unusual cases".

> Yes, yes and yes. Of course in natural languages there's no compiler
> formally telling you the message is unsyntactic, but I personally will
> go for a tool that gets it right almost everytime (some value between
> 90% and 100%), as long as the price when it gets it wrong is not too
> high. And simple syntax changes to help the syntax-ppss heuristic are
> the low-hanging fruit.

Agreed.  BTW, someone has written some syntax-propertize-function code
to "neutralize" the smileys, along the same ideas.  Can't remember where
it was discussed, tho, maybe gnu.emacs.help.

> Not suprising considering that brings back precisely your old
> implementation :-)

Ah, well, then this should work brilliantly, obviously,


        Stefan



reply via email to

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