mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-12 21:10:10 +00:00
org-publish.el (org-publish-cache-ctime-of-src): Simplify.
* org-publish.el (org-publish-cache-ctime-of-src): Simplify.
This commit is contained in:
parent
621364fc6d
commit
640b8c4076
|
@ -1185,17 +1185,11 @@ Returns value on success, else nil."
|
||||||
(error "%s" "`org-publish-cache-set' called, but no cache present"))
|
(error "%s" "`org-publish-cache-set' called, but no cache present"))
|
||||||
(puthash key value org-publish-cache))
|
(puthash key value org-publish-cache))
|
||||||
|
|
||||||
(defun org-publish-cache-ctime-of-src (filename)
|
(defun org-publish-cache-ctime-of-src (f)
|
||||||
"Get the FILENAME ctime as an integer."
|
"Get the FILENAME ctime as an integer."
|
||||||
(let* ((symlink-maybe (or (file-symlink-p filename) filename))
|
(let ((attr (file-attributes (expand-file-name (or (file-symlink-p f) f)))))
|
||||||
(src-attr (file-attributes (if (file-name-absolute-p symlink-maybe)
|
(+ (lsh (car (nth 5 attr)) 16)
|
||||||
symlink-maybe
|
(cadr (nth 5 attr)))))
|
||||||
(expand-file-name
|
|
||||||
symlink-maybe
|
|
||||||
(file-name-directory filename))))))
|
|
||||||
(+
|
|
||||||
(lsh (car (nth 5 src-attr)) 16)
|
|
||||||
(cadr (nth 5 src-attr)))))
|
|
||||||
|
|
||||||
(provide 'org-publish)
|
(provide 'org-publish)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue