diff --git a/init.d/basics/misc.el b/init.d/basics/misc.el new file mode 100644 index 0000000..4fdb37f --- /dev/null +++ b/init.d/basics/misc.el @@ -0,0 +1,23 @@ +;;; 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 diff --git a/init.el b/init.el index 6dd7c97..ecdc40b 100644 --- a/init.el +++ b/init.el @@ -1,6 +1,6 @@ ;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-12-26T18:21:40+00:00> +;; Time-stamp: <2020-01-01T03:37:43+0100> ;;; Commentary: ;; Requires at least Emacs 26. Most of it will probably work with Emacs 24 and @@ -27,6 +27,7 @@ (setq gc-cons-threshold (* 20 1024 1024)) (setq gc-cons-threshold (* 100 1024 1024))) +(require 'basics/misc) (require 'basics/input) (require 'basics/buffers) (require 'basics/appearance)