;;; compiled by eric@geech.gnu.ai.mit.edu on Sat Mar 27 15:39:19 1993
;;; from file /gd/gnu/emacs/19.0/lisp/sort.el
;;; emacs version 19.0.509.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(fset 'sort-subr #[(reverse nextrecfun endrecfun &optional startkeyfun endkeyfun) "deZÀVŠ	ƒ ÂÃ!ˆÄ$	Ê	!	ƒ™ \n„0 Ì	!		ƒ8 ÂÍ!ˆÎÏ!ƒ_ Ï	Ð	@@!ƒN Ñ‚[ 	@@:ƒZ Ò‚[ Ó\"‚} Ô	Ð	@@!ƒo Õ‚| 	@@:ƒ{ Ö‚| ×\"	\nƒŠ Ì	!		ƒ’ ÂØ!ˆÙ	\"ˆ*	ƒ¢ ÂÚ!ˆ*Û‡" [50000 messages message "Finding sort keys..." sort-build-lists nextrecfun endrecfun startkeyfun endkeyfun sort-lists reverse old nreverse "Sorting records..." fboundp sortcar numberp < #[(a b) "ÀÁÂ@AÂ@A&V‡" [0 compare-buffer-substrings nil a b] 8] string< sort #[(a b) "@	@W‡" [a b] 2] #[(a b) "ÀÁÂ@@@AÂ@@@A&V‡" [0 compare-buffer-substrings nil a b] 8] #[(a b) "À	@\n@\"‡" [string< a b] 3] "Reordering buffer..." sort-reorder-buffer "Reordering buffer... Done" nil] 5 "\
General text sorting routine to divide buffer into records and sort them.
Arguments are REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN.

We divide the accessible portion of the buffer into disjoint pieces
called sort records.  A portion of each sort record (perhaps all of
it) is designated as the sort key.  The records are rearranged in the
buffer in order by their sort keys.  The records may or may not be
contiguous.

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 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.

NEXTRECFUN is called with point at the end of the previous record.
It moves point to the start of the next record.
It should move point to the end of the buffer if there are no more records.
The first record is assumed to start at the position of point when sort-subr
is called.

ENDRECFUN is called with point within the record.
It should move point to the end of the record.

STARTKEYFUN moves from the start of the record to the start of the key.
It may return either a non-nil value to be used as the key, or
else the key is the substring between the values of point after
STARTKEYFUN and ENDKEYFUN are called.  If STARTKEYFUN is nil, the key
starts at the beginning of the record.

ENDKEYFUN moves from the start of the sort key to the end of the sort key.
ENDKEYFUN may be nil if STARTKEYFUN returns a value or if it would be the
same as ENDRECFUN."])
(byte-code "ÀÁMˆÂÃM‡" [sort-build-lists #[(nextrecfun endrecfun startkeyfun endkeyfun) "À‰‰‰m„h `ÀÁÅ\nÀ„1 ƒ&  ˆ‚1 ƒ1  ˆÈ	ƒX 	:ƒP É	@\"ƒP É	A`\"ƒP 	‰B‚U 	`BBB\n„ ƒ  ˆ‚ ,‡" [nil key done start-rec sort-lists (byte-code "ƒ	  † `\n† Ä ˆ	`)B‡" [startkeyfun start endkeyfun endrecfun t done] 2) endrecfun nextrecfun t equal] 4] sort-reorder-buffer #[(sort-lists old) "ÀeeddbˆÅÆ!ˆÇ\ndS\"ˆƒK dbˆÉp\n@A@#ˆdbˆÉp@A@@AA#ˆ\n@AAA\nA\n‚ dbˆÉp	#ˆË\n	\"ˆdbˆÇ\n`T\"ˆË``T\",‡" [t max min last inhibit-quit insert-before-markers " " narrow-to-region sort-lists insert-buffer-substring old delete-region] 4]] 2)
(fset 'sort-lines #[(reverse beg end) "ŠŒÀ	\n\"ˆebˆÃÅÆ#*‡" [narrow-to-region beg end sort-subr reverse forward-line end-of-line] 4 "\
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)." "P\nr"])
(fset 'sort-paragraphs #[(reverse beg end) "ŠŒÀ	\n\"ˆebˆÃÅÆ#*‡" [narrow-to-region beg end sort-subr reverse #[nil "ÀÁ!‡" [skip-chars-forward "\n 	"] 2] forward-paragraph] 4 "\
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)." "P\nr"])
(fset 'sort-pages #[(reverse beg end) "ŠŒÀ	\n\"ˆebˆÃÅÆ#*‡" [narrow-to-region beg end sort-subr reverse #[nil "ÀÁ!‡" [skip-chars-forward "\n"] 2] forward-page] 4 "\
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)." "P\nr"])
(byte-code "ÀÁ!„ Â	„F Ã ÄÇWƒ& ÈÉ#ˆT‰‚ ÈÊË#ˆÈÌË#ˆÈÍË#ˆÈÎÏ#ˆ*Â‡" [boundp sort-fields-syntax-table nil make-syntax-table 0 i table 256 modify-syntax-entry "w" 32 " " 9 10 46 "_"] 5)
(fset 'sort-numeric-fields #[(field beg end) "À	\nÄÅ%‡" [sort-fields-1 field beg end #[nil "À	S!ˆÂÃ`ŠÄÅ!ˆ`)\"!‡" [sort-skip-fields field string-to-number buffer-substring forward-sexp 1] 5] nil] 6 "\
Sort lines in region numerically by the ARGth field of each line.
Fields are separated by whitespace and numbered from 1 up.
Specified field must contain a number in each line of the region.
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.
If you want to sort floating-point numbers, try `sort-float-fields'." "p\nr"])
(fset 'sort-float-fields #[(field beg end) "À	\nÄÅ%‡" [sort-fields-1 field beg end #[nil "À	S!ˆÂÃ`ŠÄÅ!ˆ`)\"!‡" [sort-skip-fields field string-to-number buffer-substring re-search-forward "[+-]?[0-9]*.?[0-9]*\\([eE][+-]?[0-9]+\\)?"] 5] nil] 6 "\
Sort lines in region numerically by the ARGth field of each line.
Fields are separated by whitespace and numbered from 1 up.  Specified field
must contain a floating point number in each line of the region.  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." "p\nr"])
(fset 'sort-fields #[(field beg end) "À	\nÄÅ%‡" [sort-fields-1 field beg end #[nil "À	S!ˆÂ‡" [sort-skip-fields field nil] 2] #[nil "ÀÁ!‡" [skip-chars-forward "^ 	\n"] 2]] 6 "\
Sort lines in region lexicographically by the ARGth field of each line.
Fields are separated by whitespace and numbered from 1 up.
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." "p\nr"])
(byte-code "ÀÁMˆÂÃM‡" [sort-fields-1 #[(field beg end startkeyfun endkeyfun) "À \nÃUƒ ÄÅŽŠŒÆ\"ˆebˆÉ\n!ˆËÌÍÎ%,‡" [syntax-table tbl field 0 1 ((set-syntax-table tbl)) narrow-to-region beg end set-syntax-table sort-fields-syntax-table sort-subr nil forward-line end-of-line startkeyfun endkeyfun] 6] sort-skip-fields #[(n) "`ŠÀÁ!ˆ`)ÅVƒ Æ!ˆ‚ À ˆÆT!ˆ`\nYƒ+ ÅV„7 `Wƒ? ÅWƒ? ÇÈÉ\n\"\"ˆÊË!*‡" [end-of-line 1 eol bol n 0 forward-word error "Line has too few fields: %s" buffer-substring skip-chars-forward " 	"] 5]] 2)
(fset 'sort-regexp-fields #[(reverse record-regexp key-regexp beg end) "À	Â\"„ À	Ã\"ƒ Ä‚  ÅÆ	\"ƒ  	ÇHÈZŠŒÉ\n\"ˆebˆÌÎ!ˆ`ÐÄ!bˆÑÓÔÕ$+‡" [equal key-regexp "" "\\&" 0 string-match "\\`\\\\[1-9]\\'" 1 48 narrow-to-region beg end nil sort-regexp-record-end re-search-forward record-regexp match-beginning sort-subr reverse #[nil "À	ÂÃ#… ÄÅ!‰… ÇÅ!b‡" [re-search-forward record-regexp nil move match-end 0 sort-regexp-record-end match-beginning] 4] #[nil "b‡" [sort-regexp-record-end] 1] #[nil "ÀÂ!ƒ ‚ ÄÆ#ƒ À‚ ÇÈÉ\"ˆÉÊË)‡" [0 n numberp key-regexp re-search-forward sort-regexp-record-end t throw key nil (byte-code "ÀÁ!ƒ Â!Ä!B‡ÅÂ!Ä!\"‡" [fboundp buffer-substring-lessp match-beginning n match-end buffer-substring] 4) ((error (byte-code "ÀÁÂ\"‡" [throw key nil] 3)))] 4]] 5 "\
Sort the region lexicographically as specifed by RECORD-REGEXP and KEY.
RECORD-REGEXP specifies the textual units which should be sorted.
  For example, to sort lines RECORD-REGEXP would be \"^.*$\"
KEY specifies the part of each record (ie each match for RECORD-REGEXP)
  is to be used for sorting.
  If it is \"\\digit\" then the digit'th \"\\(...\\)\" match field from
  RECORD-REGEXP is used.
  If it is \"\\&\" then the whole record is used.
  Otherwise, it is a regular-expression for which to search within the record.
If a match for KEY is not found within a record then that record is ignored.

With a negative prefix arg sorts in reverse 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*\\>\"" "P\nsRegexp specifying records to sort: \nsRegexp specifying key within record: \nr"])
(byte-code "ÀÁ!„ ÂÀ‡" [boundp sort-columns-subprocess t] 2)
(fset 'sort-columns #[(reverse &optional beg end) "ŠÀ‰‰‰‰‰^bˆiÉÊ!ˆ`]bˆiÉ ˆ`^]ËÌÍ#ƒA ÎÏ!ˆÑ=„e ÒÓÍ‰ÀƒY Õ‚Z Ö×\nPØ	P&	‚z ŠŒÙ\"ˆbˆÚÉÛÜÝ%*.‡" [nil col-end col-start col-end1 col-beg1 end1 beg1 beg end forward-line 0 search-backward "	" t error "sort-columns does not work with tabs.  Use M-x untabify." system-type vax-vms call-process-region "sort" reverse "-rt\n" "-t\n" "+0." "-0." narrow-to-region sort-subr end-of-line #[nil "À	!ˆÂ‡" [move-to-column col-start nil] 2] #[nil "À	!ˆÂ‡" [move-to-column col-end nil] 2]] 11 "\
Sort lines in region alphabetically by a certain range of columns.
For the purpose of this command, the region includes
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.

Note that `sort-columns' rejects text that contains tabs,
because tabs could be split across the specified columns
and it doesn't know how to handle that.  Also, when possible,
it uses the `sort' utility program, which doesn't understand tabs.
Use \\[untabify] to convert tabs to spaces before sorting." "P\nr"])
(fset 'reverse-region #[(beg end) "	Vƒ Â	)Šbˆn„ ÄÅ!ˆ`	bˆlƒ( nƒ/ ÄÆ!ˆÇ ˆÈ ÂÉ\n\nƒd bˆÌ`Ç ˆ`\"B`	U?\nÍ\nƒ^ `T‚_ `\"ˆ‚8 Aƒ{ @cˆÎcˆA‰‚f @c+‡" [beg end nil mid forward-line 1 -1 end-of-line point-marker t do ll buffer-substring delete-region "\n"] 4 "\
Reverse the order of lines in a region.
From a program takes two point or marker arguments, BEG and END." "r"])
(provide (quote sort))
