Explorar o código

org-list.el (org-list-bullet-string): Small fix

* org-list.el (org-list-bullet-string): Replace match when
there is a match, otherwise just return the bullet.
Bastien Guerry %!s(int64=12) %!d(string=hai) anos
pai
achega
1ee94060bc
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      lisp/org-list.el

+ 3 - 2
lisp/org-list.el

@@ -1081,8 +1081,9 @@ It determines the number of whitespaces to append by looking at
 			    org-list-two-spaces-after-bullet-regexp bullet))
 		      "  "
 		    " ")))
-      (string-match "\\S-+\\([ \t]*\\)" bullet)
-      (replace-match spaces nil nil bullet 1))))
+      (if (string-match "\\S-+\\([ \t]*\\)" bullet)
+	  (replace-match spaces nil nil bullet 1)
+	bullet))))
 
 (defun org-list-swap-items (beg-A beg-B struct)
   "Swap item starting at BEG-A with item starting at BEG-B in STRUCT.