]> gitweb.fperrin.net Git - atom.git/blobdiff - atom.el
Add a README file.
[atom.git] / atom.el
diff --git a/atom.el b/atom.el
index c73c7d90704d10c8140183bff29e23e9d18a4603..d159eed7029a85c69e9e33afe78739b0fb6fa599 100644 (file)
--- a/atom.el
+++ b/atom.el
 
 (require 'xml)
 
-(defun atom-create (title link &optional author self updated id)
+(defun atom-create (title link &optional self id author updated)
   "Create a new atom structure.
 
 TITLE is the title for the feed, a short, text-only, human
 readable string.
 
-AUTHOR is the author of the feed. See `atom-massage-author' for
-the possible ways to specify it.
-
-SELF is the canonical URL to this feed.
-
 LINK is the URL of a page responible for the content of this
 feed.
 
-UPDATED is the date the feed was last updated. If not given,
-`(current-time)' is used.
+SELF is the canonical URL to this feed.
 
 ID is a unique identifier for this feed. If not given, it
-defaults to LINK."
+defaults to SELF.
+
+AUTHOR is the author of the feed. See `atom-massage-author' for
+the possible ways to specify it.
+
+UPDATED is the date the feed was last updated. If not given,
+`(current-time)' is used."
   (let ((atom-feed (list (list 'title nil title))))
     (atom-modify-entry atom-feed 'link `(((href . ,link))))
     (atom-modify-entry atom-feed 'author (atom-massage-author author))
@@ -92,7 +92,7 @@ defaults to LINK."
                                `(((href . ,self) (rel . "self")
                                   (type . "application/atom+xml")))))
     (atom-modify-entry atom-feed 'updated (atom-format-time updated))
-    (atom-modify-entry atom-feed 'id (or id link))
+    (atom-modify-entry atom-feed 'id (or id self link))
     atom-feed))
 
 (defun atom-push-entry (atom entry)