%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/emacs-lisp/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/emacs-lisp/map.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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'seq)
#@540 Build a `pcase' pattern matching map elements.

ARGS is a list of elements to be matched in the map.

Each element of ARGS can be of the form (KEY PAT), in which case KEY is
evaluated and searched for in the map.  The match fails if for any KEY
found in the map, the corresponding PAT doesn't match the value
associated to the KEY.

Each element can also be a SYMBOL, which is an abbreviation of a (KEY
PAT) tuple of the form (\='SYMBOL SYMBOL).

Keys in ARGS not found in the map are ignored, and the match doesn't
fail.

(fn &rest ARGS)
(defalias 'map--pcase-macroexpander #[128 "\300\301\302!BB\207" [and (pred mapp) map--make-pcase-bindings] 5 (#$ . 424)])
(byte-code "\300\301\302\303#\300\304\305\301#\303\207" [define-symbol-prop map--pcase-macroexpander edebug-form-spec nil map pcase-macroexpander] 5)
#@330 Bind the variables in KEYS to the elements of MAP then evaluate BODY.

KEYS can be a list of symbols, in which case each element will be
bound to the looked up value in MAP.

KEYS can also be a list of (KEY VARNAME) pairs, in which case
KEY is an unquoted form.

MAP can be a list, hash-table or array.

(fn KEYS MAP &rest BODY)
(defalias 'map-let '(macro . #[642 "\300\301!DCBB\207" [pcase-let map--make-pcase-patterns] 6 (#$ . 1243)]))
(byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\"\207" [function-put map-let lisp-indent-function 2 put edebug-form-spec ((&rest &or symbolp ([form symbolp])) form body) define-error map-not-inplace "Cannot modify map in-place"] 5)
#@13 

(fn LIST)
(defalias 'map--plist-p #[257 "\211:\205	\211@<?\207" [] 2 (#$ . 1937)])
(byte-code "\300\301\302\303#\210\304\305\306\305\307\310#\311#\210\312\305\310\307\310\313%\210\314\305\315\316#\317\305\320\321#\207" [put map--plist-p byte-optimizer byte-compile-inline-expand defalias map-elt cl-generic-define (map key &optional default testfn) nil "Lookup KEY in MAP and return its associated value.\nIf KEY is not found, return DEFAULT which defaults to nil.\n\nTESTFN is deprecated.  Its default depends on the MAP argument.\n\nIn the base definition, MAP can be an alist, hash-table, or array.\n\n(fn MAP KEY &optional DEFAULT TESTFN)" cl-generic-define-method #[1026 "<\2035\211:\205\211@<?\262\203-\300\"\203+\211\204+\301\"\204+\202,\211\207\302\303%\207\304!\203A\305#\207\306!\203\\\307Y\203Z\310!W\203Z\311\"\207\207\312\313\314!#\207" [plist-get plist-member alist-get nil hash-table-p gethash arrayp 0 seq-length seq-elt error "Unsupported map type `%S': %S" type-of] 10 "\n\n(fn MAP KEY &optional DEFAULT TESTFN)"] function-put gv-expander #[1283 "\300\301D\302\303\304\305\306\n\n\n$\307\"\310\311%\"\207" [gv-get gv-delay-error make-byte-code 514 "\301\304!\203\211\202\305\306!\302\304!\203\211\202\305\307!\303\304!\203'\211\202*\305\310!\300\311	F\312\313\314\315\316
\n$\317\"\320\321%\"=\203Q\211\202X\322DC\"\266\203=\203d\211\202k\322DC\"\266\203=\203w\211\202~\322DC\"\207" vconcat vector [macroexp-const-p make-symbol "key" "default" "testfn" map-elt make-byte-code 257 "\304\305\306\307\300\302\303\257D\310\301\311\300\302F!DF\207" vconcat vector [condition-case nil with-no-warnings map-put! map-not-inplace map-insert] 10 "\n\n(fn V)" macroexp-let*] 19 "\n\n(fn MGETTER MSETTER)"] 16 "\n\n(fn DO MAP KEY &optional DEFAULT TESTFN)"] set-advertised-calling-convention (map key &optional default) "27.1"] 6)
#@283 Associate KEY with VALUE in MAP and return VALUE.
If KEY is already present in MAP, replace the associated value
with VALUE.
When MAP is a list, test equality with TESTFN if non-nil,
otherwise use `eql'.

MAP can be a list, hash-table or array.

(fn MAP KEY VALUE &optional TESTFN)
(defalias 'map-put '(macro . #[1027 "\300\301\302\257E\207" [setf map-elt nil] 10 (#$ . 3880)]))
(make-obsolete 'map-put "use map-put! or (setf (map-elt ...) ...) instead" "27.1")
#@16 

(fn MAP KEY)
(defalias 'map--plist-delete #[514 "\300:\203A@\232\204\262\211AA\262\202\211\203,AA\262\211\211A\241\266\202=\2046\301\302!\210AA\262\262\202\207" [nil cl--assertion-failed (eq tail map)] 7 (#$ . 4353)])
(byte-code "\300\301\302\301\303\304#\305#\210\306\301\304\303\304\307%\207" [defalias map-delete cl-generic-define (map key) nil "Delete KEY in-place from MAP and return MAP.\nNo error is signaled if KEY is not a key of MAP.\nIf MAP is an array, store nil at the index KEY.\n\n(fn MAP KEY)" cl-generic-define-method #[514 "<\203.\211:\205\211@<?\262\203\300\"\262\202`\211\236\211\203*\301\"\262\210\202`\302!\203<\303\"\210\202`\304!\203X\211\305Y\203`\211\306!X\203`\307I\210\202`\310\311\312!#\210\207" [map--plist-delete delq hash-table-p remhash arrayp 0 seq-length nil error "Unsupported map type `%S': %S" type-of] 6 "\n\n(fn MAP KEY)"]] 6)
#@177 Traverse MAP using KEYS and return the looked up value or DEFAULT if nil.

Map can be a nested map composed of alists, hash-tables and arrays.

(fn MAP KEYS &optional DEFAULT)
(defalias 'map-nested-elt #[770 "\300\301#\206	\211\207" [seq-reduce #[514 "\300!\205\n\301\"\207" [mapp map-elt] 5 "\n\n(fn ACC KEY)"]] 7 (#$ . 5292)])
(byte-code "\300\301\302\301\303\304#\305#\210\306\301\304\303\304\307%\210\300\310\302\310\311\304#\312#\210\306\310\304\311\304\313%\210\300\314\302\314\315\304#\316#\210\306\314\304\315\304\317%\210\300\320\302\320\321\304#\322#\210\306\320\304\321\304\323%\210\300\324\302\324\325\304#\326#\210\306\324\304\325\304\327%\210\300\330\302\330\331\304#\332#\210\306\330\304\331\304\333%\210\300\334\302\334\335\304#\336#\210\306\334\304\337\304\340%\210\300\341\302\341\342\304#\343#\210\306\341\304\342\304\344%\210\300\345\302\345\346\304#\347#\210\306\345\304\346\304\350%\210\300\351\302\351\352\304#\353#\210\306\351\304\352\304\354%\210\300\355\302\355\356\304#\357#\210\306\355\304\356\304\360%\210\300\361\302\361\362\304#\363#\210\306\361\304\362\304\364%\210\300\365\302\365\366\304#\367#\210\306\365\304\366\304\370%\210\306\365\304\371\304\372%\210\300\373\302\373\374\304#\375#\210\306\373\304\374\304\376%\210\306\373\304\377\304\201@%\210\306\373\304\201A\304\201B%\210\306\373\304\201C\304\201D%\210\300\201E\302\201E\201F\304#\201G#\210\306\201E\304\201F\304\201H%\210\300\201I\302\201I\201J\304#\201K#\210\306\201I\304\201J\304\201L%\207" [defalias map-keys cl-generic-define (map) nil "Return the list of keys in MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn MAP)" cl-generic-define-method #[257 "\300\301\"\207" [map-apply #[514 "\207" #1=[] 3 "\n\n(fn KEY _)"]] 4 "\n\n(fn MAP)"] map-values (map) "Return the list of values in MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn MAP)" #[257 "\300\301\"\207" [map-apply #[514 "\207" #1# 3 "\n\n(fn _ VALUE)"]] 4 "\n\n(fn MAP)"] map-pairs (map) "Return the elements of MAP as key/value association lists.\nThe default implementation delegates to `map-apply'.\n\n(fn MAP)" #[257 "\300\301\"\207" [map-apply cons] 4 "\n\n(fn MAP)"] map-length (map) "Return the number of elements in the map.\nThe default implementation counts `map-keys'.\n\n(fn MAP)" #[257 "\300!\203\n\301!\207\211<\203&\211\211:\205\211@<?\262\203#\211G\302\245\207\211G\207\303!\203/\211G\207\304!G\207" [hash-table-p hash-table-count 2 arrayp map-keys] 3 "\n\n(fn MAP)"] map-copy (map) "Return a copy of MAP.\n\n(fn MAP)" #[257 "\211<\203	\300!\207\301!\203\302!\207\303!\203\300!\207\304\305\306!#\207" [seq-copy hash-table-p copy-hash-table arrayp error "Unsupported map type `%S': %S" type-of] 5 "\n\n(fn MAP)"] map-apply #'map "Apply FUNCTION to each element of MAP and return the result as a list.\nFUNCTION is called with two arguments, the key and the value.\nThe default implementation delegates to `map-do'.\n\n(fn FUNCTION MAP)" #[514 "\300C\301\302\303\304\305\306\"\307\"\310\311%\"\210\211\242\237\207" [nil map-do make-byte-code 514 "\301\300\"\301\242B\240\207" vconcat vector #1# 6 "\n\n(fn K V)"] 11 "\n\n(fn FUNCTION MAP)"] map-do #'map "Apply FUNCTION to each element of MAP and return nil.\nFUNCTION is called with two arguments, the key and the value.\n\n(fn FUNCTION MAP)" #'(map hash-table) #[514 "\300\"\207" [maphash] 5 "\n\n(fn FUNCTION MAP)"] map-keys-apply #'map "Return the result of applying FUNCTION to each key of MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn FUNCTION MAP)" #[514 "\300\301\302\303\304\305!\306\"\307\310%\"\207" [map-apply make-byte-code 514 "\300!\207" vconcat vector #1# 4 "\n\n(fn KEY _)"] 9 "\n\n(fn FUNCTION MAP)"] map-values-apply #'map "Return the result of applying FUNCTION to each value of MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn FUNCTION MAP)" #[514 "\300\301\302\303\304\305!\306\"\307\310%\"\207" [map-apply make-byte-code 514 "\300!\207" vconcat vector #1# 4 "\n\n(fn _ VAL)"] 9 "\n\n(fn FUNCTION MAP)"] map-filter (pred map) "Return an alist of key/val pairs for which (PRED key val) is non-nil in MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn PRED MAP)" #[514 "\300\301\302\303\304\305\306\307	!\310\"\311\312%\"\"\207" [delq nil map-apply make-byte-code 514 "\300\"\205\nB\207" vconcat vector #1# 5 "\n\n(fn KEY VAL)"] 11 "\n\n(fn PRED MAP)"] map-remove (pred map) "Return an alist of the key/val pairs for which (PRED key val) is nil in MAP.\nThe default implementation delegates to `map-filter'.\n\n(fn PRED MAP)" #[514 "\300\301\302\303\304\305!\306\"\307\310%\"\207" [map-filter make-byte-code 514 "\300\"?\207" vconcat vector #1# 5 "\n\n(fn KEY VAL)"] 9 "\n\n(fn PRED MAP)"] mapp (map) "Return non-nil if MAP is a map (alist, hash-table, array, ...).\n\n(fn MAP)" #[257 "\211<\206\300!\206\301!\207" [hash-table-p arrayp] 3 "\n\n(fn MAP)"] map-empty-p (map) "Return non-nil if MAP is empty.\nThe default implementation delegates to `map-length'.\n\n(fn MAP)" #[257 "\300!\301U\207" [map-length 0] 3 "\n\n(fn MAP)"] ((map list)) #[257 "\211?\207" #1# 2 "\n\n(fn MAP)"] map-contains-key (map key &optional testfn) "Return non-nil if and only if MAP contains KEY.\nTESTFN is deprecated.  Its default depends on MAP.\nThe default implementation delegates to `map-do'.\n\n(fn MAP KEY &optional TESTFN)" #[770 "\211C\211\242\204\211\300\240\210\3012$\302\303\304\305\306\307\"\310\"\311\312%\"\210\3130\207" [equal map--catch map-do make-byte-code 514 "\301\242\300\"\205\f\302\303\304\"\207" vconcat vector [throw map--catch t] 5 "\n\n(fn K V)" nil] 12 "\n\n(fn MAP KEY &optional TESTFN)"] ((map list) key &optional testfn) #[770 "\300\211\301\302\206\303%=?\207" [(nil) alist-get nil equal] 11 "\n\n(fn MAP KEY &optional TESTFN)"] ((map array) key &optional _testfn) #[770 "\250\205\300Y\205GW\207" [0] 5 "\n\n(fn MAP KEY &optional TESTFN)"] ((map hash-table) key &optional _testfn) #[770 "\300\211\301#=?\207" [(nil) gethash] 9 "\n\n(fn MAP KEY &optional TESTFN)"] map-some (pred map) "Return the first non-nil (PRED key val) in MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn PRED MAP)" #[514 "\3002\301\302\303\304\305\306!\307\"\310\311%\"\210\3120\207" [map--break map-apply make-byte-code 514 "\300\"\211\205\f\301\302\"\207" vconcat vector [throw map--break] 6 "\n\n(fn KEY VALUE)" nil] 9 "\n\n(fn PRED MAP)"] map-every-p (pred map) "Return non-nil if (PRED key val) is non-nil for all elements of MAP.\nThe default implementation delegates to `map-apply'.\n\n(fn PRED MAP)" #[514 "\3002\301\302\303\304\305\306!\307\"\310\311%\"\210\3120\207" [map--break map-apply make-byte-code 514 "\300\"\206\301\302\303\"\207" vconcat vector [throw map--break nil] 5 "\n\n(fn KEY VALUE)" t] 9 "\n\n(fn PRED MAP)"]] 6)
#@135 Merge into a map of type TYPE all the key/value pairs in MAPS.
See `map-into' for all supported values of TYPE.

(fn TYPE &rest MAPS)
(defalias 'map-merge #[385 "\300\211A\262\242\"C\203'\301\302\303\304\305\306!\307\"\310\311%\211A\262\242\"\210\202\n\211\242\207" [map-into map-apply make-byte-code 514 "\3011\302\300\242\303$0\202\210\300\304\300\242#\240\207" vconcat vector [(map-not-inplace) map-put! nil map-insert] 8 "\n\n(fn KEY VALUE)"] 10 (#$ . 12204)])
#@294 Merge into a map of type TYPE all the key/value pairs in MAPS.
When two maps contain the same key (`eql'), call FUNCTION on the two
values and use the value returned by it.
MAP can be a list, hash-table or array.
See `map-into' for all supported values of TYPE.

(fn TYPE FUNCTION &rest MAPS)
(defalias 'map-merge-with #[642 "\300\211A\262\242\"C\301\211B\203.\302\303\304\305\306\307	#\310\"\311\312%\211A\262\242\"\210\202
\242\207" [map-into nil map-apply make-byte-code 514 "\302\3031(\304\301\242\305\306\307\310\311\300\302\f#\312\"\313\314%\315\301\242#!\316$0\202H\210\301\317\301\242\305\306\307\310\311\300\302
#\320\"\313\314%\315\301\242#!#\240\207" vconcat vector [(map-not-inplace) map-put! make-byte-code 257 "\303\301\"\203	\302\207\300\302\"\207" vconcat vector [eql] 4 "\n\n(fn OLD)" map-elt nil map-insert [eql]] 16 "\n\n(fn KEY VALUE)"] 14 (#$ . 12695)])
(byte-code "\300\301\302\301\303\304#\305#\210\306\301\304\307\304\310%\210\306\301\304\311\304\312%\210\306\301\304\313\304\314%\210\300\315\302\315\316\304#\317#\210\306\315\304\316\304\320%\210\321\315\322\323#\210\324\325\326\"\210\300\327\302\327\330\304#\331#\210\306\327\304\330\304\332%\210\300\333\315\304#\210\334\333\315\323#\210\306\335\304\336\337\340%\210\306\335\304\341\304\342%\210\306\335\304\343\304\344%\210\306\345\304\346\304\347%\210\306\345\304\350\304\351%\207" [defalias map-into cl-generic-define (map type) nil "Convert the map MAP into a map of type TYPE.\n\n(fn MAP TYPE)" cl-generic-define-method (map (_type (eql list))) #[514 "\300!\207" [map-pairs] 4 "\n\n(fn MAP TYPE)"] (map (_type (eql alist))) #[514 "\300!\207" [map-pairs] 4 "\n\n(fn MAP TYPE)"] (map (_type (eql plist))) #[514 "\300C\301\302\303\304\305\306!\307\"\310\311%\"\210\211\242\207" [nil map-do make-byte-code 514 "\300\300\242BB\240\207" vconcat vector #1=[] 6 "\n\n(fn K V)"] 10 "\n\n(fn MAP TYPE)"] map-put! (map key value &optional testfn) "Associate KEY with VALUE in MAP.\nIf KEY is already present in MAP, replace the associated value\nwith VALUE.\nThis operates by modifying MAP in place.\nIf it cannot do that, it signals the `map-not-inplace' error.\nIf you want to insert an element without modifying MAP, use `map-insert'.\n\n(fn MAP KEY VALUE &optional TESTFN)" #[1027 "<\203[\211:\205\211@<?\262\203\300#\207\206 \301\302=\2042\303\206.\301#\2025\236\203A\241\210\202LB\211\262B\262\266\211=?\205Z\304\305C\"\207\306!\203h\307#\207\310!\203sI\207\311\312\313!#\207" [plist-put equal eq assoc signal map-not-inplace hash-table-p puthash arrayp error "Unsupported map type `%S': %S" type-of] 9 "\n\n(fn MAP KEY VALUE &optional TESTFN)"] set-advertised-calling-convention (map key value) "27.1" define-error map-inplace "Can only modify map in place" map-insert (map key value) "Return a new map like MAP except that it associates KEY with VALUE.\nThis does not modify MAP.\nIf you want to insert an element in place, use `map-put!'.\n\n(fn MAP KEY VALUE)" #[771 "<\203 \211:\205\211@<?\262\203BB\207BB\207\300\301C\"\207" [signal map-inplace] 6 "\n\n(fn MAP KEY VALUE)"] map--put make-obsolete map-apply #'(map list) t #[771 "\211\211:\205\n\211@<?\262\203 \207\300\301\302\303\304\305!\306\"\307\310%\"\207" [seq-map make-byte-code 257 "\300@A\"\207" vconcat vector #1# 4 "\n\n(fn PAIR)"] 10 "\n\n(fn CL--CNM FUNCTION MAP)"] #'(map hash-table) #[514 "\300C\301\302\303\304\305\306\"\307\"\310\311%\"\210\211\242\237\207" [nil maphash make-byte-code 514 "\301\300\"\301\242B\240\207" vconcat vector #1# 6 "\n\n(fn KEY VALUE)"] 11 "\n\n(fn FUNCTION MAP)"] #'(map array) #[514 "\300C\301\302\303\304\305\306\"\307\"\310\311%\"\207" [0 seq-map make-byte-code 257 "\300\301\242\"\301\211\242T\240\210\207" vconcat vector #1# 4 "\n\n(fn ELT)"] 11 "\n\n(fn FUNCTION MAP)"] map-do #'(map list) #[514 "\211\211:\205\n\211@<?\262\203%\211\2055\211A\262\242\211A\262\242\"\210\202\300\301\302\303\304\305!\306\"\307\310%\"\207" [seq-do make-byte-code 257 "\300@A\"\207" vconcat vector #1# 4 "\n\n(fn PAIR)"] 9 "Private function used to iterate over ALIST using FUNCTION.\n\n(fn FUNCTION MAP)"] #'(array array) #[514 "\300\301\302\303\304\305!\306\"\307\310%\"\207" [seq-do-indexed make-byte-code 514 "\300\"\207" vconcat vector #1# 5 "\n\n(fn ELT INDEX)"] 9 "Private function used to iterate over ARRAY using FUNCTION.\n\n(fn FUNCTION ARRAY)"]] 6)
#@104 Convert MAP into a hash-table.
KEYWORD-ARGS are forwarded to `make-hash-table'.

(fn MAP KEYWORD-ARGS)
(defalias 'map--into-hash #[514 "\300\301\"\302\303\304\305\306\307!\310\"\311\312%\"\210\211\207" [apply make-hash-table map-apply make-byte-code 514 "\300\301#\207" vconcat vector [puthash] 8 "\n\n(fn KEY VALUE)"] 10 (#$ . 17179)])
(byte-code "\300\301\302\303\302\304%\210\300\301\302\305\302\306%\207" [cl-generic-define-method map-into nil (map (_type (eql hash-table))) #[514 "\300\301\302!\303\304F\"\207" [map--into-hash :size map-length :test equal] 8 "Convert MAP into a hash-table.\n\n(fn MAP TYPE)"] (map (type (head hash-table))) #[514 "\300A\"\207" [map--into-hash] 5 "Convert MAP into a hash-table.\nTYPE is a list where the car is `hash-table' and the cdr are the\nkeyword-args forwarded to `make-hash-table'.\n\nExample:\n    (map-into '((1 . 3)) '(hash-table :test eql))\n\n(fn MAP TYPE)"]] 6)
#@80 Return a list of pcase bindings from ARGS to the elements of a map.

(fn ARGS)
(defalias 'map--make-pcase-bindings #[257 "\300\301\"\207" [seq-map #[257 "\211:\203\300\301\302@EA@E\207\300\301\302\303DEE\207" [app pcase--flip map-elt quote] 6 "\n\n(fn ELT)"]] 4 (#$ . 18112)])
#@73 Return a list of `(map ...)' pcase patterns built from ARGS.

(fn ARGS)
(defalias 'map--make-pcase-patterns #[257 "\300\301\302\"B\207" [map seq-map #[257 "\211:\203\211@\300=\203\301!\207\207" [map map--make-pcase-patterns] 3 "\n\n(fn ELT)"]] 5 (#$ . 18402)])
(provide 'map)

Zerion Mini Shell 1.0