emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastian Reuße" <seb@wirrsal.net>
To: emacs-orgmode@gnu.org
Cc: "Sebastian Reuße" <seb@wirrsal.net>
Subject: [PATCH 4/6] Fix string-collate-lessp shim
Date: Sun, 11 Mar 2018 16:43:50 +0100	[thread overview]
Message-ID: <20180311154352.16920-4-seb@wirrsal.net> (raw)
In-Reply-To: <20180311154352.16920-1-seb@wirrsal.net>

* 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)))
 
 \f
 ;;; Obsolete aliases (remove them after the next major release).
-- 
2.16.2

  parent reply	other threads:[~2018-03-11 15:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11 15:43 [PATCH 1/6] Fix alphabetic sorting for tables, plain lists Sebastian Reuße
2018-03-11 15:43 ` [PATCH 2/6] Fix alphabetic string matching operators Sebastian Reuße
2018-03-11 16:09   ` [PATCH] " Sebastian Reuße
2018-03-13  8:13     ` Nicolas Goaziou
2018-03-11 16:11   ` [PATCH 2/6] " Sebastian Reuße
2018-03-11 15:43 ` [PATCH 3/6] Fix org-table-sort-lines test Sebastian Reuße
2018-03-13  8:13   ` Nicolas Goaziou
2018-03-11 15:43 ` Sebastian Reuße [this message]
2018-03-13  8:12   ` [PATCH 4/6] Fix string-collate-lessp shim Nicolas Goaziou
2018-03-11 15:43 ` [PATCH 5/6] org-table-sort-lines: Fix case-sensitive sorting Sebastian Reuße
2018-03-13  8:13   ` Nicolas Goaziou
2018-03-11 15:43 ` [PATCH 6/6] Improve ‘org-sort-list’ test Sebastian Reuße
2018-03-13  8:13   ` Nicolas Goaziou
2018-03-13  8:12 ` [PATCH 1/6] Fix alphabetic sorting for tables, plain lists Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180311154352.16920-4-seb@wirrsal.net \
    --to=seb@wirrsal.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).