aboutsummaryrefslogtreecommitdiff
path: root/modules/home-manager/emacs/config/lisp/insert-date.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home-manager/emacs/config/lisp/insert-date.el')
-rw-r--r--modules/home-manager/emacs/config/lisp/insert-date.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/home-manager/emacs/config/lisp/insert-date.el b/modules/home-manager/emacs/config/lisp/insert-date.el
new file mode 100644
index 0000000..ca8214f
--- /dev/null
+++ b/modules/home-manager/emacs/config/lisp/insert-date.el
@@ -0,0 +1,21 @@
+;;; package --- insert-date.el
+;;; commentary:
+;;; Package to insert a date
+
+;;; CODE:
+
+(defcustom insert-date-format
+ "%m-%d-%Y"
+ "Format for the `insert-date' function."
+ :type '(string)
+ :group 'insert-date)
+
+(defun insert-date ()
+ "Insert the date into the curret buffer.
+Format can be changed with `insert-date-format'."
+ (interactive)
+ (insert (format-time-string insert-date-format (current-time))))
+
+(provide 'insert-date)
+
+;;; insert-date.el ends here