changeset 3409:09bba81c038f

(sort-fold-case): New variable. (sort-subr): Bind case-fold-search from sort-fold-case.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Jun 1993 20:35:33 +0000
parents 8ffb00332c5f
children 47b51faf6c4e
files lisp/sort.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/sort.el	Tue Jun 01 20:31:47 1993 +0000
+++ b/lisp/sort.el	Tue Jun 01 20:35:33 1993 +0000
@@ -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 @@
       (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)))