parent
4db4e411a0
commit
c4531b25a4
2 changed files with 14 additions and 6 deletions
|
|
@ -416,12 +416,11 @@ If NARROW is non-nil, buffer will not be widened."
|
|||
(when (org-before-first-heading-p)
|
||||
(outline-next-heading))
|
||||
;; `cl-loop' makes this double-while much clearer than the expanded form.
|
||||
(cond (preamble-re (cl-loop while (and (when (re-search-forward preamble-re nil t)
|
||||
(outline-back-to-heading 'invisible-ok)
|
||||
t)
|
||||
(funcall predicate))
|
||||
(cond (preamble-re (cl-loop while (re-search-forward preamble-re nil t)
|
||||
do (outline-back-to-heading 'invisible-ok)
|
||||
when (funcall predicate)
|
||||
collect (funcall action)
|
||||
while (outline-next-heading)))
|
||||
do (outline-next-heading)))
|
||||
(t (cl-loop when (funcall predicate)
|
||||
collect (funcall action)
|
||||
while (outline-next-heading)))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue