فهرست منبع

Move `org-match-any-p' in "org-macs.el"

* lisp/org-macs.el (org-match-any-p): Moved from "org.el".
* lisp/org.el (org-match-any-p): Removed.
Nicolas Goaziou 7 سال پیش
والد
کامیت
8ecc4c4365
2فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 4 0
      lisp/org-macs.el
  2. 0 5
      lisp/org.el

+ 4 - 0
lisp/org-macs.el

@@ -592,6 +592,10 @@ ones and overrule settings in the other lists."
     (beginning-of-line)
     (looking-at regexp)))
 
+(defun org-match-any-p (re list)
+  "Non nil if regexp RE matches an element in LIST."
+  (cl-some (lambda (x) (string-match-p re x)) list))
+
 (defun org-in-regexp (regexp &optional nlines visually)
   "Check if point is inside a match of REGEXP.
 

+ 0 - 5
lisp/org.el

@@ -14074,11 +14074,6 @@ epoch to the beginning of today (00:00)."
 			  ("m" . 2678400.0) ("y" . 31557600.0)))))))
      (t (org-2ft s)))))
 
-(defun org-match-any-p (re list)
-  "Does re match any element of list?"
-  (setq list (mapcar (lambda (x) (string-match re x)) list))
-  (delq nil list))
-
 (defvar org-add-colon-after-tag-completion nil)  ;; dynamically scoped param
 (defvar org-tags-overlay (make-overlay 1 1))
 (delete-overlay org-tags-overlay)