aboutsummaryrefslogtreecommitdiff
path: root/modules/home-manager/emacs/config/lisp/insert-date.el
blob: ca8214ff27fd83f21179b397485dd090295960b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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