Skip to content

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

Open
rrthomas wants to merge 7 commits into
gareth-rees:masterfrom
rrthomas:master
Open

Allow smart-quotes-insert-{single,double} to work with electric-pair-mode#8
rrthomas wants to merge 7 commits into
gareth-rees:masterfrom
rrthomas:master

Conversation

@rrthomas

@rrthomas rrthomas commented Nov 8, 2016

Copy link
Copy Markdown
Contributor

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

rrthomas commented Nov 8, 2016

Copy link
Copy Markdown
Contributor Author

This fixes issue #6.

@rrthomas

Copy link
Copy Markdown
Contributor Author

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 added 3 commits April 9, 2018 17:11
…mode

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.
Minor modes support this naturally now. Update the docstring of
smart-quotes-mode to reflect this.
@rrthomas

rrthomas commented Apr 9, 2018

Copy link
Copy Markdown
Contributor Author

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

@rrthomas

rrthomas commented Dec 8, 2022

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant