Przeglądaj źródła

Fix bug when `org-list-two-spaces-after-bullet-regexp' would be nil.

* org-list.el (org-list-bullet-string): first check if
  `org-list-two-spaces-after-bullet-regexp' isn't nil.
Nicolas Goaziou 14 lat temu
rodzic
commit
a665ecb666
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      lisp/org-list.el

+ 3 - 1
lisp/org-list.el

@@ -995,7 +995,9 @@ It determines the number of whitespaces to append by looking at
     (concat
      bullet " "
      ;; Do we need to concat another white space ?
-     (when (string-match org-list-two-spaces-after-bullet-regexp bullet) " "))))
+     (when (and org-list-two-spaces-after-bullet-regexp
+                (string-match org-list-two-spaces-after-bullet-regexp bullet))
+       " "))))
 
 (defun org-list-replace-bullet (new-bullet)
   "Replace current item's bullet with NEW-BULLET.