diff options
author | Arun Isaac | 2022-08-17 00:34:48 +0530 |
---|---|---|
committer | Arun Isaac | 2022-08-17 00:51:56 +0530 |
commit | d4228b8c5173251e90595209f9fe88ee305f9ed4 (patch) | |
tree | 1461a131ff469883cec917800e93e2003dd452cd | |
parent | e2694487648194865dcc51e5b5492bf3d6a6de99 (diff) | |
download | ennum-d4228b8c5173251e90595209f9fe88ee305f9ed4.tar.gz ennum-d4228b8c5173251e90595209f9fe88ee305f9ed4.tar.lz ennum-d4228b8c5173251e90595209f9fe88ee305f9ed4.zip |
Replace first with seq-first.
cl is deprecated. So we replace first from cl with seq-first from seq.
* ennum.el: Do not require cl.
(ennum--read-post, ennum-publish-index, ennum-publish-feed): Replace
first with seq-first.
-rw-r--r-- | ennum.el | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -4,7 +4,6 @@ (require 'ennum-image) (require 'ox) (require 'seq) -(require 'cl) (require 'loadhist) (require 'map) (require 'memoize) @@ -282,8 +281,8 @@ the current state of all its variables." :filename filename :slug (file-name-base filename) :author (when-let (author (plist-get metadata :author)) - (funcall export (first author))) - :date (org-timestamp-to-time (first (plist-get metadata :date))) + (funcall export (seq-first author))) + :date (org-timestamp-to-time (seq-first (plist-get metadata :date))) :language (plist-get metadata :language) :links links ;; TODO: Deal with cases when the :tangle parameter is "yes" @@ -297,7 +296,7 @@ the current state of all its variables." ("no" nil) (_ tangle-output-file)))))))) :summary (when-let (summary (plist-get metadata :summary)) - (funcall export (first summary))) + (funcall export (seq-first summary))) :tags (plist-get metadata :filetags) :thumbnail (or (plist-get metadata :thumbnail) (seq-some (lambda (link) @@ -306,7 +305,7 @@ the current state of all its variables." ('image path) ('video (ennum-video-poster path))))) links)) - :title (funcall export (first (plist-get metadata :title))) + :title (funcall export (seq-first (plist-get metadata :title))) :translation-group (or (plist-get metadata :translation-group) (file-name-base filename))))))) @@ -479,7 +478,7 @@ result as a string." (seq-partition posts posts-per-page) page-numbers output-files))) - (cons (ennum-publish-index-home (first outputs) filename-prefix tongue) + (cons (ennum-publish-index-home (seq-first outputs) filename-prefix tongue) outputs))) (defun ennum--absolute-uri (path) @@ -507,7 +506,7 @@ result as a string." `(feed :xmlns "http://www.w3.org/2005/Atom" (id ,(ennum--absolute-uri "")) (title ,title) - (updated ,(ennum--atom-date (ennum-post-date (first posts)))) + (updated ,(ennum--atom-date (ennum-post-date (seq-first posts)))) (link :rel "self" :href ,(ennum--absolute-uri feed-file)) (generator ,(format "Emacs %d.%d Org-mode %s ennum %s" |