瀏覽代碼

Merge branch 'maint'

Kyle Meyer 9 年之前
父節點
當前提交
59468ab2d8
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 2 1
      lisp/org.el
  2. 3 0
      testing/lisp/test-org.el

+ 2 - 1
lisp/org.el

@@ -11749,6 +11749,7 @@ such as the file name.
 SEPARATOR is inserted between the different parts of the path,
 the default is \"/\"."
   (setq width (or width 79))
+  (setq path (delq nil path))
   (unless (> width 0)
     (user-error "Argument `width' must be positive"))
   (setq separator (or separator "/"))
@@ -11758,7 +11759,7 @@ the default is \"/\"."
 		 (mapconcat
 		  (lambda (s) (replace-regexp-in-string "[ \t]+\\'" "" s))
 		  (loop for head in path
-			for n upto (length path)
+			for n from 0
 			collect (org-add-props
 				    head nil 'face
 				    (nth (% n org-n-level-faces) org-level-faces)))

+ 3 - 0
testing/lisp/test-org.el

@@ -1397,6 +1397,9 @@
   (should
    (string= (org-format-outline-path '())
 	    ""))
+  (should
+   (string= (org-format-outline-path '(nil))
+	    ""))
   ;; Empty path and prefix.
   (should
    (string= (org-format-outline-path '() nil ">>")