summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-07-29 14:25:05 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:52 +0200
commit5903c0844746e3f9ef3005f4ab946e26cfaa6ba3 (patch)
tree84f4117d91d84736d98a976d4a006286a578f631
parentee568516e89c6ac0fe1592abc04194970bdb8439 (diff)
downloadorg-mode-5903c0844746e3f9ef3005f4ab946e26cfaa6ba3.tar.gz
Moving top list item will move whole list only if moving by subtree.
* org-list.el (org-list-automatic-rules): doc-string reflects this change. * org-list.el (org-indent-item-tree): prevent whole list from being moved when user is not moving subtree. Thus, `org-cycle-item-indentation' will not allow to move the list.
-rw-r--r--lisp/org-list.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 8f06723..881001b 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -185,10 +185,11 @@ checkbox when non-nil, checkbox statistics is updated each time
you either insert a new checkbox or toggle a checkbox.
It also prevents from inserting a checkbox in a
description item.
-indent when non-nil indenting or outdenting list top-item will
- move the whole list, indenting the first item of a
- sub-list will be forbidden and outdenting a list whose
- bullet is * to column 0 will change that bullet to -.
+indent when non-nil indenting or outdenting list top-item with
+ its subtree will move the whole list, all moves that
+ would break list will be forbidden, and outdenting a
+ list whose bullet is * to column 0 will change that
+ bullet to -.
insert when non-nil, trying to insert an item inside a block
will insert it right before the block instead of
throwing an error.
@@ -844,7 +845,8 @@ children. Return t if sucessful."
(cond
;; 1. If at top-point move the whole list. Moreover, if
;; *-list is going to column 0, change bullet to "-".
- ((= (point-at-bol) (org-list-top-point))
+ ((and (= (point-at-bol) (org-list-top-point))
+ (not no-subtree))
(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))))