diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-10-22 15:23:58 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-10-22 15:23:58 +0200 |
commit | bdb6992813a31fc748b942fa76122cba5e66c13a (patch) | |
tree | 5acacf06091af2fcc31c1434dd5c4be78f09963f | |
parent | 0410d6460c6aef03f74bc214209fa0ee5c2ece76 (diff) | |
download | org-mode-bdb6992813a31fc748b942fa76122cba5e66c13a.tar.gz |
Apply patch to fix registry
Patch by Andreas Burtzlaff
-rw-r--r-- | contrib/ChangeLog | 5 | ||||
-rw-r--r-- | contrib/lisp/org-registry.el | 17 |
2 files changed, 12 insertions, 10 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 8524c9f..a497ca9 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2009-10-22 Carsten Dominik <carsten.dominik@gmail.com> + + * lisp/org-registry.el (org-registry-assoc-all) + (org-registry-find-all): Clean rewrite + 2009-10-19 James TD Smith <ahktenzero@mohorovi.cc> * lisp/org-registry.el (org-registry-assoc-all): Stop this from diff --git a/contrib/lisp/org-registry.el b/contrib/lisp/org-registry.el index 01b2fc8..ad382f0 100644 --- a/contrib/lisp/org-registry.el +++ b/contrib/lisp/org-registry.el @@ -145,19 +145,16 @@ buffer." (defun org-registry-assoc-all (link &optional registry) "Return all associated entries of LINK in the registry." - (let ((reg (copy-list (or org-registry-alist registry))) entry output) - (while (setq entry (assoc link reg)) - (add-to-list 'output entry) - (setq reg (delete entry reg))) - (nreverse output))) + (org-registry-find-all + (lambda (entry) (string= link (car entry))) + registry)) (defun org-registry-find-all (test &optional registry) "Return all entries satisfying `test' in the registry." - (let ((reg (copy-list (or org-registry-alist registry))) entry output) - (while (setq entry (find-if test reg)) - (add-to-list 'output entry) - (setq reg (delete entry reg))) - (nreverse output))) + (delq nil + (mapcar + (lambda (x) (and (funcall test x) x)) + (or registry org-registry-alist)))) ;;;###autoload (defun org-registry-visit () |