about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el3
-rw-r--r--lisp/acdw.el6
2 files changed, 8 insertions, 1 deletions
diff --git a/init.el b/init.el index c65a3ea..3ff41b4 100644 --- a/init.el +++ b/init.el
@@ -254,7 +254,8 @@
254 "C-c i" acdw/find-emacs-dotfiles 254 "C-c i" acdw/find-emacs-dotfiles
255 "C-x k" acdw/kill-a-buffer) 255 "C-x k" acdw/kill-a-buffer)
256 256
257 (:leader "C-c" save-buffers-kill-emacs) 257 (:leader "C-c" save-buffers-kill-emacs
258 "t" acdw/insert-iso-date)
258 259
259 ;;; Advice 260 ;;; Advice
260 ;; `acdw/kill-line-and-join-advice' cribs from `crux-kill-and-join-forward'. 261 ;; `acdw/kill-line-and-join-advice' cribs from `crux-kill-and-join-forward'.
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