mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 17:46:27 +00:00
org-list: handle case when moving top item without its subtree
This commit is contained in:
parent
f66e9cbfd5
commit
504b497b7f
|
@ -692,9 +692,13 @@ STRUCT is the list structure. Return t if successful."
|
||||||
(parents (org-list-struct-parent-alist struct))
|
(parents (org-list-struct-parent-alist struct))
|
||||||
(prevs (org-list-struct-prev-alist struct))
|
(prevs (org-list-struct-prev-alist struct))
|
||||||
;; Are we going to move the whole list?
|
;; Are we going to move the whole list?
|
||||||
(specialp (and (cdr (assq 'indent org-list-automatic-rules))
|
(specialp
|
||||||
(not no-subtree)
|
(and (= top (point))
|
||||||
(= top (point)))))
|
(cdr (assq 'indent org-list-automatic-rules))
|
||||||
|
(if no-subtree
|
||||||
|
(error
|
||||||
|
"First item of list cannot move without its subtree")
|
||||||
|
t))))
|
||||||
;; Determine begin and end points of zone to indent. If moving
|
;; Determine begin and end points of zone to indent. If moving
|
||||||
;; more than one item, save them for subsequent moves.
|
;; more than one item, save them for subsequent moves.
|
||||||
(unless (and (memq last-command '(org-shiftmetaright org-shiftmetaleft))
|
(unless (and (memq last-command '(org-shiftmetaright org-shiftmetaleft))
|
||||||
|
|
Loading…
Reference in a new issue