]> gitweb.fperrin.net Git - atom.git/blobdiff - atom.el
Add published propety
[atom.git] / atom.el
diff --git a/atom.el b/atom.el
index caca05c433b1c67121181794cf6c6ccc34c8c87a..34111c1d6ebf75f7e93cd3a908dc1d92add1e9ca 100644 (file)
--- a/atom.el
+++ b/atom.el
@@ -124,8 +124,7 @@ PROPS is an optional plist with the following properties:
 
 - :summary, if is not given, the entry will not contain any summary.
 
-- :updated defaults to `(current-time)' if omitted, which is
-probably not a very good default.
+- :updated defaults to `(current-time)'.
 
 - :published, if given, is the earliest availability of the
   entry. It is optional, and shouldn't change even if the entry
@@ -138,6 +137,8 @@ probably not a very good default.
     (atom-modify-entry entry 'link  (list (list (cons 'href link))))
     (atom-modify-entry entry 'id (or (plist-get props :id) link))
     (atom-modify-entry entry 'updated (atom-format-time (plist-get props :updated)))
+    (if (plist-member props :published)
+       (atom-modify-entry entry 'published (atom-format-time (plist-get props :published))))
     (if (plist-member props :summary)
        (atom-modify-entry entry 'summary (plist-get props :summary)))
     (atom-modify-entry entry 'content content)