Lists: Fix renumbering lists where the first item is not a numbered bullet

This commit is contained in:
Carsten Dominik 2009-02-15 19:59:11 +01:00
parent fdf8ffc4f1
commit 1a488f9136
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,8 @@
* org-list.el (org-toggle-checkbox): Make double prefix set the
checkbox to "[-]".
(org-fix-bullet-type): Only replace bullet it it is changed.
(org-renumber-ordered-list): Handle case when first item does not
have a number.
* org.el (org-add-log-setup): Fix positioning when
`org-log-states-order-reversed' is nil.

View file

@ -707,7 +707,7 @@ with something like \"1.\" or \"2)\"."
(org-beginning-of-item-list)
(setq bobp (bobp))
(looking-at "[ \t]*[0-9]+\\([.)]\\)")
(setq fmt (concat "%d" (match-string 1)))
(setq fmt (concat "%d" (or (match-string 1) ".")))
(beginning-of-line 0)
;; walk forward and replace these numbers
(catch 'exit