mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 21067e7cbe6d7a0f65ff5c317a96b5c337b0b3d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; 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\302\303\304\305%\210\306\307\310\311\312DD\313\304\301\314\311&\207" [custom-declare-group async nil "Simple asynchronous processing in Emacs" :group emacs custom-declare-variable async-variables-noprops-function funcall function #[0 "\300\207" [async-variables-noprops] 1] "Default function to remove text properties in variables." :type] 8)
(defvar async-debug nil)
(defvar async-send-over-pipe t)
(defvar async-in-child-emacs nil)
(defvar async-callback nil)
(defvar async-callback-for-process nil)
(defvar async-callback-value nil)
(defvar async-callback-value-set nil)
(defvar async-current-process nil)
(defvar async--procvar nil)
#@292 Remove text properties in SEQUENCE.
 
Argument SEQUENCE may be a list or a string, if anything else it
is returned unmodified.
 
Note that this is a naive function that doesn't remove text properties
in SEQUENCE recursively, only at the first level which suffice in most
cases.
 
(fn SEQUENCE)
(defalias 'async-variables-noprops #[257 "\211;\203    \300!\207\211<\2038\211\301\211:\2035@\262;\203)\300!B\262\202.B\262A\262\202\211\237\207\207" [substring-no-properties nil] 6 (#$ . 1068)])
#@888 Return a `setq' form that replicates part of the calling environment.
 
It sets the value for every variable matching INCLUDE-REGEXP and
also PREDICATE.  It will not perform injection for any variable
matching EXCLUDE-REGEXP (if present) or representing a syntax-table
i.e. ending by "-syntax-table".
When NOPROPS is non nil it tries to strip out text properties of each
variable's value with `async-variables-noprops-function'.
 
It is intended to be used as follows:
 
    (async-start
       `(lambda ()
          (require 'smtpmail)
          (with-temp-buffer
            (insert ,(buffer-substring-no-properties (point-min) (point-max)))
            ;; Pass in the variable environment for smtpmail
            ,(async-inject-variables "\`\(smtpmail\|\(user-\)?mail\)-")
            (smtpmail-send-it)))
       'ignore)
 
(fn INCLUDE-REGEXP &optional PREDICATE EXCLUDE-REGEXP NOPROPS)
(defalias 'async-inject-variables #[1025 "\300\301C\302\303\304\305\306\307    \n%\310\"\311\312%!\210\211\242\262B\207" [setq nil mapatoms make-byte-code 257 "\306!\205    \307!\211\205J\205m\300\203\310\300\"\205m\302\203*\310\302\"?\205m\310\311\"?\205m\211;\204M\211\312>\204M\211\247\204M\313!\204M\314D\262\303\203V !\262\301\203`\301!\205m\304\304\242B\240\210\304\304\242B\240\207" vconcat vector [async-variables-noprops-function boundp symbol-name string-match "-syntax-table\\'" (nil t) vectorp quote] 6 "\n\n(fn SYM)"] 17 (#$ . 1579)])
(defalias 'async-inject-environment 'async-inject-variables)
#@24 
 
(fn FUNC RESULT BUF)
(defalias 'async-handle-result #[771 "\204\302\300!\210\302\301!\210\303\211\207\304\305\306\307\310!\311\"\312$\216<\2037@\313=\2037\314A@@A@A\"\202:!)\207" [async-callback-value async-callback-value-set make-local-variable t make-byte-code 0 "    ?\205\302\300!\207" vconcat vector [async-debug kill-buffer] 2 async-signal signal] 9 (#$ . 3116)])
#@97 Process sentinel used to retrieve the value from the child process.
 
(fn PROC &optional CHANGE)
(defalias 'async-when-done #[513 "\306!\307=\205gr\310!q\210\311!\312U\203N    \203>\n\203.\n! \204f\313p!\210\202f\314\304!\210\314\305!\210\315\211\202fdb\210\316 \210\317\n\320p!p#\202f\314\304!\210\321\322\323\324!\311!#D\314\305!\210\315\211*\207" [async-current-process async-callback-for-process async-callback async-debug async-callback-value async-callback-value-set process-status exit process-buffer process-exit-status 0 kill-buffer make-local-variable t backward-sexp async-handle-result read error format "Async process '%s' failed with exit code %d" process-name] 8 (#$ . 3509)])
#@25 
 
(fn &optional STREAM)
(defalias 'async--receive-sexp #[256 "\302\303\304!!\305\"\305    \203\306\307\310!\"\210\304!\262    \203%\306\311\310!\"\210\312!)\207" [coding-system-for-write async-debug decode-coding-string base64-decode-string read utf-8-auto message "Received sexp {{{%s}}}" pp-to-string "Read sexp {{{%s}}}" eval] 6 (#$ . 4225)])
#@13 
 
(fn SEXP)
(defalias 'async--insert-sexp #[257 "\304\211\305\211\306p\"\210\307ed\310#\210\311ed\305#\210eb\210\312c\210db\210\312\313\261,\207" [print-circle print-escape-nonascii print-length print-level nil t prin1 encode-coding-region utf-8-auto base64-encode-region 34 10] 5 (#$ . 4581)])
#@21 
 
(fn PROCESS SEXP)
(defalias 'async--transmit-sexp #[514 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\203\312\313\314!\"\210\315!\210\316ed#*\207" [async-debug generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 message "Transmitting sexp {{{%s}}}" pp-to-string async--insert-sexp process-send-region] 9 (#$ . 4888)])
#@52 Called from the child Emacs process' command-line.
(defalias 'async-batch-invoke #[0 "\306\307\n\211\203\310\311\f?\205 ! !\2022\3121+\310\311\f?\205$ ! !0\2022\310\313D!\262)\207" [coding-system-for-write async-in-child-emacs async-debug debug-on-error async-send-over-pipe command-line-args-left utf-8-auto t prin1 async--receive-sexp (error) async-signal] 5 (#$ . 5301)])
#@130 Query a FUTURE to see if it is ready.
 
I.e., if no blocking
would result from a call to `async-get' on that FUTURE.
 
(fn FUTURE)
(defalias 'async-ready #[257 "\301!\302>\205\303!\304!\203r\211q\210)\202\305\262\207" [async-callback-value-set process-status (exit signal) process-buffer buffer-live-p t] 4 (#$ . 5696)])
#@47 Wait for FUTURE to become ready.
 
(fn FUTURE)
(defalias 'async-wait #[257 "\300!?\205\301\302!\210\202\207" [async-ready sleep-for 0.05] 3 (#$ . 6032)])
#@156 Get the value from process FUTURE when it is ready.
FUTURE is returned by `async-start' or `async-start-process' when
its FINISH-FUNC is nil.
 
(fn FUTURE)
(defalias 'async-get #[257 "\211\203\301!\210\302!\303!\205r\211q\210\304\305p#)\207" [async-callback-value async-wait process-buffer buffer-live-p async-handle-result identity] 6 (#$ . 6197)])
#@65 Return true of VALUE is an async.el message packet.
 
(fn VALUE)
(defalias 'async-message-p #[257 "\211<\205    \300\301\"\207" [plist-get :async-message] 4 (#$ . 6560)])
#@76 Send the given messages to the asychronous Emacs PROCESS.
 
(fn &rest ARGS)
(defalias 'async-send #[128 "\302\303\"\203    \205    !\202\304@\305AD\"\207" [async-in-child-emacs async-callback append (:async-message t) async--transmit-sexp quote] 6 (#$ . 6735)])
#@59 Send the given messages to the asychronous Emacs PROCESS.
(defalias 'async-receive #[0 "\300 \207" [async--receive-sexp] 1 (#$ . 7007)])
#@376 Start the executable PROGRAM asynchronously.  See `async-start'.
PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the
process object when done.  If FINISH-FUNC is nil, the future
object will return the process object when the program is
finished.  Set DEFAULT-DIRECTORY to change PROGRAM's current
working directory.
 
(fn NAME PROGRAM FINISH-FUNC &rest PROGRAM-ARGS)
(defalias 'async-start-process #[899 "\303\304\304Q!\305\306\307%)rq\210\310\301!\210\311\312\"\210\313\230\204.\310\302!\210\314)\207" [process-connection-type async-callback async-callback-for-process generate-new-buffer "*" nil apply start-process make-local-variable set-process-sentinel async-when-done "emacs" t] 11 (#$ . 7151)])
#@198 The Emacs parameter to use to call emacs without config.
Can be one of "-Q" or "-q".
Default is "-Q" but it is sometimes useful to use "-q" to have a
enhanced config or some more variables loaded.
(defvar async-quiet-switch "-Q" (#$ . 7885))
#@1650 Execute START-FUNC (often a lambda) in a subordinate Emacs process.
When done, the return value is passed to FINISH-FUNC.  Example:
 
    (async-start
       ;; What to do in the child process
       (lambda ()
         (message "This is a test")
         (sleep-for 3)
         222)
 
       ;; What to do when it finishes
       (lambda (result)
         (message "Async process done, result should be 222: %s"
                  result)))
 
If FINISH-FUNC is nil or missing, a future is returned that can
be inspected using `async-get', blocking until the value is
ready.  Example:
 
    (let ((proc (async-start
                   ;; What to do in the child process
                   (lambda ()
                     (message "This is a test")
                     (sleep-for 3)
                     222))))
 
        (message "I'm going to do some work here") ;; ....
 
        (message "Waiting on async process, result should be 222: %s"
                 (async-get proc)))
 
If you don't want to use a callback, and you don't care about any
return value from the child process, pass the `ignore' symbol as
the second argument (if you don't, and never call `async-get', it
will leave *emacs* process buffers hanging around):
 
    (async-start
     (lambda ()
       (delete-file "a remote file on a slow link" nil))
     'ignore)
 
Note: Even when FINISH-FUNC is present, a future is still
returned except that it yields no value (since the value is
passed to FINISH-FUNC).  Call `async-get' on such a future always
returns nil.  It can still be useful, however, as an argument to
`async-ready' or `async-wait'.
 
(fn START-FUNC &optional FINISH-FUNC)
(defalias 'async-start #[513 "\306\307\310\311\312    \n\"! \313\314\315!\316\317\320\f\203\321\202;\322\323!r\211q\210\324\325\326\327\330!\331\"\332$\216\333\334 D!\210\335 *\262&\n\f\203I\336 \334D\"\210 )\207" [coding-system-for-read invocation-name invocation-directory async-quiet-switch async-send-over-pipe async--procvar utf-8-auto async-start-process "emacs" file-truename expand-file-name "-l" locate-library "async" "-batch" "-f" "async-batch-invoke" "<none>" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 async--insert-sexp quote buffer-string async--transmit-sexp] 20 (#$ . 8135)])
#@70 Evaluate FUNC in a separate Emacs process, synchronously.
 
(fn FUNC)
(defalias 'async-sandbox '(macro . #[257 "\300\301DD\207" [async-get async-start] 4 (#$ . 10470)]))
#@26 
 
(fn FN FORMS BINDINGS)
(defalias 'async--fold-left #[771 "\211\203\211@<\203\202C\"\262A\266\202\202\210\211\207" [] 9 (#$ . 10646)])
#@318 Implements `let', but each binding is established asynchronously.
For example:
 
  (async-let ((x (foo))
              (y (bar)))
     (message "%s %s" x y))
 
    expands to ==>
 
  (async-start (foo)
   (lambda (x)
     (async-start (bar)
      (lambda (y)
        (message "%s %s" x y)))))
 
(fn BINDINGS &rest FORMS)
(defalias 'async-let '(macro . #[385 "\300\301\302B\303!#\207" [async--fold-left #[514 "\211A@\300!\203\211\211\262\202\211\301\302E\262\262\303\301@CEE\207" [functionp lambda nil async-start] 8 "\n\n(fn ACC BINDING)"] progn reverse] 7 (#$ . 10806)]))
(byte-code "\300\301\302\303#\304\305!\207" [function-put async-let lisp-indent-function 1 provide async] 4)