summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-01-18 23:43:44 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-01-18 23:43:44 +0100
commitc27d0f85e504d1424d47804c277b8485c4d5add5 (patch)
tree9aae91c91bb2b79cdbbfedc0e6dc036f594340de
parent2372276883a1d745526449a5244b5b3036522303 (diff)
parentbdc220ca17d0710e8f0a82a16aeae3a416d61f3d (diff)
downloadorg-mode-c27d0f85e504d1424d47804c277b8485c4d5add5.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox-publish.el34
1 files changed, 15 insertions, 19 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index c4e26d4..0b24dbc 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1276,25 +1276,21 @@ the file including them will be republished as well."
(with-current-buffer buf
(goto-char (point-min))
(while (re-search-forward "^[ \t]*#\\+INCLUDE:" nil t)
- (let* ((element (org-element-at-point))
- (included-file
- (and (eq (org-element-type element) 'keyword)
- (let ((value (org-element-property :value element)))
- (and value
- (string-match
- "\\`\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)"
- value)
- (let ((m (match-string 1 value)))
- (org-unbracket-string
- "\"" "\""
- ;; Ignore search suffix.
- (if (string-match "::.*?\"?\\'" m)
- (substring m 0 (match-beginning 0))
- m))))))))
- (when included-file
- (push (org-publish-cache-ctime-of-src
- (expand-file-name included-file))
- included-files-ctime)))))
+ (let ((element (org-element-at-point)))
+ (when (eq 'keyword (org-element-type element))
+ (let* ((value (org-element-property :value element))
+ (filename
+ (and (string-match "\\`\\(\".+?\"\\|\\S-+\\)" value)
+ (let ((m (org-unbracket-string
+ "\"" "\"" (match-string 1 value))))
+ ;; Ignore search suffix.
+ (if (string-match "::.*?\\'" m)
+ (substring m 0 (match-beginning 0))
+ m)))))
+ (when filename
+ (push (org-publish-cache-ctime-of-src
+ (expand-file-name filename))
+ included-files-ctime)))))))
(unless visiting (kill-buffer buf)))))
(or (null pstamp)
(let ((ctime (org-publish-cache-ctime-of-src filename)))