Browse Source

Bug fix. First bullet of *-list would not become "-" when hitting column 0.

Nicolas Goaziou 14 years ago
parent
commit
cbc337f285
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lisp/org-list.el

+ 4 - 2
lisp/org-list.el

@@ -853,7 +853,8 @@ children. Return t if sucessful."
        ;; 1. If at top-point move the whole list. Moreover, if
        ;; 1. If at top-point move the whole list. Moreover, if
        ;; *-list is going to column 0, change bullet to "-".
        ;; *-list is going to column 0, change bullet to "-".
        ((= (point-at-bol) (org-list-top-point))
        ((= (point-at-bol) (org-list-top-point))
-	(when (and (= (+ delta ind) 0) (equal bullet "*")) (org-fix-bullet-type "-"))
+	(when (and (= (+ delta ind) 0) (equal bullet "*"))
+	  (org-fix-bullet-type (setq bullet "-")))
 	(setq end (set-marker org-last-indent-end-marker (org-list-bottom-point))))
 	(setq end (set-marker org-last-indent-end-marker (org-list-bottom-point))))
        ;; 2. Do not indent before top-item.
        ;; 2. Do not indent before top-item.
        ((< (+ delta ind) origin-ind)
        ((< (+ delta ind) origin-ind)
@@ -871,7 +872,8 @@ children. Return t if sucessful."
 	(goto-char pos)
 	(goto-char pos)
 	(error "Cannot outdent an item having children")))))
 	(error "Cannot outdent an item having children")))))
     ;; Replace bullet of current item with the bullet it is going to
     ;; Replace bullet of current item with the bullet it is going to
-    ;; have if we're outdenting.
+    ;; have if we're outdenting. This is needed to prevent indentation
+    ;; problems of subtrees when outdenting changes bullet size.
     (when (< delta 0)
     (when (< delta 0)
       (let ((new-bul (concat
       (let ((new-bul (concat
                       (or bul-up bullet) " "
                       (or bul-up bullet) " "