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

Chizi123
2018-11-17 c4001ccd1864293b64aa37d83a9d9457eb875e70
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
;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 "\301\302!\210\301\303!\210\301\304!\210\301\305\306\307#\203*\310\311\300!\205>\203*\312\313!\203*\313\314!\210\315\316\306\317\320\321\320\303&\207" [async-bytecomp-allowed-packages require cl-lib server shell async-bytecomp nil t magit boundp fboundp async-bytecomp-package-mode 1 custom-declare-group with-editor "Use the Emacsclient as $EDITOR." :group external] 8)
#@47 Search for a suitable Emacsclient executable.
(defalias 'with-editor-locate-emacsclient #[0 "\301\302 \303\304\"G\"\206\305\306\307\310\"\210\207" [emacs-version with-editor-locate-emacsclient-1 with-editor-emacsclient-path split-string "\\." nil display-warning with-editor "Cannot determine a suitable Emacsclient\n\nDetermining an Emacsclient executable suitable for the\ncurrent Emacs instance failed.  For more information\nplease see https://github.com/magit/magit/wiki/Emacsclient."] 5 (#$ . 797)])
#@19 
 
(fn PATH DEPTH)
(defalias 'with-editor-locate-emacsclient-1 #[514 "\303\304\305\"\306#\307\310\311\305#P\312    \227\313\232\203\314\202\315\316\317\320\302!\205*\321\322\n\"C\323\324\325\n!\"\244\326\327\330E\244\"\331\332\333\334\335    !\336\"\337\340%$\206T\341V\205T\342S\"\207" [emacs-version invocation-name debian-emacs-flavor cl-subseq split-string "\\." 0 "^" mapconcat identity locate-file-internal "remacs" "remacsclient" "emacsclient" cl-mapcan #[257 "\301\302\303\304\305\306!\307\"\310\311%\"\207" [exec-suffixes cl-mapcar make-byte-code 257 "\300P\207" vconcat vector [] 3 "\n\n(fn E)"] 8 "\n\n(fn V)"] boundp format ".%s" cl-mapcon #[257 "\300\301\302!\303#\262\211\304P\305PE\207" [mapconcat identity reverse "." "-" ".emacs"] 5 "\n\n(fn V)"] reverse "" "-snapshot" ".emacs-snapshot" make-byte-code 257 "\3021\300\303!\304\305\306#)\266\2030\207\210\304\207" vconcat vector [inhibit-changing-match-data (error) with-editor-emacsclient-version nil t string-match] 8 "\n\n(fn EXEC)" 1 with-editor-locate-emacsclient-1] 14 (#$ . 1312)])
#@13 
 
(fn EXEC)
(defalias 'with-editor-emacsclient-version #[257 "\301!\3021\303\304\305\"@!A@0\202\210\306)\207" [default-directory file-name-directory (error) split-string process-lines "--version" nil] 5 (#$ . 2397)])
(defalias 'with-editor-emacsclient-path #[0 "    \203Z\305    !B\262\306\n    \"\307!\211\232\204\"\305\310!!B\262\266 \311=\203Z\306\312    \"\313!\2039\211B\262\210\314    \315\316\317#)\266\203\203Z\306\320    \"\313!\203Y\211B\262\210\321\322\323#\207" [exec-path invocation-directory invocation-name system-type inhibit-changing-match-data directory-file-name expand-file-name file-chase-links file-name-directory darwin "bin" file-directory-p "Cellar" nil t string-match "../../../bin" cl-remove-duplicates :test equal] 8])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\315\316\306\307\310\317&    \210\300\320\302\303\321DD\322\306\307\310\323&\210\324\320\325\326#\210\300\327\302\303\330DD\331\306\307\310\323&\210\324\327\325\326#\210\300\332\302\303\333DD\334\306\307\310\335&\207" [custom-declare-variable with-editor-emacsclient-executable funcall function #[0 "\300 \207" [with-editor-locate-emacsclient] 1] "The Emacsclient executable used by the `with-editor' macro." :group with-editor :type (choice (string :tag "Executable") (const :tag "Don't use Emacsclient" nil)) with-editor-sleeping-editor #[0 "\300\207" [#1="sh -c 'echo \"WITH-EDITOR: $$ OPEN $0 IN $(pwd)\"; sleep 604800 & sleep=$!; trap \"kill $sleep; exit 0\" USR1; trap \"kill $sleep; exit 1\" USR2; wait $sleep'"] 1 #1#] "The sleeping editor, used when the Emacsclient cannot be used.\n\nThis fallback is used for asynchronous processes started inside\nthe macro `with-editor', when the process runs on a remote machine\nor for local processes when `with-editor-emacsclient-executable'\nis nil (i.e. when no suitable Emacsclient was found, or the user\ndecided not to use it).\n\nWhere the latter uses a socket to communicate with Emacs' server,\nthis substitute prints edit requests to its standard output on\nwhich a process filter listens for such requests.  As such it is\nnot a complete substitute for a proper Emacsclient, it can only\nbe used as $EDITOR of child process of the current Emacs instance.\n\nSome shells do not execute traps immediately when waiting for a\nchild process, but by default we do use such a blocking child\nprocess.\n\nIf you use such a shell (e.g. `csh' on FreeBSD, but not Debian),\nthen you have to edit this option.  You can either replace \"sh\"\nwith \"bash\" (and install that), or you can use the older, less\nperformant implementation:\n\n  \"sh -c '\\\n  echo \\\"WITH-EDITOR: $$ OPEN $0 IN $(pwd)\\\"; \\\n  trap \\\"exit 0\\\" USR1; \\\n  trap \\\"exit 1\" USR2; \\\n  while true; do sleep 1; done'\"\n\nNote that the unit seperator character () right after the file\nname ($0) is required.\n\nAlso note that using this alternative implementation leads to a\ndelay of up to a second.  The delay can be shortened by replacing\n\"sleep 1\" with \"sleep 0.01\", or if your implementation does\nnot support floats, then by using \"nanosleep\" instead." :package-version (with-editor . "2.8.0") string with-editor-finish-query-functions #[0 "\300\207" [nil] 1] "List of functions called to query before finishing session.\n\nThe buffer in question is current while the functions are called.\nIf any of them returns nil, then the session is not finished and\nthe buffer is not killed.  The user should then fix the issue and\ntry again.  The functions are called with one argument.  If it is\nnon-nil then that indicates that the user used a prefix argument\nto force finishing the session despite issues.  Functions should\nusually honor that and return non-nil." hook put permanent-local t with-editor-cancel-query-functions #[0 "\300\207" [nil] 1] "List of functions called to query before canceling session.\n\nThe buffer in question is current while the functions are called.\nIf any of them returns nil, then the session is not canceled and\nthe buffer is not killed.  The user should then fix the issue and\ntry again.  The functions are called with one argument.  If it is\nnon-nil then that indicates that the user used a prefix argument\nto force canceling the session despite issues.  Functions should\nusually honor that and return non-nil." with-editor-mode-lighter #[0 "\300\207" [#2=" WE"] 1 #2#] "The mode-line lighter of the With-Editor mode." (choice (const :tag "No lighter" "") string)] 10)
#@364 Alist of filename patterns vs corresponding `server-window'.
 
Each element looks like (REGEXP . FUNCTION).  Files matching
REGEXP are selected using FUNCTION instead of the default in
`server-window'.
 
Note that when a package adds an entry here then it probably
has a reason to disrespect `server-window' and it likely is
not a good idea to change such entries.
(defvar with-editor-server-window-alist nil (#$ . 6911))
#@241 List of regexps for filenames `server-visit' should not remember.
When a filename matches any of the regexps, then `server-visit'
does not add it to the variable `file-name-history', which is
used when reading a filename in the minibuffer.
(defvar with-editor-file-name-history-exclude nil (#$ . 7338))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&    \207" [custom-declare-variable with-editor-shell-command-use-emacsclient funcall function #[0 "\300\207" [t] 1] "Whether to use the emacsclient when running shell commands.\n\nThis affects `with-editor-shell-command-async' and, if the input\nends with \"&\" `with-editor-shell-command' .\n\nIf `shell-command-with-editor-mode' is enabled, then it also\naffects `shell-command-async' and, if the input ends with \"&\"\n`shell-command'.\n\nThis is a temporary kludge that lets you choose between two\npossible defects, the ones described in the issues #23 and #40.\n\nWhen t, then use the emacsclient.  This has the disadvantage that\n`with-editor-mode' won't be enabled because we don't know whether\nthis package was involved at all in the call to the emacsclient,\nand when it is not, then we really should.  The problem is that\nthe emacsclient doesn't pass a long any environment variables to\nthe server.  This will hopefully be fixed in Emacs eventually.\n\nWhen nil, then use the sleeping editor.  Because in this case we\nknow that this package is involved, we can enable the mode.  But\nthis makes it necessary that you invoke $EDITOR in shell scripts\nlike so:\n\n  eval \"$EDITOR\" file\n\nAnd some tools that do not handle $EDITOR properly also break." :package-version (with-editor . "2.7.1") :group with-editor :type boolean] 10)
(defvar with-editor-pre-finish-hook nil)
(defvar with-editor-pre-cancel-hook nil)
(defvar with-editor-post-finish-hook nil)
(defvar with-editor-post-finish-hook-1 nil)
(defvar with-editor-post-cancel-hook nil)
(defvar with-editor-post-cancel-hook-1 nil)
(defvar with-editor-cancel-alist nil)
(byte-code "\300\301\302\303#\210\300\304\302\303#\210\300\305\302\303#\210\300\306\302\303#\207" [put with-editor-pre-finish-hook permanent-local t with-editor-pre-cancel-hook with-editor-post-finish-hook with-editor-post-cancel-hook] 4)
(defvar with-editor-show-usage t)
(defvar with-editor-cancel-message nil)
(defvar with-editor-previous-winconf nil)
(byte-code "\300\301!\210\300\302!\210\300\303!\210\304\302\305\306#\210\304\303\305\306#\207" [make-variable-buffer-local with-editor-show-usage with-editor-cancel-message with-editor-previous-winconf put permanent-local t] 4)
#@19 For internal use.
(defvar with-editor--pid nil (#$ . 9929))
(byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local with-editor--pid put permanent-local t] 4)
#@46 Finish the current edit session.
 
(fn FORCE)
(defalias 'with-editor-finish #[257 "\303\304\"\205P\305\301!\205    \n\306\307!\210\310\311!\210\312\311\313\"\210\314\315!r\211q\210\316\317\320\321\322!\323\"\324$\216\325\300!\210\305\301!\203H    \203H\325\301!\210\306\300!*\262\266\203\207" [with-editor-post-finish-hook git-commit-post-finish-hook default-directory run-hook-with-args-until-failure with-editor-finish-query-functions boundp run-hooks with-editor-pre-finish-hook with-editor-return nil accept-process-output 0.1 generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 make-local-variable] 11 (#$ . 10114) "P"])
#@46 Cancel the current edit session.
 
(fn FORCE)
(defalias 'with-editor-cancel #[257 "\304\305\"\205Q\306!\203\211 \262    \307\n\310\311!\210\312\313!\210\314\307\315\"\210\316\317!r\211q\210\320\321\322\323\324!\325\"\326$\216\327\301!\210\310\301!\210*\210)\266\330\206N\331!\262\207" [with-editor-cancel-message with-editor-post-cancel-hook default-directory with-editor-cancel-alist run-hook-with-args-until-failure with-editor-cancel-query-functions functionp nil run-hooks with-editor-pre-cancel-hook with-editor-return t accept-process-output 0.1 generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 make-local-variable message "Canceled by user"] 12 (#$ . 10823) "P"])
#@15 
 
(fn CANCEL)
(defalias 'with-editor-return #[257 "    \n \305\306\307\310#\210\203R\311 \210\203<\211\2038\211@\3121(\313\314\"0\202,\210\202-\210\315!\210A\266\202\202\210\202b\3161G\317\f!0\202K\210\202L\210\320 \210\202b\311 \210\203_\321 \210\202b\320 \210\211\203~\322\323\324\211\211\325\n\203w\326\202x\327&\210)\205\216\330!\331 =\205\216\332!\207" [with-editor-previous-winconf server-buffer-clients default-directory with-editor--pid buffer-file-name remove-hook kill-buffer-query-functions with-editor-kill-buffer-noop t save-buffer (error) server-send-string "-error Canceled by user" delete-process (error) delete-file kill-buffer server-done process-file "kill" nil "-s" "USR2" "USR1" window-configuration-frame selected-frame set-window-configuration] 13 (#$ . 11586)])
(defvar with-editor-mode-map (byte-code "\300 \301\302\303#\210\301\304\303#\210\301\305\303#\210\301\306\303#\210\301\307\310#\210\301\311\310#\210\301\312\310#\210\301\313\310#\210\301\314\310#\210\211\207" [make-sparse-keymap define-key "" with-editor-finish [remap server-edit] [remap evil-save-and-close] [remap evil-save-modified-and-close] " " with-editor-cancel [remap kill-buffer] [remap ido-kill-buffer] [remap iswitchb-kill-buffer] [remap evil-quit]] 5))
#@101 Non-nil if With-Editor mode is enabled.
Use the command `with-editor-mode' to change this variable.
(defvar with-editor-mode nil (#$ . 12891))
(make-variable-buffer-local 'with-editor-mode)
#@72 Edit a file as the $EDITOR of an external process.
 
(fn &optional ARG)
(defalias 'with-editor-mode #[256 "\302 \303=\203 ?\202\304!\305V\211\204\306\307!\210\310\311\312\313\314$\210    \203)\315 \210\316\317\2033\320\2024\321\"\210\322\323!\203X\302 \203H\211\302 \232\203X\324\325\326\203S\327\202T\330#\266\210\331 \210\207" [with-editor-mode with-editor-show-usage current-message toggle prefix-numeric-value 0 user-error "With-Editor mode cannot be turned off" add-hook kill-buffer-query-functions with-editor-kill-buffer-noop nil t with-editor-usage-message run-hooks with-editor-mode-hook with-editor-mode-on-hook with-editor-mode-off-hook called-interactively-p any " in current buffer" message "With-Editor mode %sabled%s" "en" "dis" force-mode-line-update] 8 (#$ . 13087) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)])
(defvar with-editor-mode-hook nil)
(byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\311\211%\210\303\306\312\313#\207" [with-editor-mode-map with-editor-mode-hook variable-documentation put "Hook run after entering or leaving `with-editor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" add-minor-mode with-editor-mode with-editor-mode-lighter boundp nil permanent-local t] 6)
(defalias 'with-editor-kill-buffer-noop #[0 "\300\301\302!!\207" [user-error substitute-command-keys "Don't kill this buffer.  Instead cancel using \\[with-editor-cancel]"] 3])
(defalias 'with-editor-usage-message #[0 "\300\301\302\303\302\304p\305BBE#\207" [run-with-timer 0.01 nil lambda with-current-buffer ((message (substitute-command-keys "Type \\[with-editor-finish] to finish, or \\[with-editor-cancel] to cancel")))] 8])
#@19 For internal use.
(defvar with-editor--envvar nil (#$ . 14880))
#@279 Use the Emacsclient as $EDITOR while evaluating BODY.
Modify the `process-environment' for processes started in BODY,
instructing them to use the Emacsclient as $EDITOR.  If optional
ENVVAR is a literal string then bind that environment variable
instead.
 
(fn [ENVVAR] BODY...)
(defalias 'with-editor '(macro . #[128 "\300\301@;\203\211A\262\242\202\302D\303B\304BBB\207" [let with-editor--envvar (or with-editor--envvar "EDITOR") ((process-environment process-environment)) (with-editor--setup)] 5 (#$ . 14951)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put with-editor lisp-indent-function defun put edebug-form-spec (body)] 5)
#@288 Use the Emacsclient as the editor while evaluating BODY.
Modify the `process-environment' for processes started in BODY,
instructing them to use the Emacsclient as editor.  ENVVAR is the
environment variable that is exported to do so, it is evaluated
at run-time.
 
(fn [ENVVAR] BODY...)
(defalias 'with-editor* '(macro . #[385 "\300\301D\302B\303BBB\207" [let with-editor--envvar ((process-environment process-environment)) (with-editor--setup)] 6 (#$ . 15618)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put with-editor* lisp-indent-function defun put edebug-form-spec (sexp body)] 5)
(defalias 'with-editor--setup #[0 "\203\n\306    !\203\n\307 Q\fB\211\207\310\311\312\"\204\313\314!\204@\315!\203=\316\317\320 \"\315!\203=\321!\210\322 \210\n\307\323! ?\205T\324\323\325\"!PR\fB \203g\326\325\"P\fB\327 P\fB\211\207" [with-editor-emacsclient-executable default-directory with-editor--envvar with-editor-sleeping-editor process-environment server-use-tcp file-remote-p "=" featurep make-network-process (:family local) t process-live-p server-running-p format "server%s" emacs-pid server-force-delete server-start shell-quote-argument " --socket-name=" expand-file-name "EMACS_SERVER_FILE=" "ALTERNATE_EDITOR=" server-process server-name server-socket-dir server-auth-dir] 8])
(defalias 'with-editor-server-window #[0 "\203\f\303\304    \"A\206 \n\207" [buffer-file-name with-editor-server-window-alist server-window cl-find-if #[257 "\211@\302\303\304#)\207" [buffer-file-name inhibit-changing-match-data nil t string-match] 8 "\n\n(fn CONS)"]] 3])
#@104 Honor `with-editor-server-window-alist' (which see).
 
(fn FN &optional NEXT-BUFFER KILLED-ONE FILEPOS)
(defalias 'server-switch-buffer--with-editor-server-window-alist #[1025 "r\206pq\210\203\303 \304 )#)\207" [with-editor-mode with-editor-previous-winconf server-window current-window-configuration with-editor-server-window] 8 (#$ . 17238)])
(advice-add 'server-switch-buffer :around 'server-switch-buffer--with-editor-server-window-alist)
#@523 When called inside a `with-editor' form and the Emacsclient
cannot be used, then give the process the filter function
`with-editor-process-filter'.  To avoid overriding the filter
being added here you should use `with-editor-set-process-filter'
instead of `set-process-filter' inside `with-editor' forms.
 
When the `default-directory' is located on a remote machine,
then also manipulate PROGRAM and PROGRAM-ARGS in order to set
the appropriate editor environment variable.
 
(fn FN NAME BUFFER PROGRAM &rest PROGRAM-ARGS)
(defalias 'start-file-process--with-editor-process-filter #[1156 "\204\f\303%\207\304    !\203(\305\232\204 B\262\305\262\306\nQB\262\303%\307\310\"\210\311\312    #\210\211\207" [with-editor--envvar default-directory with-editor-sleeping-editor apply file-remote-p "env" "=" set-process-filter with-editor-process-filter process-put default-dir] 11 (#$ . 17699)])
(advice-add 'start-file-process :around 'start-file-process--with-editor-process-filter)
#@474 Like `set-process-filter' but keep `with-editor-process-filter'.
Give PROCESS the new FILTER but keep `with-editor-process-filter'
if that was added earlier by the adviced `start-file-process'.
 
Do so by wrapping the two filter functions using a lambda, which
becomes the actual filter.  It calls `with-editor-process-filter'
first, passing t as NO-STANDARD-FILTER.  Then it calls FILTER,
which may or may not insert the text into the PROCESS' buffer.
 
(fn PROCESS FILTER)
(defalias 'with-editor-set-process-filter #[514 "\300\301!\302=\203\303\304\305B\306BBB\202\"\207" [set-process-filter process-filter with-editor-process-filter lambda (proc str) (proc str) ((with-editor-process-filter proc str t))] 8 (#$ . 18700)])
(defvar with-editor-filter-visit-hook nil)
#@15 
 
(fn STRING)
(defalias 'with-editor-output-filter #[257 "\302 \303\304\305\306\307!\310\"\311$\216\312\313\"\203\\\314\315\"\314\316\"\314\311\"\317!\204-\320\"\262\2038\321!P\262r\322!q\210\323\315!\210\324\325!\210\326 \206N\327p!\210\330\331!\210)\332\266\203\202])\207" [default-directory with-editor--pid match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 string-match "^WITH-EDITOR: \\([0-9]+\\) OPEN \\([^]+?\\)\\(?: IN \\([^ ]+?\\)\\)? ?$" match-string 1 2 file-name-absolute-p expand-file-name file-remote-p find-file-noselect with-editor-mode run-hooks with-editor-filter-visit-hook with-editor-server-window switch-to-buffer kill-local-variable server-window nil] 8 (#$ . 19480)])
#@95 Listen for edit requests by child processes.
 
(fn PROCESS STRING &optional NO-DEFAULT-FILTER)
(defalias 'with-editor-process-filter #[770 "\301\302\"\303!\210)\211?\205\304\"\207" [default-directory process-get default-dir with-editor-output-filter internal-default-process-filter] 6 (#$ . 20245)])
(advice-add 'server-visit-files :after 'server-visit-files--with-editor-file-name-history-exclude)
#@36 
 
(fn FILES PROC &optional NOWAIT)
(defalias 'server-visit-files--with-editor-file-name-history-exclude #[770 "\211\205+\211@\211@\211\302\303\304\305\306\307!\310\"\311\312%\"\203\"\313    \"\266A\266\202\202\207" [with-editor-file-name-history-exclude file-name-history cl-find-if make-byte-code 257 "\211\300\302\303\304#)\207" vconcat vector [inhibit-changing-match-data nil t string-match] 8 "\n\n(fn REGEXP)" delete] 14 (#$ . 20656)])
#@339 Teach subsequent commands to use current Emacs instance as editor.
 
Set and export the environment variable ENVVAR, by default
"EDITOR".  The value is automatically generated to teach
commands to use the current Emacs instance as "the editor".
 
This works in `shell-mode', `term-mode' and `eshell-mode'.
 
(fn &optional (ENVVAR "EDITOR"))
(defalias 'with-editor-export-editor #[128 "\211\203 \211A\262\242\202\301\203\302\303\304GTD\"\210\305\306\307\"\203U\310p!\311!b\210\312\313\314\315!#\"\210\316\317\"\2045\305\307!\203J\320\321\"\210\202Q\322\323\324\325\326$\210\210\202l\305\327!\203h\330\331\324\"\210\332\"\210\202l\333\334!\210\335\336\"\207" [with-editor-sleeping-editor "EDITOR" signal wrong-number-of-arguments with-editor-export-editor derived-mode-p comint-mode term-mode get-buffer-process process-mark process-send-string format " export %s=%s\n" shell-quote-argument accept-process-output 0.1 with-editor-set-process-filter with-editor-emulate-terminal add-hook comint-output-filter-functions with-editor-output-filter nil t eshell-mode add-to-list eshell-preoutput-filter-functions setenv error "Cannot export environment variables in this buffer" message "Successfully exported %s"] 10 (#$ . 21117) (byte-code "\300 C\207" [with-editor-read-envvar] 1)])
#@64 Like `with-editor-export-editor' but always set `$GIT_EDITOR'.
(defalias 'with-editor-export-git-editor #[0 "\300\301!\207" [with-editor-export-editor "GIT_EDITOR"] 2 (#$ . 22423) nil])
#@63 Like `with-editor-export-editor' but always set `$HG_EDITOR'.
(defalias 'with-editor-export-hg-editor #[0 "\300\301!\207" [with-editor-export-editor "HG_EDITOR"] 2 (#$ . 22615) nil])
#@82 Like `term-emulate-terminal' but also handle edit requests.
 
(fn PROCESS STRING)
(defalias 'with-editor-emulate-terminal #[514 "\300!\205\n\301\"\207" [with-editor-output-filter term-emulate-terminal] 5 (#$ . 22804)])
(defvar with-editor-envvars '("EDITOR" "GIT_EDITOR" "HG_EDITOR"))
#@73 
 
(fn &optional (PROMPT "Set environment variable") (DEFAULT "EDITOR"))
(defalias 'with-editor-read-envvar #[128 "\211\203 \211A\262\242\202\301\203\211A\262\242\202\302\203+\303\304\305\306G\\D\"\210\307\2038\310\311#\202;\312P\313\211\211\211&\211\314\230\203P\315\316!\202Q\211\262\207" [with-editor-envvars "Set environment variable" "EDITOR" signal wrong-number-of-arguments with-editor-read-envvar 2 completing-read format "%s (%s): " ": " nil "" user-error "Nothing selected"] 11 (#$ . 23098)])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315& \207" [custom-declare-variable shell-command-with-editor-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Shell-Command-With-Editor mode is enabled.\nSee the `shell-command-with-editor-mode' command\nfor a description of this minor mode." :set custom-set-minor-mode :initialize custom-initialize-default :group shell-command-with-editor :type boolean] 12)
#@708 Teach `shell-command' to use current Emacs instance as editor.
 
Teach `shell-command', and all commands that ultimately call that
command, to use the current Emacs instance as editor by executing
"EDITOR=CLIENT COMMAND&" instead of just "COMMAND&".
 
CLIENT is automatically generated; EDITOR=CLIENT instructs
COMMAND to use to the current Emacs instance as "the editor",
assuming no other variable overrides the effect of "$EDITOR".
CLIENT may be the path to an appropriate emacsclient executable
with arguments, or a script which also works over Tramp.
 
Alternatively you can use the `with-editor-async-shell-command',
which also allows the use of another variable instead of
"EDITOR".
 
(fn &optional ARG)
(defalias 'shell-command-with-editor-mode #[256 "\300 \301\302\303=\203\304\302!?\202\305!\306V\"\210\307\310\304\302!\203$\311\202%\312\"\210\313\314!\203O\315\302!\210\300 \203=\211\300 \232\203O\316\317\320\304\302!\203J\321\202K\322#\266\210\323 \210\304\302!\207" [current-message set-default shell-command-with-editor-mode toggle default-value prefix-numeric-value 0 run-hooks shell-command-with-editor-mode-hook shell-command-with-editor-mode-on-hook shell-command-with-editor-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Shell-Command-With-Editor mode %sabled%s" "en" "dis" force-mode-line-update] 7 (#$ . 24073) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)])
(defvar shell-command-with-editor-mode-hook nil)
(byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\307\211%\207" [shell-command-with-editor-mode-map shell-command-with-editor-mode-hook variable-documentation put "Hook run after entering or leaving `shell-command-with-editor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" add-minor-mode shell-command-with-editor-mode nil boundp] 6)
#@743 Like `async-shell-command' but with `$EDITOR' set.
 
Execute string "ENVVAR=CLIENT COMMAND" in an inferior shell;
display output, if any.  With a prefix argument prompt for an
environment variable, otherwise the default "EDITOR" variable
is used.  With a negative prefix argument additionally insert
the COMMAND's output at point.
 
CLIENT is automatically generated; ENVVAR=CLIENT instructs
COMMAND to use to the current Emacs instance as "the editor",
assuming it respects ENVVAR as an "EDITOR"-like variable.
CLIENT may be the path to an appropriate emacsclient executable
with arguments, or a script which also works over Tramp.
 
Also see `async-shell-command' and `shell-command'.
 
(fn COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER ENVVAR)
(defalias 'with-editor-async-shell-command #[1025 "\211\211\206\302    \303 \210\304#+\207" [with-editor--envvar process-environment "EDITOR" with-editor--setup async-shell-command] 8 (#$ . 26015) (with-editor-shell-command-read-args "Async shell command: " t)])
#@189 Like `shell-command' or `with-editor-async-shell-command'.
If COMMAND ends with "&" behave like the latter,
else like the former.
 
(fn COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER ENVVAR)
(defalias 'with-editor-shell-command #[1025 "\300\301\"\203\302$\207\303#\207" [string-match "&[     ]*\\'" with-editor-async-shell-command shell-command] 9 (#$ . 27032) (with-editor-shell-command-read-args "Shell command: ")])
#@31 
 
(fn PROMPT &optional ASYNC)
(defalias 'with-editor-shell-command-read-args #[513 "\305\306\211\206    \307=\205\310\306\311\"\211\205\312!\262$\211\2044\313\306\311\314#)\266\203\211\262\203<\315 !\316W\202= \f\205H \205H\317 F\207" [buffer-file-name major-mode inhibit-changing-match-data current-prefix-arg shell-command-default-error-buffer read-shell-command nil dired-mode dired-get-filename t file-relative-name "&[     ]*\\'" string-match prefix-numeric-value 0 with-editor-read-envvar] 11 (#$ . 27461)])
#@56 
 
(fn FN COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)
(defalias 'shell-command--shell-command-with-editor-mode #[1026 "\306\307\"    \204 \n\203\310\311\312\313#)\266\203\204%#\202y\f\203J \203J\314!\204J    \2069\315\316 \210#*\202y\317\320\321    \206S\315\322!$$\210\3231w\324\206j\325\326!!\327\330\"\210\211\2620\202y\210\311)\207" [shell-mode-hook with-editor--envvar shell-command-with-editor-mode inhibit-changing-match-data with-editor-shell-command-use-emacsclient with-editor-emacsclient-executable remove with-editor-export-editor "&\\'" nil t string-match file-remote-p "EDITOR" with-editor--setup apply format "%s=%s %s" shell-quote-argument (error) get-buffer-process get-buffer "*Async Shell Command*" set-process-filter #[514 "\300\"\210\301\302#\207" [comint-output-filter with-editor-process-filter t] 6 "\n\n(fn PROC STR)"] default-directory process-environment with-editor-sleeping-editor] 11 (#$ . 27998)])
(advice-add 'shell-command :around 'shell-command--shell-command-with-editor-mode)
#@86 Debug configuration issues.
See info node `(with-editor)Debugging' for instructions.
(defalias 'with-editor-debug #[0 "r\306\307!q\210\310p!\210\311 \210\3121 \206\313    \314 *0\202$\210\202%\210\315\316\317\320!\"\315\321\322\n \"\f#\323\315\324 \"\315\325=\"\315\326>\"\327\315\330\331 \"\315\332?\"\315\333@\"\315\334A\"\315\335B\"\261\f\210B\203\210\336B!\203\210\337B\340\341#\211\203\204\211@\315\342\"c\210A\266\202\202q\210\202\227\315\343@\203\223\344\202\224\345\"c\210\315\346C\"c\210\336C!\203\302\337C\340\341#\211\203\276\211@\315\342\"c\210A\266\202\202\253\210\202\321\315\343@\203\315\345\202\316\344\"c\210(\347\350!\351\211DE\352 *\353\315\354\211\205\353\355!#\315\356\211\205\367\355!#\315\357\211\205\355!#\261\266\360\315\361\362\363!\"\315\364F\"\261\210\315\365!c\210\366 \211\205W\211@\315\367\370!@#c\210\371!\203P\337\372\373#\211\203O\211@\315\374\355!#c\210A\266\202\2029\210A\266\202\202\262)\207" [with-editor--envvar process-environment invocation-name invocation-directory emacs-version system-type get-buffer-create "*with-editor-debug*" pop-to-buffer erase-buffer (error) "EDITOR" with-editor--setup format "with-editor: %s\n" locate-library "with-editor.el" "emacs: %s (%s)\n" expand-file-name "system:\n" "  system-type: %s\n" "  system-configuration: %s\n" "  system-configuration-options: %s\n" "server:\n" "  server-running-p: %s\n" server-running-p "  server-process: %S\n" "  server-use-tcp: %s\n" "  server-name: %s\n" "  server-socket-dir: %s\n" file-accessible-directory-p directory-files nil "^[^.]" "    %s\n" "    %s: not an accessible directory\n" "WARNING" "ERROR" "  server-auth-dir: %s\n" default-value with-editor-emacsclient-executable :error with-editor-locate-emacsclient "with-editor-emacsclient-executable:\n" " value:   %s (%s)\n" with-editor-emacsclient-version " default: %s (%s)\n" " funcall: %s (%s)\n" "path:\n" "  $PATH: %S\n" getenv "PATH" "  exec-path: %s\n" "  with-editor-emacsclient-path:\n" with-editor-emacsclient-path "    %s (%s)\n" file-attributes file-directory-p t "emacsclient\\(?:[^w]\\|\\'\\)" "      %s (%s)\n" system-configuration system-configuration-options server-process server-use-tcp server-name server-socket-dir server-auth-dir warning-minimum-log-level warning-minimum-level exec-path] 14 (#$ . 29058) nil])
(defconst with-editor-font-lock-keywords '(("(\\(with-\\(?:git-\\)?editor\\)\\_>" (1 'font-lock-keyword-face))))
(byte-code "\301\302\"\210\303\304!\207" [with-editor-font-lock-keywords font-lock-add-keywords emacs-lisp-mode provide with-editor] 3)