summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-08-15 16:49:47 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:53 +0200
commitdea5050dbc8444745db69a67ca0d317983e44da0 (patch)
treefe5af42c88a09768be2ca9f83535d3e6a1972f15
parent05aeeae9ed2a845e89c1e62c3bbab8cd6e35fe1f (diff)
downloadorg-mode-dea5050dbc8444745db69a67ca0d317983e44da0.tar.gz
Ensure shifting top-level item can catch column 0
* org-list.el (org-indent-item-tree): shifting step of top-level item depends on `org-level-increment'.
-rw-r--r--lisp/org-list.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 2fb10b6..0d024fc 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1103,8 +1103,9 @@ children. Return t if successful."
(cond
;; Special case: moving top-item with indent rule
((and (= top beg) (cdr (assq 'indent org-list-automatic-rules)))
- (let ((offset (if (< arg 0) -2 2))
- (top-ind (nth 1 beg-item)))
+ (let* ((level-skip (org-level-increment))
+ (offset (if (< arg 0) (- level-skip) level-skip))
+ (top-ind (nth 1 beg-item)))
(if (< (+ top-ind offset) 0)
(error "Cannot outdent beyond margin")
;; Change bullet if necessary