| Server IP : 217.160.0.135 / Your IP : 216.73.217.37 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/emacs-lisp/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(require 'macroexp)
(defconst pcase--memoize (make-hash-table :weakness 'key :test 'eq))
(defconst pcase--dontcare-upats '(t _ pcase--dontcare))
(defvar pcase--dontwarn-upats '(pcase--dontcare))
(byte-code "\300\301\302\"\210\300\303\304\"\207" [def-edebug-elem-spec pcase-PAT (&or (&interpose symbolp pcase--edebug-match-pat-args) sexp) pcase-FUN (&or lambda-expr (functionp &rest form) sexp)] 3)
#@16
(fn HEAD PF)
(defalias 'pcase--edebug-match-pat-args #[514 "@\262\300\301\"\206 \302!\205 9\205 \303!!\262\207" [alist-get ('sexp (or &rest pcase-PAT) (and &rest pcase-PAT) (guard form) (pred &or ("not" pcase-FUN) pcase-FUN) (app pcase-FUN pcase-PAT)) pcase--get-macroexpander edebug-get-spec] 6 (#$ . 482)])
#@68 Return the macroexpander for pcase pattern head S, or nil.
(fn S)
(defalias 'pcase--get-macroexpander #[257 "\211\300N\207" [pcase-macroexpander] 3 (#$ . 811)])
#@1744 Evaluate EXP to get EXPVAL; try passing control to one of CASES.
CASES is a list of elements of the form (PATTERN CODE...).
For the first CASE whose PATTERN "matches" EXPVAL,
evaluate its CODE..., and return the value of the last form.
If no CASE has a PATTERN that matches, return nil.
Each PATTERN expands, in essence, to a predicate to call
on EXPVAL. When the return value of that call is non-nil,
PATTERN matches. PATTERN can take one of the forms:
_ matches anything.
\='VAL matches if EXPVAL is `equal' to VAL.
KEYWORD shorthand for \='KEYWORD
INTEGER shorthand for \='INTEGER
STRING shorthand for \='STRING
SYMBOL matches anything and binds it to SYMBOL.
If a SYMBOL is used twice in the same pattern
the second occurrence becomes an `eq'uality test.
(pred FUN) matches if FUN called on EXPVAL returns non-nil.
(pred (not FUN)) matches if FUN called on EXPVAL returns nil.
(app FUN PAT) matches if FUN called on EXPVAL matches PAT.
(guard BOOLEXP) matches if BOOLEXP evaluates to non-nil.
(and PAT...) matches if all the patterns match.
(or PAT...) matches if any of the patterns matches.
FUN in `pred' and `app' can take one of the forms:
SYMBOL or (lambda ARGS BODY)
call it with one argument
(F ARG1 .. ARGn)
call F with ARG1..ARGn and EXPVAL as n+1'th argument
FUN, BOOLEXP, and subsequent PAT can refer to variables
bound earlier in the pattern by a SYMBOL pattern.
Additional patterns can be defined using `pcase-defmacro'.
See Info node `(elisp) Pattern-Matching Conditional' in the
Emacs Lisp manual for more information and examples.
(fn EXP &rest CASES)
(defalias 'pcase '(macro . #[385 "\301@\"@\232\203 A@\232\203 \211AA\207\302\"\303@BB#\210\207" [pcase--memoize gethash pcase--expand puthash] 9 (#$ . 981)]))
(byte-code "\300\301\302\303#\304\301\305\306#\210\304\301\307\310#\207" [function-put pcase lisp-indent-function 1 put edebug-form-spec (form &rest (pcase-PAT body)) function-documentation (pcase--make-docstring)] 5)
(defalias 'pcase--make-docstring #[0 "\300\301K\302\"\303\301\"\304\305!\210\306\307\310\"r\211q\210\311\312\"\216A\206 c\210\313C\314\311\315\"!\210\316\242\236\317\242\"B\240\266\211\242\203l \211\242\211\242A\240\210\242\211@A\300\302\"\320c\210\321\322!\313%\262\323\206e \324\261\266\202: \210\325 \203{ \326@\"\202| \211\262*\207" [documentation pcase raw help-split-fundoc require help-fns generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] nil mapatoms #[257 "\301!\211\205 \300B\300\242B\240\207" [V0 pcase--get-macroexpander] 5 "\n\n(fn SYMBOL)"] \` delq "\n\n-- " help-fns--signature indirect-function "\n" "Not documented." buffer-string help-add-fundoc-usage] 14])
#@229 The exhaustive version of `pcase' (which see).
If EXP fails to match any of the patterns in CASES, an error is
signaled.
In contrast, `pcase' will return nil if there is no match, but
not signal an error.
(fn EXP &rest CASES)
(defalias 'pcase-exhaustive '(macro . #[385 "\301\302!\211B\303\304\305\306EDC\"\")\207" [pcase--dontwarn-upats gensym "x" pcase--expand append error "No clause matching `%S'"] 11 (#$ . 3894)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put pcase-exhaustive lisp-indent-function 1 put edebug-form-spec pcase] 5)
#@258 Like `lambda' but allow each argument to be a pattern.
I.e. accepts the usual &optional and &rest keywords, but every
formal argument can be any pattern accepted by `pcase' (a mere
variable name being but a special case of it).
(fn LAMBDA-LIST &rest BODY)
(defalias 'pcase-lambda '(macro . #[385 "\300C\301!\302\303\304\"\"\305\306@\307\242\237ABBC\"BB\207" [nil macroexp-parse-body mapcar make-closure #[257 "\2119\203 \207\301\302\303\300\242G\"!\300D\300\242B\240\210\207" [V0 make-symbol format "arg%s"] 5 "\n\n(fn PAT)"] lambda append pcase-let*] 12 (#$ . 4468)]))
(byte-code "\300\301\302\303#\300\301\304\305#\306\301\307\310#\207" [function-put pcase-lambda doc-string-elt 2 lisp-indent-function defun put edebug-form-spec (&define (&rest pcase-PAT) lambda-doc def-body)] 6)
#@22
(fn BINDINGS BODY)
(defalias 'pcase--let* #[514 "\204 \300!\207\301@@!\203 \302@C\303A\"\"\207\211A\262\242\304A@@\303\"D\305B\"\207" [macroexp-progn pcase--trivial-upat-p macroexp-let* pcase--let* pcase--expand ((pcase--dontcare nil))] 9 (#$ . 5270)])
#@476 Like `let*', but supports destructuring BINDINGS using `pcase' patterns.
As with `pcase-let', BINDINGS are of the form (PATTERN EXP), but the
EXP in each binding in BINDINGS can use the results of the destructuring
bindings that precede it in BINDINGS' order.
Each EXP should match (i.e. be of compatible structure) to its
respective PATTERN; a mismatch may signal an error or may go
undetected, binding variables to arbitrary values, such as nil.
(fn BINDINGS &rest BODY)
(defalias 'pcase-let* '(macro . #[385 "\301\"\211@\232\203 \211A\207\302\"\303B#\210\207" [pcase--memoize gethash pcase--let* puthash] 8 (#$ . 5548)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put pcase-let* lisp-indent-function 1 put edebug-form-spec ((&rest (pcase-PAT &optional form)) body)] 5)
#@581 Like `let', but supports destructuring BINDINGS using `pcase' patterns.
BODY should be a list of expressions, and BINDINGS should be a list of
bindings of the form (PATTERN EXP).
All EXPs are evaluated first, and then used to perform destructuring
bindings by matching each EXP against its respective PATTERN. Then
BODY is evaluated with those bindings in effect.
Each EXP should match (i.e. be of compatible structure) to its
respective PATTERN; a mismatch may signal an error or may go
undetected, binding variables to arbitrary values, such as nil.
(fn BINDINGS &rest BODY)
(defalias 'pcase-let '(macro . #[385 "A\204 \301BB\207\302\302\262\211\203Z \211@\211@>\203* \303\304!ABB\262\202S \305@!\2039 \211B\262\202S \303\306\307G\"!\211ABB\262@DB\262\210A\266\202\202 \210\310\237\301BBE\207" [pcase--dontcare-upats pcase-let* nil make-symbol "_" pcase--trivial-upat-p format "x%d" let] 9 (#$ . 6359)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put pcase-let lisp-indent-function 1 put edebug-form-spec pcase-let*] 5)
#@595 Eval BODY once for each set of bindings defined by PATTERN and LIST elements.
PATTERN should be a `pcase' pattern describing the structure of
LIST elements, and LIST is a list of objects that match PATTERN,
i.e. have a structure that is compatible with PATTERN.
For each element of LIST, this macro binds the variables in
PATTERN to the corresponding subfields of the LIST element, and
then evaluates BODY with these bindings in effect. The
destructuring bindings of variables in PATTERN to the subfields
of the elements of LIST is performed as if by `pcase-let'.
(fn (PATTERN LIST) BODY...)
(defalias 'pcase-dolist '(macro . #[385 "\300@!\203
\301BB\207\302\303!\301AB\304@DCBBE\207" [pcase--trivial-upat-p dolist gensym "x" pcase-let*] 8 (#$ . 7439)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put pcase-dolist lisp-indent-function 1 put edebug-form-spec ((pcase-PAT form) body)] 5)
#@422 Assign values to variables by destructuring with `pcase'.
PATTERNS are normal `pcase' patterns, and VALUES are expression.
Evaluation happens sequentially as in `setq' (not in parallel).
An example: (pcase-setq `((,a) [(,b)]) '((1) [(2)]))
VAL is presumed to match PAT. Failure to match may signal an error or go
undetected, binding variables to arbitrary values, such as nil.
(fn PATTERNS VALUE PATTERN VALUES ...)
(defalias 'pcase-setq '(macro . #[642 "\211\203= \211G\300\301\"\302U\204 \303\304\305\301\\D\"\210\210\306\2033 \305\211A\262\242\211A\262\242EB\262\202 \307\305E\237BB\207\310!\203H \311E\207\312\313B\314B\"\207" [mod 2 0 signal wrong-number-of-arguments pcase-setq nil progn pcase--trivial-upat-p setq pcase-compile-patterns #[385 "\300\301\302\"B\207" [setq mapcan #[257 "\211@A@D\207" [] 5 "\n\n(fn VARVAL)"]] 6 "\n\n(fn VARVALS &rest _)"] ((pcase--dontcare . ignore))] 9 (#$ . 8363)]))
(put 'pcase-setq 'edebug-form-spec '(&rest [pcase-PAT form]))
#@13
(fn UPAT)
(defalias 'pcase--trivial-upat-p #[257 "\2119\205 \211>?\207" [pcase--dontcare-upats] 3 (#$ . 9367)])
#@806 Compile the set of patterns in CASES.
EXP is the expression that will be matched against the patterns.
CASES is a list of elements (PAT . CODEGEN)
where CODEGEN is a function that returns the code to use when
PAT matches. That code has to be in the form of a cons cell.
CODEGEN will be called with at least 2 arguments, VARVALS and COUNT.
VARVALS is a list of elements of the form (VAR VAL . RESERVED) where VAR
is a variable bound by the pattern and VAL is a duplicable expression
that returns the value this variable should be bound to.
If the pattern PAT uses `or', CODEGEN may be called multiple times,
in which case it may want to generate the code differently to avoid
a potential code explosion. For this reason the COUNT argument indicates
how many time this CODEGEN is called.
(fn EXP CASES)
(defalias 'pcase-compile-patterns #[514 "\301!\203\n \202
\302\303!\304C\305C\306\307\310\311$\"!\242\211\203\257 \211@\211@AA\304C\211\203r \211@\211@\211\203j \211@\211@\242\236\211\203U AA\203b \211\312\241\266\202c @AAB\242B\240\210\210A\266\202\2028 \210A\266\202\2020 \210\304\307\313\242\"\211\203\246 \211@\211@\307\310\314#\"A \nG\"@\240\210A\241\266A\266\202\202z \266A\266\202\202\"