]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
added C-c C-t insert-timestamp with changelog-style string.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 4 Nov 2013 12:09:41 +0000 (13:09 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 4 Nov 2013 12:09:41 +0000 (13:09 +0100)
init.el

diff --git a/init.el b/init.el
index 0d869e92027c8997c6bc1767c5f3f81b50ece5cf..2eb16b5723082a58f4679dc609cd300fe17631f2 100644 (file)
--- a/init.el
+++ b/init.el
@@ -148,6 +148,11 @@ load-path))
 "Insert the current date"
 (interactive)
 (insert-string (format-time-string "%B %e, %Y")))
+(defun insert-timestamp ()
+"Insert the current timestamp"
+(interactive)
+(insert-string (format-time-string "%a %b %e %Y") " " (or (and (boundp 'user-full-name) user-full-name) (user-full-name))" <" (getenv "EMAIL") ">" ))
+
 (defun load-git-cfengine ()
   "Load config and tags file of git cfengine repo"
 (interactive) (visit-tags-table "~/.cfengine_tags")
@@ -298,6 +303,7 @@ nil)
 (define-key global-map "\C-ct" 'visit-tags-table)
 (define-key global-map "\C-cf" 'tags-search)
 
+(define-key global-map "\C-c\C-t" 'insert-timestamp)
 (define-key global-map "\C-c\C-c" 'centered-cursor-mode)
 
 (define-key global-map "\C-cc" 'load-git-cfengine)