diff options
author | Case Duckworth | 2021-04-26 15:26:32 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-26 15:26:32 -0500 |
commit | 476f696af8921c4906525b46f4cc2928462313a2 (patch) | |
tree | 92217b5b8c6c673fd3fd80290af359c662e4a0d0 /lisp | |
parent | Enhance `refresh-emacs' (diff) | |
download | emacs-476f696af8921c4906525b46f4cc2928462313a2.tar.gz emacs-476f696af8921c4906525b46f4cc2928462313a2.zip |
Add `acdw/insert-iso-date'
Like `crux-insert-date', but I use ISO 8601.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 9426117..96b69f9 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -169,6 +169,12 @@ Prompt only if there are unsaved changes." | |||
169 | (16 (mapc 'kill-buffer (delq (current-buffer) (buffer-list))) | 169 | (16 (mapc 'kill-buffer (delq (current-buffer) (buffer-list))) |
170 | (delete-other-windows)))) | 170 | (delete-other-windows)))) |
171 | 171 | ||
172 | (defun acdw/insert-iso-date (with-time) | ||
173 | "Insert the ISO-8601-formatted date, with optional time." | ||
174 | (interactive "P") | ||
175 | (let ((format (if with-time "%FT%T%z" "%F"))) | ||
176 | (insert (format-time-string format (current-time))))) | ||
177 | |||
172 | 178 | ||
173 | ;; Make `C-z' more useful | 179 | ;; Make `C-z' more useful |
174 | (defvar acdw/leader | 180 | (defvar acdw/leader |