Explorar o código

Merge branch 'maint'

Kyle Meyer %!s(int64=9) %!d(string=hai) anos
pai
achega
59468ab2d8
Modificáronse 2 ficheiros con 5 adicións e 1 borrados
  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 ">>")