I've tried adding this code to the markdown-mode-hook
(push '(?` . ?`) (getf autopair-extra-pairs :everywhere))
The documentation of autopair-extra-pairs
explains:
Note that this does not work for single characters, e.x. characters you want to behave as quotes. See the docs/source comments for more details.
Which suggests the above would not work (and it didn't). But I was unable to figure out what would work after browsing the code for a bit.
I've also tried to muck around with the syntax table:
(modify-syntax-entry ?` "$" markdown-mode-syntax-table)
Which didn't help either.
I couldn't work this out either. However, if you're running Emacs 24, you use electric-pair-mode instead. Modifying the syntax table like this worked for me:
(add-hook 'markdown-mode-hook
#'(lambda ()
(modify-syntax-entry ?` "\"")))
Edit: As Joao Tavora points out, this seems to work in autopair, so perhaps this is all that's needed:
I was able to get this to work by modifying the syntax table, but using 'string quote' ("
) instead of 'paired delimiter' ("$"
):
(modify-syntax-entry ?` "\"" markdown-mode-syntax-table)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With