aboutsummaryrefslogtreecommitdiff
path: root/ennum.el
diff options
context:
space:
mode:
Diffstat (limited to 'ennum.el')
-rw-r--r--ennum.el32
1 files changed, 15 insertions, 17 deletions
diff --git a/ennum.el b/ennum.el
index c0556d2..691018a 100644
--- a/ennum.el
+++ b/ennum.el
@@ -263,23 +263,21 @@ the current state of all its variables."
(let* ((tree (org-element-parse-buffer))
(links (org-element-map tree 'link
(lambda (link)
- (pcase link
- (`(link ,properties . ,_)
- (let ((link-type (org-element-property :type link))
- (path (org-element-property :path link)))
- (pcase link-type
- ("post"
- (ennum-make-post-link
- :path path
- :target-title (if (org-element-contents link)
- 'not-required 'required)))
- ("video"
- (ennum-make-video-link
- :path path
- :poster (ennum-video-poster path)))
- (_ (ennum-make-link
- :type (intern link-type)
- :path path))))))))))
+ (let ((link-type (org-element-property :type link))
+ (path (org-element-property :path link)))
+ (pcase link-type
+ ("post"
+ (ennum-make-post-link
+ :path path
+ :target-title (if (org-element-contents link)
+ 'not-required 'required)))
+ ("video"
+ (ennum-make-video-link
+ :path path
+ :poster (ennum-video-poster path)))
+ (_ (ennum-make-link
+ :type (intern link-type)
+ :path path))))))))
(ennum-make-post
:filename filename
:slug (file-name-base filename)