Browse Source

Move some string functions to "org-macs.el"

* lisp/org.el (org-string<):
(org-string<=):
(org-string>=):
(org-string>):
(org-string<>): Move to...
* lisp/org-macs.el: ... here.
Nicolas Goaziou 7 years ago
parent
commit
409a62e5c9
2 changed files with 16 additions and 5 deletions
  1. 16 0
      lisp/org-macs.el
  2. 0 5
      lisp/org.el

+ 16 - 0
lisp/org-macs.el

@@ -335,6 +335,22 @@ if it fails."
 
 ;;; String manipulation
 
+(defun org-string< (a b)
+  (org-string-collate-lessp a b))
+
+(defun org-string<= (a b)
+  (or (string= a b) (org-string-collate-lessp a b)))
+
+(defun org-string>= (a b)
+  (not (org-string-collate-lessp a b)))
+
+(defun org-string> (a b)
+  (and (not (string= a b))
+       (not (org-string-collate-lessp a b))))
+
+(defun org-string<> (a b)
+  (not (string= a b)))
+
 (defsubst org-trim (s &optional keep-lead)
   "Remove whitespace at the beginning and the end of string S.
 When optional argument KEEP-LEAD is non-nil, removing blank lines

+ 0 - 5
lisp/org.el

@@ -14054,11 +14054,6 @@ When DOWNCASE is non-nil, expand downcased TAGS."
   (nth (if (eq stringp 'time) 2 (if stringp 1 0)) op))
 
 (defun org<> (a b) (not (= a b)))
-(defun org-string<  (a b) (org-string-collate-lessp a b))
-(defun org-string<= (a b) (or (string= a b) (org-string-collate-lessp a b)))
-(defun org-string>= (a b) (not (org-string-collate-lessp a b)))
-(defun org-string>  (a b) (and (not (string= a b)) (not (org-string-collate-lessp a b))))
-(defun org-string<> (a b) (not (string= a b)))
 (defun org-time=  (a b) (setq a (org-2ft a) b (org-2ft b)) (and (> a 0) (> b 0) (=     a b)))
 (defun org-time<  (a b) (setq a (org-2ft a) b (org-2ft b)) (and (> a 0) (> b 0) (<     a b)))
 (defun org-time<= (a b) (setq a (org-2ft a) b (org-2ft b)) (and (> a 0) (> b 0) (<=    a b)))