Created
February 10, 2013 23:14
-
-
Save danlamanna/4751470 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 fix-double-capital() | |
"Go back to last occurence of a 'double capital' at start of word and correct." | |
(interactive) | |
(if (re-search-backward "\\b\\([A-Z]\\{2\\}\\)" nil t) | |
(replace-match (concat (substring (match-string 0) 0 1) ;concat first char | |
(downcase (substring (match-string 0) 1 2))) t) ; with downcased second char | |
(message "No double capital found!"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment