Skip to content

Instantly share code, notes, and snippets.

@Frozenlock
Created July 19, 2012 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frozenlock/3140372 to your computer and use it in GitHub Desktop.
Save Frozenlock/3140372 to your computer and use it in GitHub Desktop.
Uppercase word in emacs (with save-excursion)
(global-set-key (kbd "C-c u")
(lambda()(interactive)
(save-excursion
(let (pt)
(skip-chars-backward "-_A-Za-z0-9")
(setq pt (point))
(skip-chars-forward "-_A-Za-z0-9")
(upcase-region pt (point)))
(message "UPPERCASE!"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment