%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/sort.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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\310\311\312DD\313\304\301\314\315&\207" [custom-declare-group sort nil "Commands to sort text in an Emacs buffer." :group data custom-declare-variable sort-fold-case funcall function #[0 "\300\207" [nil] 1] "Non-nil if the buffer sort functions should ignore case." :type boolean] 8)
#@2111 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.

(fn REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN PREDICATE)
(defalias 'sort-subr #[1539 "deZ\302V\212\211\203\303\304!\210\305$\306!\203r\204*\237\262\2032\303\307!\210\310\203B\311\312\313BE\202Y@@\247\203M\314\202Y@@:\203X\315\202Y\316\"\262\203e\237\262\203m\303\317!\210\320\"\210)\266\211\203}\303\321!\210)\210\322\207" [sort-fold-case case-fold-search 50000 message "Finding sort keys..." sort-build-lists reverse "Sorting records..." sort lambda (a b) ((car a) (car b)) car-less-than-car #[514 "\300\301\302@@@A\302@@@A&V\207" [0 compare-buffer-substrings nil] 10 "\n\n(fn A B)"] #[514 "@@\231\207" [] 4 "\n\n(fn A B)"] "Reordering buffer..." sort-reorder-buffer "Reordering buffer... Done" nil] 15 (#$ . 745)])
#@51 

(fn NEXTRECFUN ENDRECFUN STARTKEYFUN ENDKEYFUN)
(defalias 'sort-build-lists #[1028 "\300\211\211\211m\204\204`\262\300\262\3012-\203 \206,`\206%\302\262 \210\211`B\2620\262\300\262\204N\203B \210\202N\203N \210\302\262\211\203t\211:\203k\211@\232\203k\211A`\232\203k\211B\202p\211`BBB\262\204\203 \210\202\207" [nil key t] 11 (#$ . 3576)])
#@23 

(fn SORT-LISTS OLD)
(defalias 'sort-reorder-buffer #[514 "eedp\302\303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216\314!\210p\262\203Xdb\210\315\n@A@#\210db\210\315\n@A@@AA#\210@AA\262A\262	A\262\202 db\210\315#\210q\210\316S|\210eb\210\315!\210\211T|+\262\207" [enable-multibyte-characters inhibit-quit nil generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 set-buffer-multibyte insert-buffer-substring t] 15 (#$ . 3977)])
#@387 Sort lines in region alphabetically; REVERSE non-nil means descending order.
Interactively, REVERSE is the prefix argument, and BEG and END are the region.
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.

(fn REVERSE BEG END)
(defalias 'sort-lines #[771 "\212\214}\210eb\210\301\302\303\304#+\207" [inhibit-field-text-motion t sort-subr forward-line end-of-line] 7 (#$ . 4522) "P\nr"])
#@306 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.

(fn REVERSE BEG END)
(defalias 'sort-paragraphs #[771 "\212\214}\210eb\210\300\301\302#*\207" [sort-subr #[0 "m?\205\301!\205\302y\210\202\207" [paragraph-separate looking-at 1] 2] #[0 "\300 \210m\205n?\205\301c\207" [forward-paragraph "\n"] 1]] 7 (#$ . 5079) "P\nr"])
#@301 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.

(fn REVERSE BEG END)
(defalias 'sort-pages #[771 "\212\214}\210eb\210\300\301\302#*\207" [sort-subr #[0 "\300\301w\207" ["\n" nil] 2] forward-page] 7 (#$ . 5653) "P\nr"])
(defvar sort-fields-syntax-table nil)
(byte-code "\2046\301 \302\211\303W\203\304\305#\210\211T\262\202\304\306\307#\210\304\310\307#\210\304\311\307#\210\304\312\313#\210\266\314\315\316\317\320DD\321\322\323\324\325&\207" [sort-fields-syntax-table make-syntax-table 0 256 modify-syntax-entry "w" 32 " " 9 10 46 "_" custom-declare-variable sort-numeric-base funcall function #[0 "\300\207" [10] 1] "The default base used by `sort-numeric-fields'." :group sort :type integer] 8)
#@525 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.

(fn FIELD BEG END)
(defalias 'sort-numeric-fields #[771 "\301\302\303\304\305\306\307!\310\"\311$\312%)\207" [inhibit-field-text-motion t sort-fields-1 make-byte-code 0 "\303\300!\210\304\305\306!\205'\307\224\203\307\225b\210\310\202'\311\224\203&\311\225b\210\312\202'\313\314`\212\315\307!\210`){\2066\n\")\207" vconcat vector [case-fold-search sort-numeric-base sort-skip-fields t looking-at "\\(0x\\)[0-9a-f]\\|\\(0\\)[0-7]" 1 16 2 8 nil string-to-number forward-sexp] 5 nil] 13 (#$ . 6609) "p\nr"])
#@418 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.
The variable `sort-fold-case' determines whether alphabetic case affects
the sort order.

(fn FIELD BEG END)
(defalias 'sort-fields #[771 "\301\302\303\304\305\306\307!\310\"\311$\312%)\207" [inhibit-field-text-motion t sort-fields-1 make-byte-code 0 "\301\300!\210\302\207" vconcat vector [sort-skip-fields nil] 2 #[0 "\300\301w\207" ["^ 	\n" nil] 2]] 13 (#$ . 7641) "p\nr"])
#@44 

(fn FIELD BEG END STARTKEYFUN ENDKEYFUN)
(defalias 'sort-fields-1 #[1285 "\301 \302U\203\303\262\304\302\305\306\307!\310\"\311$\216\212\214}\210eb\210\312!\210\313\314\315\316%+\207" [sort-fields-syntax-table syntax-table 0 1 make-byte-code "\301\300!\207" vconcat vector [set-syntax-table] 2 set-syntax-table sort-subr nil forward-line end-of-line] 12 (#$ . 8338)])
#@10 

(fn N)
(defalias 'sort-skip-fields #[257 "\211\300V\203.\211S\211\300V\203\301\302w\210\303\302w\210\211S\262\202\301\302w\210l\205-\304\305\306 \307 {\"\207\302\210\211[S\211\300V\203I\301\302x\210\303\302x\210\211S\262\2024\301\302x\266n\203[\304\305\306 \307 {\"\210\303\302x\207" [0 " 	" nil "^ 	\n" error "Line has too few fields: %s" line-beginning-position line-end-position] 6 (#$ . 8726)])
(defalias 'sort-regexp-fields-next-record #[0 "`\302\303\304#\205-\305\225\211\205-	U\203&\306u\210\302\303\304#\210\305\225\211\202'\307\205-\305\224b\207" [sort-regexp-fields-regexp sort-regexp-record-end re-search-forward nil move 0 1 t] 5])
#@1035 Sort the text in the region lexicographically.
If called interactively, prompt for two regular expressions,
RECORD-REGEXP and KEY-REGEXP.

RECORD-REGEXP specifies the textual units to be sorted.
  For example, to sort lines, RECORD-REGEXP would be "^.*$".

KEY-REGEXP specifies the part of each record (i.e. each match for
  RECORD-REGEXP) to be used for sorting.
  If it is "\\digit", use the digit'th "\\(...\\)"
  match field specified by RECORD-REGEXP.
  If it is "\\&", use the whole record.
  Otherwise, KEY-REGEXP should be a regular expression with which
  to search within the record.  If a match for KEY-REGEXP is not
  found within a record, that record is ignored.

With a negative prefix arg, sort 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*\\>"

(fn REVERSE RECORD-REGEXP KEY-REGEXP BEG END)
(defalias 'sort-regexp-fields #[1285 "C\211\242\302\232\204\211\242\303\232\203\211\304\240\210\202(\305\306\242\"\203(\211\242\307H\310Z\240\210\212\214}\210eb\210\311\312\311\313#\210`\304\224b\210\314\315\316\317\304\320\321\322	!\323\"\324$$,\207" [sort-regexp-fields-regexp sort-regexp-record-end "" "\\&" 0 string-match "\\`\\\\[1-9]\\'" 1 48 nil re-search-forward t sort-subr sort-regexp-fields-next-record #[0 "b\207" [sort-regexp-record-end] 1] make-byte-code "\302\300\242\247\203\300\242\262\202\"\303\300\242	\304#\203\302\262\202\"\305\306\307\"\210\3101/\211\224\225B0\2024\210\305\306\307\"\207" vconcat vector [sort-regexp-record-end 0 re-search-forward t throw key nil (error)] 5] 16 (#$ . 9403) "P\nsRegexp specifying records to sort: \nsRegexp specifying key within record: \nr"])
(defvar sort-columns-subprocess t)
#@751 Sort lines in region alphabetically by a certain range of columns.
For the purpose of this command, the region BEG...END 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.
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
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.

(fn REVERSE &optional BEG END)
(defalias 'sort-columns #[769 "\212\303\304\211\211\211\211C\304C^b\210i\262\305 \210`\262]b\210i\262\304y\210`\262^\240\210\211]\240\210\306\307\303#\203F\310\311!\210	\312=\204\312\304\211\3132\225W\205\224\314!\262\315\316\"\262:\203\211@\316=\204\201@\317=\203|\211\204\201\320\313\303\"\210AA\262\202e\321\304\n#\262\202S0\266\203\204\312	\203\243\322\202\244\323\324\325\242T\242T#D\n\203\267\326B\262\327\330\331\303\211\304&\262\202\362\212\214}\210b\210\332\n\333\334\335\336\337\340\341\n!\342\"\343$\335\336\337\340\341\n!\344\"\343$%*)\266\207)\207" [inhibit-field-text-motion system-type sort-fold-case t nil beginning-of-line search-backward "	" error "sort-columns does not work with tabs -- use M-x untabify" windows-nt found text-properties-at plist-get fontified face throw next-property-change "-rt	" "-t	" format "-k1.%d,1.%d" "-f" apply call-process-region "sort" sort-subr forward-line end-of-line make-byte-code 0 "\301\300\242!\210\302\207" vconcat vector [move-to-column nil] 2 [move-to-column nil]] 21 (#$ . 11310) "P\nr"])
#@339 Reverse the order of lines in a region.
When called from Lisp, takes two point or marker arguments, BEG and END.
If BEG is not at the beginning of a line, the first line of those
to be reversed is the line starting after BEG.
If END is not at the end of a line, the last line to be reversed
is the one that ends before END.

(fn BEG END)
(defalias 'reverse-region #[514 "V\203\300\262\262\262\212b\210n\204\301y\210`\262\211b\210l\203(n\203.\302y\210\300\210\303 \262\211X\203<\304\305!\210\300\306\211\203eb\210`\300\210`{B\262`U?\262\203_`T\202``|\210\202>A\203w@\307\261\210A\262\202e@c\266\202)\207" [nil 1 -1 point-marker user-error "There are no full lines in the region" t "\n"] 6 (#$ . 13189) "r"])
#@894 Delete all but one copy of any identical lines in the region.
Non-interactively, arguments BEG and END delimit the region.
Normally it searches forwards, keeping the first instance of
each identical line.  If REVERSE is non-nil (interactively, with
a C-u prefix), it searches backwards and keeps the last instance of
each repeated line.

Identical lines need not be adjacent, unless the argument
ADJACENT is non-nil (interactively, with a C-u C-u prefix).
This is a more efficient mode of operation, and may be useful
on large regions that have already been sorted.

If the argument KEEP-BLANKS is non-nil (interactively, with a
C-u C-u C-u prefix), it retains repeated blank lines.

Returns the number of deleted lines.  Interactively, or if INTERACTIVE
is non-nil, it also prints a message describing the number of deletions.

(fn BEG END &optional REVERSE ADJACENT KEEP-BLANKS INTERACTIVE)
(defalias 'delete-duplicate-lines #[1538 "?\205	\300\301\302\"\303\211\211\304\305!\305!\212\n\203\211\202 b\210\n\203.n\203.\306u\210\n\2038?\202@`W\203\271m?\203\271\n\205O`X\206Oo\262\307\310 \311 \"\262\203j\312\230\203j\313y\210\202.	\203u\232\202{\314\"\203\227\304y\210`\313y\210`|\210\n\203\220\306y\210T\262\202.	\203\242\262\202\252\315\316	#\210\n\203\263\306\202\264\313y\210\202.)\303\211\223\210\211\303\211\223\210\203\356\317\320\f\203\325\321\202\326\312\313U\203\341\312\202\342\322\203\353\323\202\354\312%\210\207" [make-hash-table :test equal nil 0 copy-marker -1 buffer-substring-no-properties line-beginning-position line-end-position "" 1 gethash puthash t message "Deleted %d %sduplicate line%s%s" "adjacent " "s" " backward"] 19 (#$ . 13942) (byte-code "\301 \210\302 \303 \304\232\305\232\306\232\307\257\207" [current-prefix-arg barf-if-buffer-read-only region-beginning region-end (4) (16) (64) t] 6)])
(provide 'sort)

Zerion Mini Shell 1.0