mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-15 17:00:45 +00:00
org-inlinetask: Small refactoring
* lisp/org-inlinetask.el (org-inlinetask-goto-end): Small refactoring.
This commit is contained in:
parent
ac4b117bcc
commit
ea7732d269
@ -239,30 +239,24 @@ 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."
|
||||
(beginning-of-line)
|
||||
(let* ((case-fold-search t)
|
||||
(inlinetask-re (org-inlinetask-outline-regexp))
|
||||
(task-end-re (concat inlinetask-re "END[ \t]*$")))
|
||||
(cond
|
||||
((org-looking-at-p task-end-re)
|
||||
(forward-line)
|
||||
(point))
|
||||
((org-looking-at-p inlinetask-re)
|
||||
(forward-line)
|
||||
(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]*$")))
|
||||
(cond
|
||||
((org-looking-at-p task-end-re)
|
||||
((looking-at task-end-re) (forward-line))
|
||||
((looking-at inlinetask-re)
|
||||
(forward-line)
|
||||
(point))
|
||||
((org-looking-at-p inlinetask-re) (point))
|
||||
((org-inlinetask-in-task-p)
|
||||
(re-search-forward inlinetask-re nil t)
|
||||
(forward-line)
|
||||
(point))
|
||||
(t (point))))
|
||||
(t
|
||||
(re-search-forward inlinetask-re nil t)
|
||||
(forward-line)
|
||||
(point)))))
|
||||
(cond
|
||||
((looking-at task-end-re) (forward-line))
|
||||
((looking-at inlinetask-re))
|
||||
((org-inlinetask-in-task-p)
|
||||
(re-search-forward inlinetask-re nil t)
|
||||
(forward-line))))
|
||||
(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.
|
||||
|
Loading…
Reference in New Issue
Block a user