forked from mirrors/org-mode
Remove dependency on cl-seq.el
This commit is contained in:
parent
4b475bcd11
commit
ada4127536
|
@ -1,3 +1,8 @@
|
|||
2010-04-12 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-remove-if, org-remove-if-not): New functions.
|
||||
(org-open-file): Use internal remove-if functions.
|
||||
|
||||
2010-04-10 Jan Böcker <jan.boecker@jboecker.de>
|
||||
|
||||
* org.el (org-file-apps-entry-match-against-dlink-p): new function.
|
||||
|
|
22
lisp/org.el
22
lisp/org.el
|
@ -9142,8 +9142,10 @@ If the file does not exist, an error is thrown."
|
|||
buffer-file-name
|
||||
(substitute-in-file-name (expand-file-name path))))
|
||||
(file-apps (append org-file-apps (org-default-apps)))
|
||||
(apps (remove-if 'org-file-apps-entry-match-against-dlink-p file-apps))
|
||||
(apps-dlink (remove-if-not 'org-file-apps-entry-match-against-dlink-p file-apps))
|
||||
(apps (org-remove-if
|
||||
'org-file-apps-entry-match-against-dlink-p file-apps))
|
||||
(apps-dlink (org-remove-if-not
|
||||
'org-file-apps-entry-match-against-dlink-p file-apps))
|
||||
(remp (and (assq 'remote apps) (org-file-remote-p file)))
|
||||
(dirp (if remp nil (file-directory-p file)))
|
||||
(file (if (and dirp org-open-directory-means-index-dot-org)
|
||||
|
@ -17423,6 +17425,22 @@ for the search purpose."
|
|||
(setq list (delete (pop elts) list)))
|
||||
list)
|
||||
|
||||
(defun org-remove-if (predicate seq)
|
||||
"Remove everything from SEQ that fulfills PREDICATE."
|
||||
(let (res e)
|
||||
(while seq
|
||||
(setq e (pop seq))
|
||||
(if (not (funcall predicate e)) (push e res)))
|
||||
(nreverse res)))
|
||||
|
||||
(defun org-remove-if-not (predicate seq)
|
||||
"Remove everything from SEQ that does not fulfill PREDICATE."
|
||||
(let (res e)
|
||||
(while seq
|
||||
(setq e (pop seq))
|
||||
(if (funcall predicate e) (push e res)))
|
||||
(nreverse res)))
|
||||
|
||||
(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."
|
||||
|
|
Loading…
Reference in New Issue