Created
May 20, 2013 18:45
-
-
Save kliph/5614342 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 wrap-region-in-md-kbd-tags () | |
"Wraps the selected region in HTML keyboard (<kbd></kbd>) tags | |
to create keyboard glyphs." | |
(interactive "r") | |
(save-excursion | |
(narrow-to-region (region-beginning) (region-end)) | |
(goto-char (point-min)) | |
(insert "<kbd>") | |
(goto-char (point-max)) | |
(insert "</kbd>") | |
(widen)) | |
(goto-char (+ (region-end) 6))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment