?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/sort.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:31 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/sort.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305%\210\306\307\302\310\304\301\311\312&\207" [custom-declare-group sort nil "Commands to sort text in an Emacs buffer." :group data custom-declare-variable sort-fold-case "Non-nil if the buffer sort functions should ignore case." :type boolean] 8) #@2034 General text sorting routine to divide buffer into records and sort them. 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 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. 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. PREDICATE, if non-nil, is the predicate function for comparing keys; it is called with two arguments, the keys to compare, and should return non-nil if the first key should sort before the second key. If PREDICATE is nil, comparison is done with `<' if the keys are numbers, with `compare-buffer-substrings' if the keys are cons cells (the car and cdr of each cons cell are taken as start and end positions), and with `string<' otherwise. (defalias 'sort-subr #[(reverse nextrecfun endrecfun &optional startkeyfun endkeyfun predicate) "deZ\306V\212\203 \307\310!\210\311 \n\f$\312 ! \203s \n\204+ \237\2033 \307\313!\210\314 \203D \315\316\317BE\202[ @@\247\203O \320\202[ @@:\203Z \321\202[ \322\"\n\203e \237\203m \307\323!\210\324 \"\210+\203| \307\325!\210*\326\207" [messages nextrecfun endrecfun startkeyfun endkeyfun sort-lists 50000 message "Finding sort keys..." sort-build-lists reverse "Sorting records..." sort lambda (a b) ((car a) (car b)) car-less-than-car #[(a b) "\302\303\304@@@A\304 @@ @A&V\207" [a b 0 compare-buffer-substrings nil] 8] #[(a b) "@ @\231\207" [a b] 2] "Reordering buffer..." sort-reorder-buffer "Reordering buffer... Done" nil old sort-fold-case case-fold-search predicate] 6 (#$ . 833)]) (defalias 'sort-build-lists #[(nextrecfun endrecfun startkeyfun endkeyfun) "\306\211\211\211m\204` `\306\300\307\215 \306\204- \f\203$ \f \210\202- \203- \210\310\203R :\203J @\n\232\203J A`\232\203J \211B\202O \n`BBB \204 \203 \210\202 ,\207" [key done start-rec sort-lists endrecfun nextrecfun nil (byte-code "\203 \206 `\n\206 \305 \210 `)B\207" [startkeyfun start endkeyfun endrecfun done t] 2) t] 4]) (defalias 'sort-reorder-buffer #[(sort-lists old) "eedp\306 \307\310!rq\210\311\216\312\n!\210p\203W db\210\313 @A@#\210db\210\313@A@@AA#\210@AA AA\202 db\210\313 \f#\210q\210\314 \fS|\210eb\210\313 !\210\f\211T|.\n\207" [enable-multibyte-characters temp-buffer mb old-buffer max min nil generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) set-buffer-multibyte insert-buffer-substring t last #1# sort-lists old inhibit-quit] 6]) #@279 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). The variable `sort-fold-case' determines whether alphabetic case affects the sort order. (defalias 'sort-lines #[(reverse beg end) "\212\214 }\210eb\210\304\305\306\307#+\207" [beg end inhibit-field-text-motion reverse t sort-subr forward-line end-of-line] 4 (#$ . 4673) "P\nr"]) #@284 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). The variable `sort-fold-case' determines whether alphabetic case affects the sort order. (defalias 'sort-paragraphs #[(reverse beg end) "\212\214 }\210eb\210\303\n\304\305#*\207" [beg end reverse sort-subr #[nil "m?\205 \301!\205 \302y\210\202 \207" [paragraph-separate looking-at 1] 2] forward-paragraph] 4 (#$ . 5152) "P\nr"]) #@279 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). The variable `sort-fold-case' determines whether alphabetic case affects the sort order. (defalias 'sort-pages #[(reverse beg end) "\212\214 }\210eb\210\303\n\304\305#*\207" [beg end reverse sort-subr #[nil "\300\301w\207" ["\n" nil] 2] forward-page] 4 (#$ . 5687) "P\nr"]) (defvar sort-fields-syntax-table nil) (byte-code "\2047 \303 \304 \305W\203 \306 \307\n#\210 T\211\202\n \306\310\311\n#\210\306\312\311\n#\210\306\313\311\n#\210\306\314\315\n#\210\n*\316\317\313\320\321\322\323\324&\207" [sort-fields-syntax-table i table make-syntax-table 0 256 modify-syntax-entry "w" 32 " " 9 10 46 "_" custom-declare-variable sort-numeric-base "The default base used by `sort-numeric-fields'." :group sort :type integer] 9) #@505 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, which may begin with "0x" or "0" for hexadecimal and octal values. Otherwise, the number is interpreted according to sort-numeric-base. 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. (defalias 'sort-numeric-fields #[(field beg end) "\304\305 \n\306\307%)\207" [inhibit-field-text-motion field beg end t sort-fields-1 #[nil "\304!\210\305\306\307!\205' \310\224\203 \310\225b\210\311\202' \312\224\203&