smart-quotes icon indicating copy to clipboard operation
smart-quotes copied to clipboard

Allow smart-quotes-insert-{single,double} to work with electric-pair-mode

Open rrthomas opened this issue 9 years ago • 4 comments

Common up the two functions, then make the resulting smart-quotes--insert call insert-char when it is swapping an existing quote, and set last-command-event then call self-insert-command otherwise. In the latter case (inserting a quote), post-self-insert-hook is run, and the quote’s pair can be added by electric-pair-mode.

rrthomas avatar Nov 08 '16 17:11 rrthomas

This fixes issue #6.

rrthomas avatar Nov 08 '16 17:11 rrthomas

I added removal of turn-{on,off}-smart-quotes: minor modes work conveniently without this (in particular, if called from Lisp with no argument, the mode is unconditionally turned on).

rrthomas avatar Nov 29 '16 00:11 rrthomas

Ping? I just found and fixed a minor bug in this PR, namely that it needs to (require 'cl-lib).

rrthomas avatar Apr 09 '18 16:04 rrthomas

Ping again? I'd be happy to take this mode over, as I use it all the time.

rrthomas avatar Dec 08 '22 20:12 rrthomas