summaryrefslogtreecommitdiff
path: root/lisp/sort.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-06-01 20:35:33 +0000
committerRichard M. Stallman <rms@gnu.org>1993-06-01 20:35:33 +0000
commita2b3b3e8dbf1889c51bcff45879ff722be1eb58a (patch)
tree883db9990243048c0b59daa58f208f9e50bcca9a /lisp/sort.el
parent10abb617d84b4fc6af7dd8dd49b106e966c37029 (diff)
downloademacs-a2b3b3e8dbf1889c51bcff45879ff722be1eb58a.tar.gz
(sort-fold-case): New variable.
(sort-subr): Bind case-fold-search from sort-fold-case.
Diffstat (limited to 'lisp/sort.el')
-rw-r--r--lisp/sort.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/sort.el b/lisp/sort.el
index 0ee90121ae0..93c8f2171be 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -29,6 +29,9 @@
;;; Code:
+(defvar sort-fold-case nil
+ "*Non-nil if the buffer sort functions should ignore case.")
+
(defun sort-subr (reverse nextrecfun endrecfun &optional startkeyfun endkeyfun)
"General text sorting routine to divide buffer into records and sort them.
Arguments are REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN.
@@ -69,7 +72,8 @@ same as ENDRECFUN."
(if messages (message "Finding sort keys..."))
(let* ((sort-lists (sort-build-lists nextrecfun endrecfun
startkeyfun endkeyfun))
- (old (reverse sort-lists)))
+ (old (reverse sort-lists))
+ (case-fold-search sort-fold-case))
(if (null sort-lists)
()
(or reverse (setq sort-lists (nreverse sort-lists)))