Created
September 27, 2010 01:10
-
-
Save tbielawa/598459 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 insert-date () | |
"Insert a time-stamp according to locale's date and time format." | |
(interactive) | |
(insert (format-time-string "%a, %e %b %Y, %k:%M" (current-time)))) | |
(global-set-key "\C-cd" 'insert-date) | |
(defun indent-buffer () | |
"Indents an entire buffer using the default intenting scheme." | |
(interactive) | |
(point-to-register 'o) | |
(delete-trailing-whitespace) | |
(indent-region (point-min) (point-max) nil) | |
(untabify (point-min) (point-max)) | |
(jump-to-register 'o)) | |
(global-set-key "\C-x\\" 'indent-buffer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment