New function `org-mark-list' bound to `C-c C-@'.

* org-list.el (org-mark-list): New function.

* org.el (org-mode-map): Add a keybinding for the new function.
This commit is contained in:
Bastien Guerry 2012-01-25 13:52:20 +01:00
parent c4fad02b06
commit aee6f9008a
2 changed files with 13 additions and 0 deletions

View File

@ -2177,6 +2177,18 @@ item is invisible."
(goto-char (match-end 0))
t)))))
(defun org-mark-list ()
"Mark the current list.
If this is a sublist, only mark the sublist."
(interactive)
(let* ((item (org-list-get-item-begin))
(struct (org-list-struct))
(prevs (org-list-prevs-alist struct))
(lbeg (org-list-get-list-begin item struct prevs))
(lend (org-list-get-list-end item struct prevs)))
(push-mark lend nil t)
(goto-char lbeg)))
(defun org-list-repair ()
"Fix indentation, bullets and checkboxes is the list at point."
(interactive)

View File

@ -17366,6 +17366,7 @@ BEG and END default to the buffer boundaries."
(org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull)
(org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push)
(org-defkey org-mode-map "\C-c@" 'org-mark-subtree)
(org-defkey org-mode-map "\C-c\C-@" 'org-mark-list)
(org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree)
;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree)