%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/emacs-lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/emacs-lisp/gv.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!\210\302\303\304\"\207" [require macroexp define-error gv-invalid-place "%S is not a valid place expression"] 3) #@455 Build the code that applies DO to PLACE. PLACE must be a valid generalized variable. DO must be a function; it will be called with 2 arguments: GETTER and SETTER, where GETTER is a (copyable) Elisp expression that returns the value of PLACE, and SETTER is a function which returns the code to set PLACE when called with a (not necessarily copyable) Elisp expression that returns the value to set it to. DO must return an Elisp expression. (fn PLACE DO) (defalias 'gv-get #[514 "9\203 \211\301\302\303\304\305!\306\"\307\310%\"\207:\204! \311\312C\"\207@\313\314\315#\211\2036 \316A#\202\245 \317\"\211=\203Q \320N\203Q \316\320N\211A#\262\211=\203j \321!\203j K9\203j KAB\262\211=\203\237 9\203\202 \322N\203\202 \323\324\"\202\243 \325!\326\301\327\330\304\305!\331\"\332\333% A$\262\202\243 \334\"\262\207" [macroexpand-all-environment make-byte-code 257 "\301\300E\207" vconcat vector [setq] 4 "\n\n(fn V)" signal gv-invalid-place function-get gv-expander autoload apply macroexpand-1 compiler-macro fboundp setf-method error "Incompatible place needs recompilation: %S" gv-setter gv--defsetter 128 "\300B\207" [] 3 "\n\n(fn &rest ARGS)" gv-get] 14 (#$ . 543)]) #@79 Return the symbol where the (setf NAME) function should be placed. (fn NAME) (defalias 'gv-setter #[257 "\211\300N\203 \301\302\"\210\303\304\305\"!\207" [gv-expander error "gv-expander conflicts with (setf %S)" intern format "(setf %s)"] 5 (#$ . 1759)]) #@512 Build the code manipulating the generalized variable PLACE. GETTER will be bound to a copyable expression that returns the value of PLACE. SETTER will be bound to a function that takes an expression V and returns a new expression that sets PLACE to V. BODY should return some Elisp expression E manipulating PLACE via GETTER and SETTER. The returned value will then be an Elisp expression that first evaluates all the parts of PLACE that can be evaluated and then runs E. (fn (GETTER SETTER) PLACE &rest BODY) (defalias 'gv-letplace '(macro . #[642 "\300\301BBE\207" [gv-get lambda] 8 (#$ . 2025)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put gv-letplace lisp-indent-function 2 put edebug-form-spec (sexp form body)] 5) #@266 Use HANDLER to handle NAME as a generalized var. NAME is a symbol: the name of a function, macro, or special form. HANDLER is a function which takes an argument DO followed by the same arguments as NAME. DO is a function as defined in `gv-get'. (fn NAME HANDLER) (defalias 'gv-define-expander '(macro . #[514 "\300\301D\302F\207" [function-put quote 'gv-expander] 6 (#$ . 2779)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put gv-define-expander lisp-indent-function 1 put edebug-form-spec (sexp form)] 5) #@47 (fn SYMBOL NAME ARGS HANDLER &optional FIX) (defalias 'gv--defun-declaration #[1284 "\300\301B\302:\203(@\211\303\267\202A\211:\203 \211@\211\304=\203t A\211:\203i \211@\211:\203^ \211@A\211\204P A\211\305\304BBBE\266\202\262\202Y \306\307#\210\310\266\202\202d \f\"\262\202o \"\262\202z \f\n\"\262\202\225 \2119\203\217 \305\n\311\nDE\202\225 \"\262\202#A\211:\203\211@\211\304=\203\367 A\211:\203\354 \211@\211:\203\341 \211@A\211\204\325 A\211\312BBBB\266\202\262\202\334 \"\266\202\202\347 \f\"\262\202\362 \"\262\202\375 \f\n\"\262\202\2119\203\313\n F\202 \"\262\202#\n\"\262\202.\211 \"\266\202E\207" [progn :autoload-end #[514 "\300\301#\210\302\207" [message #1="Unknown %s declaration %S" nil] 6 "\n\n(fn SYMBOL HANDLER)"] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (gv-expander 20 gv-setter 154)) lambda gv-define-expander message #1# nil function gv-define-setter gv-define-simple-setter] 24 (#$ . 3315)]) (byte-code "\302\236\204 \302\303\304\302\"D\211 B\211B\210\305\236\204$ \305\303\304\305\"DB\302\207" [defun-declarations-alist macro-declarations-alist gv-expander apply-partially gv--defun-declaration gv-setter] 4) #@317 Helper function used by code generated by `gv-define-setter'. NAME is the name of the getter function. SETTER is a function that generates the code for the setter. NAME accept ARGS as arguments and SETTER accepts (NEWVAL . ARGS). VARS is used internally for recursive calls. (fn NAME SETTER DO ARGS &optional VARS) (defalias 'gv--defsetter #[1284 "\204 \211\237B\300\301\302\303\304\"\305\"\306\307%\"\207@\310!\203( \211\202+ \311\312!\313AB%=\203D \211\202K \314DC\"\207" [make-byte-code 257 "\302\300\301#\207" vconcat vector [apply] 5 "\n\n(fn V)" macroexp-const-p make-symbol "v" gv--defsetter macroexp-let*] 15 (#$ . 4621)]) #@629 Define a setter method for generalized variable NAME. This macro is an easy-to-use substitute for `gv-define-expander' that works well for simple place forms. Assignments of VAL to (NAME ARGS...) are expanded by binding the argument forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must return a Lisp form that does the assignment. The first arg in ARGLIST (the one that receives VAL) receives an expression which can do arbitrary things, whereas the other arguments are all guaranteed to be pure and copyable. Example use: (gv-define-setter aref (v a i) \=`(aset ,a ,i ,v)) (fn NAME ARGLIST &rest BODY) (defalias 'gv-define-setter '(macro . #[642 "\300\301\302\303\304\305 D\301 BB\306BBBFE\207" [gv-define-expander lambda (do &rest args) (declare-function gv--defsetter "gv" (name setter do args &optional vars)) gv--defsetter quote (do args)] 13 (#$ . 5289)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put gv-define-setter lisp-indent-function 2 put edebug-form-spec (&define name sexp def-body)] 5) #@533 Define a simple setter method for generalized variable NAME. This macro is an easy-to-use substitute for `gv-define-expander' that works well for simple place forms. Assignments of VAL to (NAME ARGS...) are turned into calls of the form (SETTER ARGS... VAL). If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and instead the assignment is turned into something equivalent to (let ((temp VAL)) (SETTER ARGS... temp) temp) so as to preserve the semantics of `setf'. (fn NAME SETTER &optional FIX-RETURN) (defalias 'gv-define-simple-setter '(macro . #[770 "\242\300=\203\f \301\302\"\210\303\304\203, \305\306\307\310\311\312\313\314\fDCB\315B\316BBCB\257\2028 \311\313\314DCB\317BCBF\207" [lambda message "Use `gv-define-setter' or name %s's setter function" gv-define-setter (val &rest args) macroexp-let2 nil v val \` progn \, quote ((\,@ args) (\, v)) ((\, v)) ((\,@ args) (\, val))] 15 (#$ . 6349)])) (put 'gv-define-simple-setter 'edebug-form-spec '(sexp (&or symbolp lambda-expr) &optional sexp)) #@321 Set each PLACE to the value of its VAL. This is a generalized version of `setq'; the PLACEs may be symbolic references such as (car x) or (aref x i), as well as plain symbols. For example, (setf (cadr x) y) is equivalent to (setcar (cdr x) y). The return value is the last VAL in the list. (fn PLACE VAL PLACE VAL ...) (defalias 'setf '(macro . #[128 "\300G\301\"\302U\204 \303\304\305GD\"\210\211\2035 \211AA\2045 \211A\262\242@\306\307\310\311\312\313!\314\"\315\316%\"\207\317\203O \305\211A\262\242\211A\262\242EB\262\2026 \320\237B\207" [logand 1 0 signal wrong-number-of-arguments setf gv-get make-byte-code 514 "\211\300!\207" vconcat vector [] 4 "\n\n(fn GETTER SETTER)" nil progn] 11 (#$ . 7395)])) (byte-code "\300\301\302\303#\210\300\304\302\305#\210\300\306\307\310#\210\311\312\307\313#\311\314\307\315#\311\316\307\317#\311\320\307\321#\311\322\307\323#\311\324\307\325#\311\326\307\327#\311\330\307\331#\311\332\307\333#\311\334\307\335#\311\336\307\337#\300\340\307\341#\210\311\342\307\343#\311\344\307\345#\311\346\307\347#\300\350\307\351#\210\311\352\307\353#\311\354\307\355#\311\356\307\357#\311\360\307\361#\311\362\307\363#\311\364\307\365#\311\366\307\367#\311\370\307\371#\311\372\307\373#\311\374\307\375#\311\376\307\377#\311\201@ \307\201A #\311\201B \307\201C #\311\201D \307\201E #\311\201F \307\201G #\311\201H \307\201I #\311\201J \307\201K #\311\201L \307\201M #\311\201N \307\201O #\311\201P \307\201Q #\311\201R \307\201S #\300\201T \307\201U #\210\201V \300\201W \307\201W !#\210\300\201X \307\201X !#\266\300\201Y \307\201Z #\210\300\201[ \307\201\\ #\207" [put setf edebug-form-spec (&rest [gv-place form]) gv-place edebug-match-form edebug-after gv-expander #[1028 "\300\301\302\303\304\305\n\n\n#\306\"\307\310%\"\207" [gv-get make-byte-code 514 "\300\303\301\302F\304\305\306\307\310\301\302 #\311\"\312\313%\"\207" vconcat vector [edebug-after make-byte-code 257 "\303\300\301\302!F\207" vconcat vector [edebug-after] 6 "\n\n(fn STORE)"] 12 "\n\n(fn GETTER SETTER)"] 14 "\n\n(fn DO BEFORE INDEX PLACE)"] function-put aref #[385 "\300\301\302$\207" [gv--defsetter aref #[385 "\300\301C\"B\207" [aset append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] char-table-range #[385 "\300\301\302$\207" [gv--defsetter char-table-range #[385 "\300\301C\"B\207" [set-char-table-range append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] car #[385 "\300\301\302$\207" [gv--defsetter car #[385 "\300\301C\"B\207" [setcar append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] cdr #[385 "\300\301\302$\207" [gv--defsetter cdr #[385 "\300\301C\"B\207" [setcdr append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] caar #[385 "\300\301\302$\207" [gv--defsetter caar #[514 "\300\301DE\207" [setcar car] 5 "\n\n(fn VAL X)"]] 7 "\n\n(fn DO &rest ARGS)"] cadr #[385 "\300\301\302$\207" [gv--defsetter cadr #[514 "\300\301DE\207" [setcar cdr] 5 "\n\n(fn VAL X)"]] 7 "\n\n(fn DO &rest ARGS)"] cdar #[385 "\300\301\302$\207" [gv--defsetter cdar #[514 "\300\301DE\207" [setcdr car] 5 "\n\n(fn VAL X)"]] 7 "\n\n(fn DO &rest ARGS)"] cddr #[385 "\300\301\302$\207" [gv--defsetter cddr #[514 "\300\301DE\207" [setcdr cdr] 5 "\n\n(fn VAL X)"]] 7 "\n\n(fn DO &rest ARGS)"] elt #[385 "\300\301\302$\207" [gv--defsetter elt #[771 "\300\301D\302\303EE\304FF\207" [if listp setcar nthcdr aset] 10 "\n\n(fn STORE SEQ N)"]] 7 "\n\n(fn DO &rest ARGS)"] get #[385 "\300\301\302$\207" [gv--defsetter get #[385 "\300\301C\"B\207" [put append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] gethash #[385 "\300\301\302$\207" [gv--defsetter gethash #[1027 "\300F\207" [puthash] 8 "\n\n(fn VAL K H &optional D)"]] 7 "\n\n(fn DO &rest ARGS)"] nth #[771 "\300E\301!\203 \211\202 \302\303!\304D\305\306\307\310\311!\312\"\313\314%\"=\203- \211\2024 \315DC\"\207" [nthcdr macroexp-const-p make-symbol "c" car make-byte-code 257 "\301\300E\207" vconcat vector [setcar] 4 "\n\n(fn V)" macroexp-let*] 13 "\n\n(fn DO IDX LIST)"] symbol-function #[385 "\300\301\302$\207" [gv--defsetter symbol-function #[385 "\300\301C\"B\207" [fset append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] symbol-plist #[385 "\300\301\302$\207" [gv--defsetter symbol-plist #[385 "\300\301C\"B\207" [setplist append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] symbol-value #[385 "\300\301\302$\207" [gv--defsetter symbol-value #[385 "\300\301C\"B\207" [set append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] nthcdr #[771 "\300!\203 \211\202 \301\302!\303\304\305\306\307\310\"\311\"\312\313%\"=\203* \211\2021 \314DC\"\207" [macroexp-const-p make-symbol "idx" gv-get make-byte-code 514 "\300\302\301E\303\304\305\306\307\301 #\310\"\311\312%\"\207" vconcat vector [nthcdr make-byte-code 257 "\303\304\300\305BB\302!\306\307\310\300D\301EEF\207" vconcat vector [if <= (0) setcdr nthcdr 1-] 8 "\n\n(fn V)"] 12 "\n\n(fn GETTER SETTER)" macroexp-let*] 14 "\n\n(fn DO N PLACE)"] default-value #[385 "\300\301\302$\207" [gv--defsetter default-value #[385 "\300\301C\"B\207" [set-default append] 6 "\n\n(fn VAL &rest ARGS)"]] 7 "\n\n(fn DO &rest ARGS)"] frame-parameter #[385 "\300\301\302$\207" [gv--defsetter frame-parameter #[385 "\300!\203 \211\202 \301\302!\303\304\305C\"BE=\203\"