Emacs: Add my/file-last-modification.
This commit is contained in:
parent
48be5d24d6
commit
0a66771a5b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user