There is built-in emacs function for surrounding a region with parenthesis, as I found it here: https://stackoverflow.com/a/2952021/1635919. Is there an analogous way to surround a region with dollar ($)?
C-h f insert-pair
tells that this function is able to surround sexp with any character, so how to bind surrounding with $ to M-$
as in the linked answer?
My Emacs: GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.10.7)