diff --git a/init.d/basics/global-variables.el b/init.d/basics/global-variables.el index b704a83..7d2b7b9 100644 --- a/init.d/basics/global-variables.el +++ b/init.d/basics/global-variables.el @@ -1,6 +1,6 @@ -;;; global-variables.el --- Set global variables. -*- lexical-binding: t; -*- +;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-02-26T04:52:33+0100> +;; Time-stamp: <2020-02-26T22:56:29+0100> ;;; Commentary: ;; * Set `slow-computer'. @@ -9,6 +9,8 @@ ;; * Fewer startup messages. ;; * Configure backup settings. ;; * Set username and email-address. +;; * Set up authentication sources +;; * Define some essential functions. ;;; Code: @@ -63,6 +65,11 @@ "Returns the version of clangd as float." (string-to-number (nth 2 (split-string (shell-command-to-string "clangd --version"))))) + + (defun my/file-last-modification (file) + "Return the absolute time FILE was last modified in seconds." + (time-to-seconds + (file-attribute-modification-time (file-attributes file)))) ) (provide 'basics/global-variables)