summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-07-25 17:35:26 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:50 +0200
commit7c424b33ead413314188bc029e02ebcce67fcbc0 (patch)
tree0f14faa7853f1e70f874879188f5eab71c4ad97b
parent25de94f3cc04026f52e5446230a154ee97a3adbc (diff)
downloadorg-mode-7c424b33ead413314188bc029e02ebcce67fcbc0.tar.gz
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.
-rw-r--r--lisp/org-list.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index b387023..7575acc 100644
--- a/lisp/org-list.el
+++ b/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,