Browse Source

Make bullet modification work for ordered lists as well

Carsten Dominik 16 years ago
parent
commit
1768f325df
2 changed files with 7 additions and 0 deletions
  1. 1 0
      lisp/ChangeLog
  2. 6 0
      lisp/org-list.el

+ 1 - 0
lisp/ChangeLog

@@ -1,6 +1,7 @@
 2009-07-07  Carsten Dominik  <carsten.dominik@gmail.com>
 2009-07-07  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* org-list.el (org-indent-item): Fix typo.
 	* org-list.el (org-indent-item): Fix typo.
+	(org-item-indent-positions): Normalize ordered bullet.
 
 
 	* org-html.el (org-export-html-home/up-format): New option.
 	* org-html.el (org-export-html-home/up-format): New option.
 	(org-export-as-html): Insert the up and HOME links.
 	(org-export-as-html): Insert the up and HOME links.

+ 6 - 0
lisp/org-list.el

@@ -1028,6 +1028,12 @@ Assumes cursor in item line."
 	(skip-chars-forward " \t")
 	(skip-chars-forward " \t")
 	(setq ind-down (current-column)
 	(setq ind-down (current-column)
 	      bullet-down (org-get-bullet)))))
 	      bullet-down (org-get-bullet)))))
+    (if (and bullet-down (string-match "\\`[0-9]+\\(\\.\\|)\\)\\'" bullet-down))
+	(setq bullet-down (concat "1" (match-string 1 bullet-down))))
+    (if (and bullet-up (string-match "\\`[0-9]+\\(\\.\\|)\\)\\'" bullet-up))
+	(setq bullet-up (concat "1" (match-string 1 bullet-up))))
+    (if (and bullet (string-match "\\`[0-9]+\\(\\.\\|)\\)\\'" bullet))
+	(setq bullet (concat "1" (match-string 1 bullet))))
     (list (cons ind bullet)
     (list (cons ind bullet)
 	  (cons ind-up bullet-up)
 	  (cons ind-up bullet-up)
 	  (cons ind-down bullet-down))))
 	  (cons ind-down bullet-down))))