diff options
author | Rasmus <rasmus@gmx.us> | 2018-01-22 15:57:42 +0100 |
---|---|---|
committer | Rasmus <rasmus@gmx.us> | 2018-01-22 16:02:55 +0100 |
commit | bb396a369c93e57b033844003c7ceab61d61aa08 (patch) | |
tree | 31a9ef7d5792d64bf181b17cb8255386efd5d96d /lisp/org/org-inlinetask.el | |
parent | fa582153f7a75e1eaaef4bfd2b381916233dc0a7 (diff) | |
download | emacs-bb396a369c93e57b033844003c7ceab61d61aa08.tar.gz |
Update Org to v9.1.6
Please note this is a bugfix release. See etc/ORG-NEWS for details.
Diffstat (limited to 'lisp/org/org-inlinetask.el')
-rw-r--r-- | lisp/org/org-inlinetask.el | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 5b65fab5932..1825b88cdf6 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el @@ -182,24 +182,28 @@ The number of levels is controlled by `org-inlinetask-min-level'." (defun org-inlinetask-goto-end () "Go to the end of the inline task at point. -Return point." + Return point." (save-match-data (beginning-of-line) (let* ((case-fold-search t) - (inlinetask-re (org-inlinetask-outline-regexp)) - (task-end-re (concat inlinetask-re "END[ \t]*$"))) + (inlinetask-re (org-inlinetask-outline-regexp)) + (task-end-re (concat inlinetask-re "END[ \t]*$"))) (cond - ((looking-at task-end-re)) - ((looking-at inlinetask-re) - (forward-line) - (cond - ((looking-at task-end-re)) - ((looking-at inlinetask-re)) - ((org-inlinetask-in-task-p) - (re-search-forward inlinetask-re nil t)))) - (t (re-search-forward inlinetask-re nil t))) - (end-of-line) - (point)))) + ((looking-at-p task-end-re) + (forward-line)) + ((looking-at-p inlinetask-re) + (forward-line) + (cond + ((looking-at-p task-end-re) (forward-line)) + ((looking-at-p inlinetask-re)) + ((org-inlinetask-in-task-p) + (re-search-forward inlinetask-re nil t) + (forward-line)) + (t nil))) + (t + (re-search-forward inlinetask-re nil t) + (forward-line))))) + (point)) (defun org-inlinetask-get-task-level () "Get the level of the inline task around. @@ -330,7 +334,9 @@ This function is meant to be used in `org-cycle-hook'." (org-inlinetask-goto-end))))) (`children (save-excursion - (while (and (outline-next-heading) (org-inlinetask-at-task-p)) + (while + (or (org-inlinetask-at-task-p) + (and (outline-next-heading) (org-inlinetask-at-task-p))) (org-inlinetask-toggle-visibility) (org-inlinetask-goto-end)))))) |