403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp/emacs-lisp/let-alist.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



#@192 Return alist of symbols inside DATA that start with a `.'.
Perform a deep search and return an alist where each car is the
symbol, and each cdr is the same symbol without the `.'.

(fn DATA)
(defalias 'let-alist--deep-dot-search #[257 "\2119\203\300!\301\302\"\205\303\304\305\306\211$!BC\207\307!\203*\310\311\312\313\"\"\207\211:\2041\306\207\211@\314=\203>\313A@!\207\315\313@!\313A!\"\207" [symbol-name string-match "\\`\\." intern replace-match "" nil vectorp apply nconc mapcar let-alist--deep-dot-search let-alist append] 9 (#$ . 85)])
#@76 Return a sexp used to access SYMBOL inside VARIABLE.

(fn SYMBOL VARIABLE)
(defalias 'let-alist--access-sexp #[514 "\300!\301!\302\303\"\203\207\304\305\306\307\310\"\237\"\"\207" [let-alist--remove-dot symbol-name string-match "\\`\\." let-alist--list-to-sexp mapcar intern split-string "\\."] 10 (#$ . 651)])
#@79 Turn symbols LIST into recursive calls to `cdr' `assq' on VAR.

(fn LIST VAR)
(defalias 'let-alist--list-to-sexp #[514 "\300\301\302@DA\203\303A\"\202ED\207" [cdr assq quote let-alist--list-to-sexp] 8 (#$ . 976)])
#@50 Return SYMBOL, sans an initial dot.

(fn SYMBOL)
(defalias 'let-alist--remove-dot #[257 "\300!\301\302\"\203\303\304\305\306\211$!\207\207" [symbol-name string-match "\\`\\." intern replace-match "" nil] 8 (#$ . 1205)])
#@887 Let-bind dotted symbols to their cdrs in ALIST and execute BODY.
Dotted symbol is any symbol starting with a `.'.  Only those present
in BODY are let-bound and this search is done at compile time.

For instance, the following code

  (let-alist alist
    (if (and .title .body)
        .body
      .site
      .site.contents))

essentially expands to

  (let ((.title (cdr (assq \='title alist)))
        (.body  (cdr (assq \='body alist)))
        (.site  (cdr (assq \='site alist)))
        (.site.contents (cdr (assq \='contents (cdr (assq \='site alist))))))
    (if (and .title .body)
        .body
      .site
      .site.contents))

If you nest `let-alist' invocations, the inner one can't access
the variables of the outer one.  You can, however, access alists
inside the original alist by using dots inside the symbol, as
displayed in the example above.

(fn ALIST &rest BODY)
(defalias 'let-alist '(macro . #[385 "\300\301!\302DC\302\303\304\305\"\306\307!!\"BBE\207" [make-symbol "alist" let mapcar make-closure #[257 "\211@\301@\300\"D\207" [V0 let-alist--access-sexp] 5 "\n\n(fn X)"] delete-dups let-alist--deep-dot-search] 11 (#$ . 1438)]))
(byte-code "\300\301\302\303#\304\301\305\306#\210\307\301!\207" [function-put let-alist lisp-indent-function 1 put edebug-form-spec t provide] 5)

Youez - 2016 - github.com/yon3zu
LinuXploit