Mercurial > hg > xemacs-beta
diff lisp/prim/sort.el @ 10:49a24b4fd526 r19-15b6
Import from CVS: tag r19-15b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:47:52 +0200 |
parents | b82b59fe008d |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/lisp/prim/sort.el Mon Aug 13 08:47:36 2007 +0200 +++ b/lisp/prim/sort.el Mon Aug 13 08:47:52 2007 +0200 @@ -48,6 +48,8 @@ Usually the records are rearranged in order of ascending sort key. If REVERSE is non-nil, they are rearranged in order of descending sort key. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. The next four arguments are functions to be called to move point across a sort record. They will be called many times from within sort-subr. @@ -194,7 +196,9 @@ (defun sort-lines (reverse beg end) "Sort lines in region alphabetically; argument means descending order. Called from a program, there are three arguments: -REVERSE (non-nil means reverse order), BEG and END (region to sort)." +REVERSE (non-nil means reverse order), BEG and END (region to sort). +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order." (interactive "P\nr") (save-excursion (save-restriction @@ -206,7 +210,9 @@ (defun sort-paragraphs (reverse beg end) "Sort paragraphs in region alphabetically; argument means descending order. Called from a program, there are three arguments: -REVERSE (non-nil means reverse order), BEG and END (region to sort)." +REVERSE (non-nil means reverse order), BEG and END (region to sort). +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order." (interactive "P\nr") (save-excursion (save-restriction @@ -223,7 +229,9 @@ (defun sort-pages (reverse beg end) "Sort pages in region alphabetically; argument means descending order. Called from a program, there are three arguments: -REVERSE (non-nil means reverse order), BEG and END (region to sort)." +REVERSE (non-nil means reverse order), BEG and END (region to sort). +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order." (interactive "P\nr") (save-excursion (save-restriction @@ -254,6 +262,8 @@ With a negative arg, sorts by the ARGth field counted from the right. Called from a program, there are three arguments: FIELD, BEG and END. BEG and END specify region to sort. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. If you want to sort floating-point numbers, try `sort-float-fields'." (interactive "p\nr") (sort-fields-1 field beg end @@ -386,6 +396,9 @@ With a negative prefix arg sorts in reverse order. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + For example: to sort lines in the region by the first word on each line starting with the letter \"f\", RECORD-REGEXP would be \"^.*$\" and KEY would be \"\\\\=\\<f\\\\w*\\\\>\"" @@ -420,7 +433,7 @@ (setq n 0)) (t (throw 'key nil))) (condition-case () - (if (fboundp 'buffer-substring-lessp) + (if (fboundp 'compare-buffer-substrings) (cons (match-beginning n) (match-end n)) (buffer-substring (match-beginning n) @@ -438,6 +451,8 @@ the entire line that point is in and the entire line the mark is in. The column positions of point and mark bound the range of columns to sort on. A prefix argument means sort into reverse order. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. Note that `sort-columns' rejects text that contains tabs, because tabs could be split across the specified columns