.emacs.d/init.d/basics/misc.el

24 lines
536 B
EmacsLisp
Raw Normal View History

2020-01-01 03:42:25 +01:00
;;; misc.el --- Basic things that do not fit any other category. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-01-01T03:42:07+0100>
;;; Commentary:
;;; Code:
(use-package emacs
:ensure nil
:config
(defun my/message-with-timestamp (old-func fmt-string &rest args)
"Prepend current timestamp to a message"
(apply old-func
(concat (format-time-string "[%FT%T%z] ") fmt-string)
args))
(advice-add 'message :around #'my/message-with-timestamp)
)
(provide 'basics/misc)
;;; misc.el ends here