浏览代码

Fix a small issue with the sitemap code

Carsten Dominik 15 年之前
父节点
当前提交
16c0dd7f69
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 1 0
      lisp/ChangeLog
  2. 3 4
      lisp/org-publish.el

+ 1 - 0
lisp/ChangeLog

@@ -14,6 +14,7 @@
 	to the file.
 	(org-publish-index-generate-theindex.inc): Check if there is
 	actually a target and only then add it to the link.
+	(org-publish-projects): Fix a remaining issue with the last commit
 
 	* org-html.el (org-export-as-html): Treat verse as open/close
 	paragraph.

+ 3 - 4
lisp/org-publish.el

@@ -618,10 +618,9 @@ If :makeindex is set, also produce a file theindex.org."
 	  (preparation-function (plist-get project-plist :preparation-function))
 	  (completion-function (plist-get project-plist :completion-function))
 	  (files (org-publish-get-base-files project exclude-regexp)) file)
-      (when (and (not (stringp sitemap-sort-folders))
-                 (not (string= sitemap-sort-folders "first"))
-                 (not (string= sitemap-sort-folders "last")))
-       (setq sitemap-sort-folders nil))
+       ;; Make sure sitemap-sort-folders' has an accepted value
+       (unless (memq sitemap-sort-folders '(first last))
+	 (setq sitemap-sort-folders nil))
        (when preparation-function (run-hooks 'preparation-function))
        (if sitemap-p (funcall sitemap-function project sitemap-filename))
        (while (setq file (pop files))