[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH 4/6] Fix string-collate-lessp shim
From: |
Sebastian Reuße |
Subject: |
[O] [PATCH 4/6] Fix string-collate-lessp shim |
Date: |
Sun, 11 Mar 2018 16:43:50 +0100 |
* org-compat.el (org-string-collate-lessp): When shimming
string-collate-lessp, accept the same arguments as in the unshimmed
case.
---
lisp/org-compat.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 975752224..a22b5f1a6 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -88,10 +88,16 @@ (defvar org-table1-hline-regexp)
(= lastc ?\\))))))
;; `string-collate-lessp' is new in Emacs 25.
-(defalias 'org-string-collate-lessp
- (if (fboundp 'string-collate-lessp)
- 'string-collate-lessp
- 'string-lessp))
+(if (fboundp 'string-collate-lessp)
+ (defalias 'org-string-collate-lessp
+ 'string-collate-lessp)
+ (defun org-string-collate-lessp (s1 s2 &optional locale ignore-case)
+ "Return non-nil if STRING1 is less than STRING2 in lexicographic order.
+
+Case is significant.
+
+LOCALE and IGNORE-CASE are ignored."
+ (string< s1 s2)))
;;; Obsolete aliases (remove them after the next major release).
--
2.16.2
- [O] [PATCH 1/6] Fix alphabetic sorting for tables, plain lists, Sebastian Reuße, 2018/03/11
- [O] [PATCH 2/6] Fix alphabetic string matching operators, Sebastian Reuße, 2018/03/11
- [O] [PATCH 3/6] Fix org-table-sort-lines test, Sebastian Reuße, 2018/03/11
- [O] [PATCH 4/6] Fix string-collate-lessp shim,
Sebastian Reuße <=
- [O] [PATCH 5/6] org-table-sort-lines: Fix case-sensitive sorting, Sebastian Reuße, 2018/03/11
- [O] [PATCH 6/6] Improve ‘org-sort-list’ test, Sebastian Reuße, 2018/03/11
- Re: [O] [PATCH 1/6] Fix alphabetic sorting for tables, plain lists, Nicolas Goaziou, 2018/03/13