summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-13 09:26:53 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-13 09:26:53 +0100
commit409a62e5c93e78b250146c6accd5c5c3cd07fcdb (patch)
tree6623e1f2fe2dac9956882372527ec5c6ded71335
parent4b19029a72ebd22002be33f29a4168e61fc1ec6f (diff)
downloadorg-mode-409a62e5c93e78b250146c6accd5c5c3cd07fcdb.tar.gz
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.
-rw-r--r--lisp/org-macs.el16
-rw-r--r--lisp/org.el5
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index f919dad..d4531c2 100644
--- a/lisp/org-macs.el
+++ b/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
diff --git a/lisp/org.el b/lisp/org.el
index 24923ad..76bc60c 100644
--- a/lisp/org.el
+++ b/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)))