if we have org-every we should have org-some

* lisp/org.el (org-some): An org-mode version of the cl some function.
This commit is contained in:
Eric Schulte 2013-06-06 10:19:23 -06:00
parent 0508d22bac
commit 52b91acc59
1 changed files with 7 additions and 0 deletions

View File

@ -21760,6 +21760,13 @@ Adapted from `every' in cl.el."
(mapc (lambda (e) (unless (funcall pred e) (throw 'org-every nil))) seq)
t))
(defun org-some (pred seq)
"Return true if PREDICATE is true of any element of SEQ.
Adapted from `some' in cl.el."
(catch 'org-some
(mapc (lambda (e) (when (funcall pred e) (throw 'org-some t))) seq)
nil))
(defun org-back-over-empty-lines ()
"Move backwards over whitespace, to the beginning of the first empty line.
Returns the number of empty lines passed."