From 0ed5d4336b01b8d57f662780906ccf2450d2b300 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 13 Feb 2015 00:33:17 +0100 Subject: [PATCH] ox-publish: Clean-up `org-publish-find-date' * lisp/ox-publish.el (org-publish-find-date): Remove useless cond branch. :date property is never a single timestamp, so the first branch is always false. Reported-by: Rasmus --- lisp/ox-publish.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 3cca0c958..e7a72d4a2 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -839,17 +839,15 @@ time in `current-time' format." (date (plist-get (with-current-buffer file-buf (if visiting - (org-export-with-buffer-copy (org-export-get-environment)) + (org-export-with-buffer-copy + (org-export-get-environment)) (org-export-get-environment))) :date))) (unless visiting (kill-buffer file-buf)) - ;; DATE is either a timestamp object or a secondary string. If it - ;; is a timestamp or if the secondary string contains a timestamp, + ;; DATE is a secondary string. If it contains a timestamp, ;; convert it to internal format. Otherwise, use FILE ;; modification time. - (cond ((eq (org-element-type date) 'timestamp) - (org-time-string-to-time (org-element-interpret-data date))) - ((let ((ts (and (consp date) (assq 'timestamp date)))) + (cond ((let ((ts (and (consp date) (assq 'timestamp date)))) (and ts (let ((value (org-element-interpret-data ts))) (and (org-string-nw-p value) -- 2.11.4.GIT