Created
February 25, 2025 08:06
-
-
Save gugod/33ee8434d883c7ed08dee6c4c37ce9c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my/requote-with (c) | |
"Replace the quoting delemiter of the current quoted string" | |
(save-mark-and-excursion | |
(progn | |
(forward-sexp) | |
(insert-char c) | |
(backward-char) | |
(backward-sexp) | |
(insert-char c) | |
(delete-pair)))) | |
(defun my/requote-with-single-quote () | |
"Replace the quoting delemiter of the current quoted string" | |
(interactive) | |
(my/requote-with (string-to-char "'"))) | |
(defun my/requote-with-double-quote () | |
"Replace the quoting delemiter of the current quoted string" | |
(interactive) | |
(my/requote-with (string-to-char "\""))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment