diff options
| author | Richard M. Stallman | 1993-06-01 20:35:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-01 20:35:33 +0000 |
| commit | faf603f3a31f016be3ff8876dee60e63ca4c9a15 (patch) | |
| tree | a7faf8a810e9f1b03e046a389b165c0e1fff417d | |
| parent | b553cffa92d236b75bbc08b6c268758138a6f268 (diff) | |
| download | emacs-faf603f3a31f016be3ff8876dee60e63ca4c9a15.tar.gz emacs-faf603f3a31f016be3ff8876dee60e63ca4c9a15.zip | |
(sort-fold-case): New variable.
(sort-subr): Bind case-fold-search from sort-fold-case.
| -rw-r--r-- | lisp/sort.el | 6 |
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 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (defvar sort-fold-case nil | ||
| 33 | "*Non-nil if the buffer sort functions should ignore case.") | ||
| 34 | |||
| 32 | (defun sort-subr (reverse nextrecfun endrecfun &optional startkeyfun endkeyfun) | 35 | (defun sort-subr (reverse nextrecfun endrecfun &optional startkeyfun endkeyfun) |
| 33 | "General text sorting routine to divide buffer into records and sort them. | 36 | "General text sorting routine to divide buffer into records and sort them. |
| 34 | Arguments are REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN. | 37 | Arguments are REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN. |
| @@ -69,7 +72,8 @@ same as ENDRECFUN." | |||
| 69 | (if messages (message "Finding sort keys...")) | 72 | (if messages (message "Finding sort keys...")) |
| 70 | (let* ((sort-lists (sort-build-lists nextrecfun endrecfun | 73 | (let* ((sort-lists (sort-build-lists nextrecfun endrecfun |
| 71 | startkeyfun endkeyfun)) | 74 | startkeyfun endkeyfun)) |
| 72 | (old (reverse sort-lists))) | 75 | (old (reverse sort-lists)) |
| 76 | (case-fold-search sort-fold-case)) | ||
| 73 | (if (null sort-lists) | 77 | (if (null sort-lists) |
| 74 | () | 78 | () |
| 75 | (or reverse (setq sort-lists (nreverse sort-lists))) | 79 | (or reverse (setq sort-lists (nreverse sort-lists))) |