summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text-conf.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/text-conf.el b/text-conf.el
index 6cd0d14..c25a2bf 100644
--- a/text-conf.el
+++ b/text-conf.el
@@ -111,5 +111,18 @@ Pass (- (prefix-numeric-value arg)) to `durand-next-page'."
(define-key text-mode-map (vector ?\s-m) #'durand-previous-page)
(define-key text-mode-map (vector ?\s-รน) #'durand-next-page)
+;; Insert time stamps
+
+;;;###autoload
+(defun durand-insert-timestamp (&optional arg)
+ "Insert the time stamp for now.
+If ARG is non-nil, use a more verbose format."
+ (interactive "P")
+ (let ((time-format (cond (arg "%F %T.%6N")
+ ("%F"))))
+ (insert (format-time-string time-format))))
+
+(define-key global-map (vector ?\H-=) #'durand-insert-timestamp)
+
(provide 'text-conf)
;;; text-conf.el ends here.