diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-13 00:33:17 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-13 00:33:17 +0100 |
commit | 0ed5d4336b01b8d57f662780906ccf2450d2b300 (patch) | |
tree | 04d522c84b51ccc76495fedc40062710540fc54a | |
parent | 73fef543eaa25709f1c563efa0b71f12e9df34c7 (diff) | |
download | org-mode-0ed5d4336b01b8d57f662780906ccf2450d2b300.tar.gz |
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 <rasmus@gmx.us>
-rw-r--r-- | lisp/ox-publish.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 3cca0c9..e7a72d4 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) |