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>
This commit is contained in:
parent
73fef543ea
commit
0ed5d4336b
1 changed files with 4 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue