Browse Source

Cycle indentation for newly created description items or checkboxes.

* org-list.el (org-cycle-item-indentation): Allow a point just after a
  description item or a checkboxed item to start cycling.
Nicolas Goaziou 15 years ago
parent
commit
7c424b33ea
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-list.el

+ 2 - 1
lisp/org-list.el

@@ -928,7 +928,8 @@ Assumes cursor in item line."
   (let ((org-suppress-item-indentation t)
 	(org-adapt-indentation nil))
     (when (and (looking-at "[ \t]*$")
-	       (org-looking-back (concat org-item-beginning-re "[ \t]*")))
+	       (or (org-at-description-p) (org-at-item-checkbox-p) (org-at-item-p))
+	       (>= (match-end 0) (save-excursion (skip-chars-backward " \r\t\n") (point))))
       (setq this-command 'org-cycle-item-indentation)
       ;; When in the middle of the cycle, try to outdent first. If it
       ;; fails, and point is still at initial position, indent. Else,