;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require cl-lib subr-x] 2) #@21 deferred.el version (defvar deferred:version nil (#$ . 154)) (byte-code "\301\302\207" [deferred:version "0.5.0" nil] 1) #@49 [internal] Anaphoric AND. (fn TEST &rest REST) (defalias 'deferred:aand '(macro . #[385 "\300\301DC\302\301\203\303B\202\301EE\207" [let it if deferred:aand] 8 (#$ . 282)])) (put 'deferred:aand 'edebug-form-spec '("test" form &rest form)) #@74 Anaphoric function chain macro for deferred chains. (fn &rest ELEMENTS) (defalias 'deferred:$ '(macro . #[128 "\300\301\302\303\211:\203@\262\304\305EB\262A\262\202\211\237\266\203\306\"BB\207" [let (it) append nil setq it (it)] 10 (#$ . 535)])) (put 'deferred:$ 'edebug-form-spec '(&rest form)) #@66 Anaphoric lambda macro for self recursion. (fn ARGS &rest BODY) (defalias 'deferred:lambda '(macro . #[385 "G\300S\211\262\301Y\203\302 B\262\202\211\237\266\202\303\304\305\306\307\303  BBE\310\307BBFE\207" [nil 0 cl-gensym lambda let (self) setq self funcall] 12 (#$ . 851)])) (put 'deferred:lambda 'edebug-form-spec '("args" form &rest form)) #@238 Try-catch-finally macro. This macro simulates the try-catch-finally block asynchronously. CATCH and FINALLY can be nil. Because of asynchrony, this macro does not ensure that the task FINALLY should be called. (fn D &key CATCH FINALLY) (defalias 'deferred:try '(macro . #[385 "\300\301\"A@\300\302\"A@\211\2037\211@\303>\203 \211AA\262\202 \304>A@\203.\305\262\202 \306\307@\"\210\202 \210\205A\310\311EC\203O\312\313\311EC\"\262\314BB\207" [plist-member :catch :finally (:catch :finally :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:catch :finally)" deferred:error it append deferred:watch deferred:$] 10 (#$ . 1219)])) #@87 [internal] Timer function that emulates the `setTimeout' function in JS. (fn F MSEC) (defalias 'deferred:setTimeout #[514 "\300\301\245\302#\207" [run-at-time 1000.0 nil] 6 (#$ . 1905)]) #@99 [internal] Timer cancellation function that emulates the `cancelTimeout' function in JS. (fn ID) (defalias 'deferred:cancelTimeout #[257 "\300!\207" [cancel-timer] 3 (#$ . 2101)]) #@66 [internal] Wrapper function for run-with-idle-timer. (fn SEC F) (defalias 'deferred:run-with-idle-timer #[514 "\300\301#\207" [run-with-idle-timer nil] 6 (#$ . 2289)]) #@143 [internal] Call a function with one or zero argument safely. The lambda function can define with zero and one argument. (fn F &optional ARG) (defalias 'deferred:call-lambda #[513 "\3001 !0\207\301\302\303#\210\3041 0\207\210\305\306A\"\207" ['wrong-number-of-arguments display-warning deferred "Callback that takes no argument may be specified.\nPassing callback with no argument is deprecated.\nCallback must take one argument.\nOr, this error is coming from somewhere inside of the callback: %S" 'wrong-number-of-arguments signal wrong-number-of-arguments] 7 (#$ . 2467)]) #@22 Debug output switch. (defvar deferred:debug nil (#$ . 3057)) #@34 [internal] Debug output counter. (defvar deferred:debug-count 0 (#$ . 3124)) #@49 [internal] Debug log function. (fn &rest ARGS) (defalias 'deferred:message '(macro . #[128 "\205\301\302\303\304\305\306\307\310\311\307\nBFDEE\312BB\207" [deferred:debug progn with-current-buffer (get-buffer-create "*deferred:debug*") save-excursion (goto-char (point-max)) insert format "%5i %s\n" deferred:debug-count ((cl-incf deferred:debug-count))] 12 (#$ . 3207)])) #@32 [internal] Debug log function. (defalias 'deferred:message-mark #[0 "\300\207" [nil] 1 (#$ . 3591) nil]) #@10 (fn D) (defalias 'deferred:pp #[257 "\300\301!\210\302\303\304\"\262\305\306\"\262\303\307\"\207" [require pp nil deferred:nextc #[257 "\300\301\"\207" [pp-display-expression "*deferred:pp*"] 4 "\n\n(fn X)"] deferred:error #[257 "\300\301\"\207" [pp-display-expression "*deferred:pp*"] 4 "\n\n(fn E)"] #[257 "\300\301!\207" [pop-to-buffer "*deferred:pp*"] 3 "\n\n(fn X)"]] 5 (#$ . 3702)]) #@201 If non nil, the value `debug-on-signal' is substituted this value in the `condition-case' form in deferred implementations. Then, Emacs debugger can catch an error occurred in the asynchronous tasks. (defvar deferred:debug-on-signal nil (#$ . 4107)) #@123 [internal] Custom condition-case. See the comment for `deferred:debug-on-signal'. (fn VAR PROTECTED-FORM &rest HANDLERS) (defalias 'deferred:condition-case '(macro . #[642 "\300\301\302BBBE\207" [let ((debug-on-signal (or debug-on-signal deferred:debug-on-signal))) condition-case] 9 (#$ . 4364)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put deferred:condition-case edebug-form-spec condition-case function-put lisp-indent-function 2] 4) #@240 Waiting time between asynchronous tasks (second). The shorter waiting time increases the load of Emacs. The end user can tune this parameter. However, applications should not modify it because the applications run on various environments. (defvar deferred:tick-time 0.001 (#$ . 4835)) #@115 [internal] The execution queue of deferred objects. See the functions `deferred:post-task' and `deferred:worker'. (defvar deferred:queue nil (#$ . 5127)) #@14 (fn A B C) (defalias 'deferred:pack '(macro . #[771 "\300\300EE\207" [cons] 8 (#$ . 5287)])) #@71 [internal] Schedule consuming a deferred task in the execution queue. (defalias 'deferred:schedule-worker #[0 "\301\302\303#\207" [deferred:tick-time run-at-time nil deferred:worker] 4 (#$ . 5391)]) #@245 [internal] Add a deferred object to the execution queue `deferred:queue' and schedule to execute. D is a deferred object. WHICH is a symbol, `ok' or `ng'. ARG is an argument value for execution of the deferred task. (fn D WHICH &optional ARG) (defalias 'deferred:post-task #[770 "BBB\301 \210\207" [deferred:queue deferred:schedule-worker] 6 (#$ . 5598)]) #@52 Clear the execution queue. For test and debugging. (defalias 'deferred:clear-queue #[0 "\301\211\207" [deferred:queue nil] 2 (#$ . 5967) nil]) #@93 [internal] Consume a deferred task. Mainly this function is called by timer asynchronously. (defalias 'deferred:worker #[0 "\205.\301!@\211@A@AA\302\303!\3041&\305#\211\2620\210\202,\306\307\"\266\266\204\207" [deferred:queue last nil nbutlast (error) deferred:exec-task message "deferred error : %s"] 9 (#$ . 6117)]) #@64 Call all deferred tasks synchronously. For test and debugging. (defalias 'deferred:flush-queue! #[0 "\301\203\f\302 \262\202\207" [deferred:queue nil deferred:worker] 2 (#$ . 6456)]) #@131 Wait for the given deferred task. For test and debugging. Error is raised if it is not processed within deferred chain D. (fn D) (defalias 'deferred:sync! #[257 "\300C\301C\301\302\303\304\"\"\262\305\303\306\"\"\266\242\300=\203/\211\242\204/\307\310!\210\311\310!\210\202\211\242\2039\312\242!\210\242\207" [deferred:undefined* nil deferred:nextc make-closure #[257 "\300\240\207" [V0] 3 "\n\n(fn X)"] deferred:error #[257 "\300\240\207" [V0] 3 "\n\n(fn ERR)"] sit-for 0.05 sleep-for deferred:resignal] 9 (#$ . 6651)]) #@67 compiler-macro for inlining `deferred-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-p (and (memq (type-of cl-x) cl-struct-deferred-tags) t)) nil] 9 (#$ . 7196)]) (put 'deferred-p 'compiler-macro 'deferred-p--cmacro) #@13 (fn CL-X) (defalias 'deferred-p #[257 "\301!>\205 \302\207" [cl-struct-deferred-tags type-of t] 3 (#$ . 7518)]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put deferred-p side-effect-free error-free put deferred cl-deftype-satisfies] 5) #@74 compiler-macro for inlining `deferred-callback'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-callback--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-callback (progn (or (deferred-p cl-x) (signal 'wrong-type-argument (list 'deferred cl-x))) (aref cl-x 1))) nil] 9 (#$ . 7784)]) (put 'deferred-callback 'compiler-macro 'deferred-callback--cmacro) #@62 Access slot "callback" of `deferred' struct CL-X. (fn CL-X) (defalias 'deferred-callback #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 1] 5 (#$ . 8184)]) (byte-code "\300\301\302\303#\300\207" [function-put deferred-callback side-effect-free t] 4) #@75 compiler-macro for inlining `deferred-errorback'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-errorback--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-errorback (progn (or (deferred-p cl-x) (signal 'wrong-type-argument (list 'deferred cl-x))) (aref cl-x 2))) nil] 9 (#$ . 8518)]) (put 'deferred-errorback 'compiler-macro 'deferred-errorback--cmacro) #@63 Access slot "errorback" of `deferred' struct CL-X. (fn CL-X) (defalias 'deferred-errorback #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 2] 5 (#$ . 8923)]) (byte-code "\300\301\302\303#\300\207" [function-put deferred-errorback side-effect-free t] 4) #@72 compiler-macro for inlining `deferred-cancel'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-cancel--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-cancel (progn (or (deferred-p cl-x) (signal 'wrong-type-argument (list 'deferred cl-x))) (aref cl-x 3))) nil] 9 (#$ . 9260)]) (put 'deferred-cancel 'compiler-macro 'deferred-cancel--cmacro) #@60 Access slot "cancel" of `deferred' struct CL-X. (fn CL-X) (defalias 'deferred-cancel #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 3] 5 (#$ . 9650)]) (byte-code "\300\301\302\303#\300\207" [function-put deferred-cancel side-effect-free t] 4) #@70 compiler-macro for inlining `deferred-next'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-next--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-next (progn (or (deferred-p cl-x) (signal 'wrong-type-argument (list 'deferred cl-x))) (aref cl-x 4))) nil] 9 (#$ . 9978)]) (put 'deferred-next 'compiler-macro 'deferred-next--cmacro) #@58 Access slot "next" of `deferred' struct CL-X. (fn CL-X) (defalias 'deferred-next #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 4] 5 (#$ . 10358)]) (byte-code "\300\301\302\303#\300\207" [function-put deferred-next side-effect-free t] 4) #@72 compiler-macro for inlining `deferred-status'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-status--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-status (progn (or (deferred-p cl-x) (signal 'wrong-type-argument (list 'deferred cl-x))) (aref cl-x 5))) nil] 9 (#$ . 10681)]) (put 'deferred-status 'compiler-macro 'deferred-status--cmacro) #@60 Access slot "status" of `deferred' struct CL-X. (fn CL-X) (defalias 'deferred-status #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 5] 5 (#$ . 11072)]) (byte-code "\300\301\302\303#\300\207" [function-put deferred-status side-effect-free t] 4) #@71 compiler-macro for inlining `deferred-value'. (fn CL-WHOLE-ARG CL-X) (defalias 'deferred-value--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block deferred-value (progn (or (deferred-p cl-x) (signal 'wrong-type-argument (list 'deferred cl-x))) (aref cl-x 6))) nil] 9 (#$ . 11401)]) (put 'deferred-value 'compiler-macro 'deferred-value--cmacro) #@59 Access slot "value" of `deferred' struct CL-X. (fn CL-X) (defalias 'deferred-value #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 6] 5 (#$ . 11787)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put deferred-value side-effect-free t defalias copy-deferred copy-sequence] 4) #@120 compiler-macro for inlining `make-deferred'. (fn CL-WHOLE &cl-quote &key CALLBACK ERRORBACK CANCEL NEXT STATUS VALUE) (defalias 'make-deferred--cmacro #[385 "\300\301\"\206\302A@\300\303\"\206\304A@\300\305\"\206\306A@\300\307\"A@\300\310\"A@\300\311\"A@\211\203^\211@\312>\203F\211AA\262\2023\313>A@\203U\314\262\2023\315\316@\"\210\2023\210\317\320\321\314 \314      & \207" [plist-member :callback (nil 'deferred:default-callback) :errorback (nil 'deferred:default-errorback) :cancel (nil 'deferred:default-cancel) :next :status :value (:callback :errorback :cancel :next :status :value :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:callback :errorback :cancel :next :status :value)" cl--defsubst-expand (callback errorback cancel next status value) (cl-block make-deferred (record 'deferred callback errorback cancel next status value))] 20 (#$ . 12161)]) (put 'make-deferred 'compiler-macro 'make-deferred--cmacro) #@100 Constructor for objects of type `deferred'. (fn &key CALLBACK ERRORBACK CANCEL NEXT STATUS VALUE) (defalias 'make-deferred #[128 "\300\301\"\206\302A@\300\303\"\206\304A@\300\305\"\206\306A@\300\307\"A@\300\310\"A@\300\311\"A@\211\203^\211@\312>\203F\211AA\262\2023\313>A@\203U\314\262\2023\315\316@\"\210\2023\210\317\320&\207" [plist-member :callback (nil deferred:default-callback) :errorback (nil deferred:default-errorback) :cancel (nil deferred:default-cancel) :next :status :value (:callback :errorback :cancel :next :status :value :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:callback :errorback :cancel :next :status :value)" record deferred] 15 (#$ . 13157)]) (byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303& \207" [function-put make-deferred side-effect-free t cl-struct-define deferred nil cl-structure-object record ((cl-tag-slot) (callback 'deferred:default-callback) (errorback 'deferred:default-errorback) (cancel 'deferred:default-cancel) (next) (status) (value)) cl-struct-deferred-tags] 11) #@47 [internal] Default callback function. (fn I) (defalias 'deferred:default-callback #[257 "\207" [] 2 (#$ . 14271)]) #@50 [internal] Default errorback function. (fn ERR) (defalias 'deferred:default-errorback #[257 "\300!\207" [deferred:resignal] 3 (#$ . 14393)]) #@346 [internal] Safely resignal ERR as an Emacs condition. If ERR is a cons (ERROR-SYMBOL . DATA) where ERROR-SYMBOL has an `error-conditions' property, it is re-signaled unchanged. If ERR is a string, it is signaled as a generic error using `error'. Otherwise, ERR is formatted into a string as if by `print' before raising with `error'. (fn ERR) (defalias 'deferred:resignal #[257 "\211<\203\211@9\203\211@\300N\203\301@A\"\207\211;\203#\302\303\"\207\302\304\"\207" [error-conditions signal error "%s" "%S"] 4 (#$ . 14543)]) #@48 [internal] Default canceling function. (fn D) (defalias 'deferred:default-cancel #[257 "\301!>\204\302\303\304D\"\210\211\211\305\306I\266\301!>\204%\302\303\304D\"\210\211\211\307\310I\266\301!>\204;\302\303\304D\"\210\211\211\311\312I\266\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 1 deferred:default-callback 2 deferred:default-errorback 4 nil] 5 (#$ . 15085)]) #@104 Default error handler. This value is nil or a function that have one argument for the error message. (defvar deferred:onerror nil (#$ . 15505)) #@323 [internal] Executing deferred task. If the deferred object has next deferred task or the return value is a deferred object, this function adds the task to the execution queue. D is a deferred object. WHICH is a symbol, `ok' or `ng'. ARG is an argument value for execution of the deferred task. (fn D WHICH &optional ARG) (defalias 'deferred:exec-task #[770 "\204\304\305!\210\306=\203#\307!>\204\310\311\312D\"\210\313H\2025\307!>\2042\310\311\312D\"\210\314H\307!>\204E\310\311\312D\"\210\315H\203 \206Q\n\3161\264\317\"\307!>\203q\203m\320\"\202\256\211\202\256\203}\321\306#\202\256\307!>\204\216\310\311\312D\"\210\211\322\306I\266\307!>\204\246\310\311\312D\"\210\211\323I\266\211\2620\202\203\300\321\324#\202 \203\313\317 \"\202\325\326\"\210\307!>\204\341\310\311\312D\"\210\211\322\324I\266\307!>\204\371\310\311\312D\"\210\211\323I\266\211\262)\207\211\203\327#\207\306=\203\207\330!\207" [cl-struct-deferred-tags debug-on-signal deferred:debug-on-signal deferred:onerror error "deferred:exec-task was given a nil." ok type-of signal wrong-type-argument deferred 1 2 4 (error) deferred:call-lambda deferred:set-next deferred:post-task 5 6 ng message "deferred error : %S" deferred:exec-task deferred:resignal] 10 (#$ . 15658)]) #@54 [internal] Connect deferred objects. (fn PREV NEXT) (defalias 'deferred:set-next #[514 "\301!>\204\302\303\304D\"\210\211\305I\266\301!>\204%\302\303\304D\"\210\306H\307=\203e\301!>\204<\302\303\304D\"\210\211\306\310I\266\311\307\301!>\204V\302\303\304D\"\210\312H#\301!>\203c\207\207\301!>\204t\302\303\304D\"\210\306H\313=\203\264\301!>\204\213\302\303\304D\"\210\211\306\310I\266\311\313\301!>\204\245\302\303\304D\"\210\312H#\301!>\203\262\207\207\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 4 5 ok nil deferred:exec-task 6 ng] 9 (#$ . 17007)]) #@52 Create a deferred object. (fn &optional CALLBACK) (defalias 'deferred:new #[256 "\211\203\300\301\302\303\304\211\211&\207\300\301\305\302\303\304\211\211&\207" [record deferred deferred:default-errorback deferred:default-cancel nil deferred:default-callback] 9 (#$ . 17648)]) #@69 Start deferred chain with a callback message. (fn D &optional ARG) (defalias 'deferred:callback #[513 "\300\301#\207" [deferred:exec-task ok] 6 (#$ . 17937)]) #@71 Start deferred chain with an errorback message. (fn D &optional ARG) (defalias 'deferred:errorback #[513 "\300\301#\207" [deferred:exec-task ng] 6 (#$ . 18105)]) #@71 Add the deferred object to the execution queue. (fn D &optional ARG) (defalias 'deferred:callback-post #[513 "\300\301#\207" [deferred:post-task ok] 6 (#$ . 18276)]) #@71 Add the deferred object to the execution queue. (fn D &optional ARG) (defalias 'deferred:errorback-post #[513 "\300\301#\207" [deferred:post-task ng] 6 (#$ . 18451)]) #@73 Cancel all callbacks and deferred chain in the deferred object. (fn D) (defalias 'deferred:cancel #[257 "\301!>\204\302\303\304D\"\210\211\305H!\210\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 3] 5 (#$ . 18627)]) #@273 Return a current status of the deferred object. The returned value means following: `ok': the callback was called and waiting for next deferred. `ng': the errorback was called and waiting for next deferred. nil: The neither callback nor errorback was not called. (fn D) (defalias 'deferred:status #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-deferred-tags type-of signal wrong-type-argument deferred 5] 5 (#$ . 18884)]) #@59 Create a synchronous deferred object. (fn &optional ARG) (defalias 'deferred:succeed #[256 "\300 \301\302#\210\207" [deferred:new deferred:exec-task ok] 6 (#$ . 19334)]) #@59 Create a synchronous deferred object. (fn &optional ARG) (defalias 'deferred:fail #[256 "\300 \301\302#\210\207" [deferred:new deferred:exec-task ng] 6 (#$ . 19513)]) #@178 Create a deferred object and schedule executing. This function is a short cut of following code: (deferred:callback-post (deferred:new callback)). (fn &optional CALLBACK ARG) (defalias 'deferred:next #[512 "\203\300\301\302\303\304\211\211&\202\300\301\305\302\303\304\211\211&\306\"\210\207" [record deferred deferred:default-errorback deferred:default-cancel nil deferred:default-callback deferred:callback-post] 10 (#$ . 19690)]) #@105 Create a deferred object with OK callback and connect it to the given deferred object. (fn D CALLBACK) (defalias 'deferred:nextc #[514 "\300\301\302\303\304\211\211&\305\"\207" [record deferred deferred:default-errorback deferred:default-cancel nil deferred:set-next] 10 (#$ . 20142)]) #@103 Create a deferred object with errorback and connect it to the given deferred object. (fn D CALLBACK) (defalias 'deferred:error #[514 "\300\301\302\303\304\211\211&\305\"\207" [record deferred deferred:default-callback deferred:default-cancel nil deferred:set-next] 10 (#$ . 20440)]) #@309 Create a deferred object with watch task and connect it to the given deferred object. The watch task CALLBACK can not affect deferred chains with return values. This function is used in following purposes, simulation of try-finally block in asynchronous tasks, progress monitoring of tasks. (fn D CALLBACK) (defalias 'deferred:watch #[514 "\211\300\301\"\300\302\"\303\304\305\306\211\211&\307\"\207" [make-closure #[257 "\3011 \302\300\"0\210\207\210\207" [V0 (error) deferred:call-lambda] 4 "\n\n(fn X)"] #[257 "\3011 \302\300\"0\210\202\210\303!\207" [V0 (error) deferred:call-lambda deferred:resignal] 4 "\n\n(fn E)"] record deferred deferred:default-cancel nil deferred:set-next] 13 (#$ . 20735)]) #@74 Return a deferred object scheduled at MSEC millisecond later. (fn MSEC) (defalias 'deferred:wait #[257 "\301 \302 \303C\211\304\305\306#\"\240\210\307!>\204#\310\311\312D\"\210\211\313\305\314\"I\266\207" [cl-struct-deferred-tags deferred:new float-time nil deferred:setTimeout make-closure #[0 "\302\300\303\304\305 \301Z_#\210\306\207" [V0 V1 deferred:exec-task ok 1000.0 float-time nil] 6] type-of signal wrong-type-argument deferred 3 #[257 "\301\300\242!\210\302!\207" [V0 deferred:cancelTimeout deferred:default-cancel] 3 "\n\n(fn X)"]] 10 (#$ . 21460)]) #@99 Return a deferred object which will run when Emacs has been idle for MSEC millisecond. (fn MSEC) (defalias 'deferred:wait-idle #[257 "\301 \302 \303C\211\304\305\245\306\307#\"\240\210\310!>\204$\311\312\313D\"\210\211\314\306\315\"I\266\207" [cl-struct-deferred-tags deferred:new float-time nil deferred:run-with-idle-timer 1000.0 make-closure #[0 "\302\300\303\304\305 \301Z_#\210\306\207" [V0 V1 deferred:exec-task ok 1000.0 float-time nil] 6] type-of signal wrong-type-argument deferred 3 #[257 "\301\300\242!\210\302!\207" [V0 deferred:cancelTimeout deferred:default-cancel] 3 "\n\n(fn X)"]] 11 (#$ . 22043)]) #@60 Call the given function asynchronously. (fn F &rest ARGS) (defalias 'deferred:call #[385 "\300\301\302#!\207" [deferred:next make-closure #[257 "\302\300\301\"\207" [V0 V1 apply] 4 "\n\n(fn X)"]] 7 (#$ . 22679)]) #@64 Call the given function asynchronously. (fn F &optional ARGS) (defalias 'deferred:apply #[513 "\300\301\302#!\207" [deferred:next make-closure #[257 "\302\300\301\"\207" [V0 V1 apply] 4 "\n\n(fn X)"]] 7 (#$ . 22901)]) #@89 [internal] Return non-nil if TIMES-OR-SEQ is the number zero or nil. (fn TIMES-OR-SEQ) (defalias 'deferred:empty-p #[257 "\211\247\203 \211\300X\206\301!\205\211G\300U\207" [0 sequencep] 3 (#$ . 23128)]) #@61 Return a iteration deferred object. (fn TIMES-OR-SEQ FUNC) (defalias 'deferred:loop #[514 "\301!\203 \302 \207\303C\247\203;\304\302 W\2036\242B\240\210\305\306\307 #\"\262\262T\262\202\266\202\202o\310!\205o\311\303\"\303\302 :\203m@\262\242B\240\210\305\306\312 #\"\262\262A\262\202H\266\202\313!>\204~\314\315\316D\"\210\211\211\317\306\320\"I\266\207" [cl-struct-deferred-tags deferred:empty-p deferred:next nil 0 deferred:nextc make-closure #[257 "\302\300\301\"\207" [V0 V1 deferred:call-lambda] 4 "\n\n(fn X)"] sequencep append #[257 "\302\300\301\"\207" [V0 V1 deferred:call-lambda] 4 "\n\n(fn X)"] type-of signal wrong-type-argument deferred 3 #[257 "\301!\210\300\242\302:\203@\262\303!\210A\262\202\302\207" [V0 deferred:default-cancel nil deferred:cancel] 5 "\n\n(fn X)"]] 13 (#$ . 23345)]) #@104 [internal] Check the argument values and dispatch to methods. (fn ARGS SELF-FUNC LIST-FUNC MAIN-FUNC) (defalias 'deferred:trans-multi-args #[1028 "G\301U\203k@:\203k\302@!\204k@\211\203\211@\204\"\303 \207\211\211\205E\211@\211\205C\302!\206<\304!>\205<\305\211\205A\211\262\262\262\203N!\207\211\211\205\\\211:\211\205Z\211\262\262\203e!\207\306\307\"\207!\207" [cl-struct-deferred-tags 1 functionp deferred:next type-of t error "Wrong argument type. %s"] 9 (#$ . 24215)]) #@50 [internal] Translation array to alist. (fn LST) (defalias 'deferred:parallel-array-to-alist #[257 "\211\300\301G\300:\203'@\262W\203'BB\262A\262T\262\202\211\237\207" [nil 0] 8 (#$ . 24731)]) #@51 [internal] Translation alist to array. (fn ALST) (defalias 'deferred:parallel-alist-to-array #[257 "\300\301\"\302\211:\203@\262AB\262A\262\202\211\237\207" [sort #[514 "@@W\207" [] 4 "\n\n(fn X Y)"] nil] 6 (#$ . 24948)]) #@73 [internal] Normalization for parallel and earlier arguments. (fn ALST) (defalias 'deferred:parallel-func-to-deferred #[257 "\211\301\211\211\211:\2031@\262A\262\302!>\204\"\211\303!\241\266B\262A\262\301\262\202\237\207" [cl-struct-deferred-tags nil type-of deferred:next] 10 (#$ . 25192)]) #@79 [internal] Deferred alist implementation for `deferred:parallel'. (fn ALST) (defalias 'deferred:parallel-main #[257 "\300 G\301C\302!\301\211:\203>@\262@\303A\304\305\n\n\n%\"\262\306\304\307\n\n\n%\"\266A\262\202 \266\207" [deferred:new nil deferred:parallel-func-to-deferred deferred:nextc make-closure #[257 "\302\303B\302\242B\240\210\301\302\242GU\203\304\300\305\302\242\237#\210\306\207" [V0 V1 V2 V3 deferred:post-task ok nil] 5 "\n\n(fn X)"] deferred:error #[257 "\302\303B\302\242B\240\210\302\242G\301U\203\304\300\305\302\242\237#\210\306\207" [V0 V1 V2 V3 deferred:post-task ok nil] 5 "\n\n(fn E)"]] 16 (#$ . 25511)]) #@77 [internal] Deferred list implementation for `deferred:parallel'. (fn LST) (defalias 'deferred:parallel-list #[257 "\301\302!!\303\304\"\305!>\204\306\307\310D\"\210\211\211\311\312\313\"I\266\207" [cl-struct-deferred-tags deferred:parallel-main deferred:parallel-array-to-alist deferred:nextc deferred:parallel-alist-to-array type-of signal wrong-type-argument deferred 3 make-closure #[257 "\301!\210\302\300!\207" [V0 deferred:default-cancel deferred:cancel] 3 "\n\n(fn X)"]] 9 (#$ . 26182)]) #@274 Return a deferred object that calls given deferred objects or functions in parallel and wait for all callbacks. The following deferred task will be called with an array of the return values. ARGS can be a list or an alist of deferred objects or functions. (fn &rest ARGS) (defalias 'deferred:parallel #[128 "\300\301\302\303$\207" [deferred:trans-multi-args deferred:parallel deferred:parallel-list deferred:parallel-main] 6 (#$ . 26697)]) #@78 [internal] Deferred alist implementation for `deferred:earlier'. (fn ALST) (defalias 'deferred:earlier-main #[257 "\300 G\301C\301C\302!\301\211:\203F@\262@\303A\304\305    &\"\262\306\304\307    &\"\266A\262\202 \266\207" [deferred:new nil deferred:parallel-func-to-deferred deferred:nextc make-closure #[257 "\303\304B\303\242B\240\210\302\242\204\302\304B\240\210\305\300\306\302\242#\210\202\"\303\242G\210\307\207" [V0 V1 V2 V3 V4 deferred:post-task ok nil] 5 "\n\n(fn X)"] deferred:error #[257 "\303\304B\303\242B\240\210\305\303\242G\301\"\203\302\242\204\306\300\307\310#\210\310\207" [V0 V1 V2 V3 V4 eql deferred:post-task ok nil] 5 "\n\n(fn E)"]] 18 (#$ . 27145)]) #@76 [internal] Deferred list implementation for `deferred:earlier'. (fn LST) (defalias 'deferred:earlier-list #[257 "\301\302!!\303\304\"\305!>\204\306\307\310D\"\210\211\211\311\312\313\"I\266\207" [cl-struct-deferred-tags deferred:earlier-main deferred:parallel-array-to-alist deferred:nextc #[257 "\211A\207" [] 2 "\n\n(fn X)"] type-of signal wrong-type-argument deferred 3 make-closure #[257 "\301!\210\302\300!\207" [V0 deferred:default-cancel deferred:cancel] 3 "\n\n(fn X)"]] 9 (#$ . 27868)]) #@272 Return a deferred object that calls given deferred objects or functions in parallel and wait for the first callback. The following deferred task will be called with the first return value. ARGS can be a list or an alist of deferred objects or functions. (fn &rest ARGS) (defalias 'deferred:earlier #[128 "\300\301\302\303$\207" [deferred:trans-multi-args deferred:earlier deferred:earlier-list deferred:earlier-main] 6 (#$ . 28384)]) #@201 Time out macro on a deferred task D. If the deferred task D does not complete within TIMEOUT-MSEC, this macro cancels the deferred task and return the TIMEOUT-FORM. (fn TIMEOUT-MSEC TIMEOUT-FORM D) (defalias 'deferred:timeout '(macro . #[771 "\300\301\302D\303\304EEE\207" [deferred:earlier deferred:nextc deferred:wait lambda (x)] 9 (#$ . 28827)])) #@81 [internal] Sequence number for some utilities. See the function `deferred:uid'. (defvar deferred:uid 0 (#$ . 29189)) #@40 [internal] Generate a sequence number. (defalias 'deferred:uid #[0 "T\211\207" [deferred:uid] 2 (#$ . 29312)]) #@85 [internal] Return a string in the buffer with the given format. (fn STRFORMAT BUF) (defalias 'deferred:buffer-string #[514 "\300rq\210\301 )\"\207" [format buffer-string] 5 (#$ . 29431)]) #@294 A deferred wrapper of `start-process'. Return a deferred object. The process name and buffer name of the argument of the `start-process' are generated by this function automatically. The next deferred object receives stdout and stderr string from the command process. (fn COMMAND &rest ARGS) (defalias 'deferred:process #[385 "\300\301#\207" [deferred:process-gen start-process] 6 (#$ . 29629)]) #@322 A deferred wrapper of `start-process-shell-command'. Return a deferred object. The process name and buffer name of the argument of the `start-process-shell-command' are generated by this function automatically. The next deferred object receives stdout and stderr string from the command process. (fn COMMAND &rest ARGS) (defalias 'deferred:process-shell #[385 "\300\301#\207" [deferred:process-gen start-process-shell-command] 6 (#$ . 30035)]) #@294 A deferred wrapper of `start-process'. Return a deferred object. The process name and buffer name of the argument of the `start-process' are generated by this function automatically. The next deferred object receives stdout and stderr buffer from the command process. (fn COMMAND &rest ARGS) (defalias 'deferred:process-buffer #[385 "\300\301#\207" [deferred:process-buffer-gen start-process] 6 (#$ . 30489)]) #@322 A deferred wrapper of `start-process-shell-command'. Return a deferred object. The process name and buffer name of the argument of the `start-process-shell-command' are generated by this function automatically. The next deferred object receives stdout and stderr buffer from the command process. (fn COMMAND &rest ARGS) (defalias 'deferred:process-shell-buffer #[385 "\300\301#\207" [deferred:process-buffer-gen start-process-shell-command] 6 (#$ . 30909)]) #@33 [internal] (fn F COMMAND ARGS) (defalias 'deferred:process-gen #[771 "\301#\302C\211\303\304\"\240\210\305\242!>\204\306\307\310\242D\"\210\211\242\211\311\312\313#I\266\211\242\207" [cl-struct-deferred-tags deferred:process-buffer-gen nil deferred:nextc #[257 "r\211q\210\300 )\301!\210\207" [buffer-string kill-buffer] 4 "\n\n(fn BUF)"] type-of signal wrong-type-argument deferred 3 make-closure #[257 "\302\301\242!\210\302\300!\207" [V0 V1 deferred:default-cancel] 3 "\n\n(fn X)"]] 12 (#$ . 31376)]) #@33 [internal] (fn F COMMAND ARGS) (defalias 'deferred:process-buffer-gen #[771 "\303 \304 \305\306#\305\307# \n\310 \311C\311C\312\n\313\314&\f\"\210\207" [default-directory process-environment process-connection-type deferred:next deferred:uid format "*deferred:*%s*:%s" " *deferred:*%s*:%s" deferred:new nil deferred:nextc make-closure #[257 "\311\313\304!\240\210\3141V\305\306\307\312\302@\204!\300\303\304\301#\202(\315\300\303\304\301\302%\240\210\316\312\242\317\320\301\310\311$\"\210\321\310!>\204E\322\323\324\310D\"\210\310\211\325\317\326\311\312#I\262+0\210\202]\327\310\330#\266\331\207" [V0 V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 get-buffer-create (error) apply set-process-sentinel make-closure #[514 "\303!?\205E\304!\305U\203\306\301\307\302\242#\207\310\311\300\312!\304!\313!\314\302\242!\2036r\302\242q\210\315 )\2027\316&\317\302\242!\210\306\301\320#\262\207" [V0 V1 V2 process-live-p process-exit-status 0 deferred:post-task ok format "Deferred process exited abnormally:\n command: %s\n exit status: %s %s\n event: %s\n buffer contents: %S" process-status string-trim-right buffer-live-p buffer-string "(unavailable)" kill-buffer ng] 10 "\n\n(fn PROC EVENT)"] type-of signal wrong-type-argument deferred 3 #[257 "\302!\210\301\242\205\303\301\242!\210\304\300\242!\207" [V0 V1 deferred:default-cancel kill-process kill-buffer] 3 "\n\n(fn X)"] deferred:post-task ng nil process-connection-type process-environment default-directory cl-struct-deferred-tags] 8 "\n\n(fn X)"]] 28 (#$ . 31902)]) #@65 Process chain of `deferred:process'. (fn D COMMAND &rest ARGS) (defalias 'deferred:processc '(macro . #[642 "\300\301\302 C\303BBEE\207" [deferred:nextc lambda cl-gensym deferred:process] 10 (#$ . 33482)])) #@72 Process chain of `deferred:process-buffer'. (fn D COMMAND &rest ARGS) (defalias 'deferred:process-bufferc '(macro . #[642 "\300\301\302 C\303BBEE\207" [deferred:nextc lambda cl-gensym deferred:process-buffer] 10 (#$ . 33701)])) #@65 Process chain of `deferred:process'. (fn D COMMAND &rest ARGS) (defalias 'deferred:process-shellc '(macro . #[642 "\300\301\302 C\303BBEE\207" [deferred:nextc lambda cl-gensym deferred:process-shell] 10 (#$ . 33941)])) #@72 Process chain of `deferred:process-buffer'. (fn D COMMAND &rest ARGS) (defalias 'deferred:process-shell-bufferc '(macro . #[642 "\300\301\302 C\303BBEE\207" [deferred:nextc lambda cl-gensym deferred:process-shell-buffer] 10 (#$ . 34172)])) (byte-code "\300\301\302\"\210\303\304!\207" [eval-after-load "url" #[0 "\300\301\302\303\304\"\"\210\301\305\306\"\210\301\307\310\"\210\301\311\312\"\210\301\313\314\"\210\301\315\316\"\210\301\317\320\"\207" [(url-request-data url-request-method url-request-extra-headers) defalias deferred:url-retrieve make-closure #[1025 "\302 \303C\304\305\300\"\306\307\310\300\n\n\n\n\n\n\n& !\210\311! >\204-\312\313\314D\"\210\211\315\307\316\"I\266\207" [V0 cl-struct-deferred-tags deferred:new nil mapcar #[257 "\211J\207" [] 2 "\n\n(fn SYMBOL)"] deferred:next make-closure #[257 "\300\307\310\311\301\302\303\304\305\306&\312\203'\211A\262\242\313\211A\262\242DDB\262\202 \314\315\237\316\313DDE!\207" [V0 V1 V2 V3 V4 V5 V6 V7 make-closure #[0 "\3061\305\307\300\310\311\304\305#\301\302\303%\2400\210\202\312\304\313#\266\314\207" [V0 V1 V2 V3 V4 V5 (error) url-retrieve make-closure #[257 "\302\300\303\301\242#\207" [V0 V1 deferred:post-task ok] 5 "\n\n(fn XX)"] deferred:post-task ng nil] 7] nil quote eval let funcall] 11 "\n\n(fn X)"] type-of signal wrong-type-argument deferred 3 #[257 "\301\300\242!\205 \302\300\242!\207" [V0 buffer-live-p kill-buffer] 3 "\n\n(fn X)"]] 18 "A wrapper function for url-retrieve. The next deferred\nobject receives the buffer object that URL will load\ninto. Values of dynamically bound 'url-request-data', 'url-request-method' and\n'url-request-extra-headers' are passed to url-retrieve call.\n\n(fn URL &optional CBARGS SILENT INHIBIT-COOKIES)"] deferred:url-delete-header #[257 "r\211q\210\300\301\"\211\203eT|\210\210)\207" [url-http-symbol-value-in-buffer url-http-end-of-headers] 4 "\n\n(fn BUF)"] deferred:url-delete-buffer #[257 "\211\203\300!\203\301!\210\302\207" [buffer-live-p kill-buffer nil] 3 "\n\n(fn BUF)"] deferred:url-get #[641 "\203\f\300\301!Q\262\302\303\304#\262\305\306\"\262\211\262\307\310\311!\"\210\207" ["?" deferred:url-param-serialize nil apply deferred:url-retrieve deferred:nextc deferred:url-delete-header deferred:set-next deferred:new deferred:url-delete-buffer] 8 "Perform a HTTP GET method with `url-retrieve'. PARAMS is\na parameter list of (key . value) or key. ARGS will be appended\nto deferred:url-retrieve args list. The next deferred\nobject receives the buffer object that URL will load into.\n\n(fn URL &optional PARAMS &rest ARGS)"] deferred:url-post #[641 "\303\304\305\"\306!\307\310\311#\262\312\313\"\262\211\262\314\315\316!\"\210\211\262+\207" [url-request-extra-headers url-request-data url-request-method "POST" append (("Content-Type" . "application/x-www-form-urlencoded")) deferred:url-param-serialize nil apply deferred:url-retrieve deferred:nextc deferred:url-delete-header deferred:set-next deferred:new deferred:url-delete-buffer] 8 "Perform a HTTP POST method with `url-retrieve'. PARAMS is\na parameter list of (key . value) or key. ARGS will be appended\nto deferred:url-retrieve args list. The next deferred\nobject receives the buffer object that URL will load into.\n\n(fn URL &optional PARAMS &rest ARGS)"] deferred:url-escape #[257 "\211;\204 \300\301\"\262\302\303\304\"!\207" [format "%s" url-hexify-string encode-coding-string utf-8] 5 "[internal] Return a new string that is VAL URI-encoded.\n\n(fn VAL)"] deferred:url-param-serialize #[257 "\211\2058\300\301\302\211:\2032@\262:\203$\303@!\304\303A!Q\202'\303!B\262A\262\202 \211\237\266\203\305#\207" [mapconcat identity nil deferred:url-escape "=" "&"] 10 "[internal] Serialize a list of (key . value) cons cells\ninto a query string.\n\n(fn PARAMS)"]] 6] provide deferred] 3)