0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 06:46:26 +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:
Bastien Guerry 2012-08-10 12:41:13 +02:00
parent 621364fc6d
commit 640b8c4076

View file

@ -1185,17 +1185,11 @@ Returns value on success, else nil."
(error "%s" "`org-publish-cache-set' called, but no cache present"))
(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."
(let* ((symlink-maybe (or (file-symlink-p filename) filename))
(src-attr (file-attributes (if (file-name-absolute-p symlink-maybe)
symlink-maybe
(expand-file-name
symlink-maybe
(file-name-directory filename))))))
(+
(lsh (car (nth 5 src-attr)) 16)
(cadr (nth 5 src-attr)))))
(let ((attr (file-attributes (expand-file-name (or (file-symlink-p f) f)))))
(+ (lsh (car (nth 5 attr)) 16)
(cadr (nth 5 attr)))))
(provide 'org-publish)