;ELC   
;;; Compiled by buildd@akateko.buildd on Fri Oct 25 13:52:54 2013
;;; from file /build/buildd/emacs23-23.4+1/debian/build-x/lisp/server.el
;;; in Emacs version 23.4.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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(custom-declare-group 'server nil "Emacs running as a server process." :group 'external)
#@55 If non-nil, use TCP sockets instead of local sockets.
(custom-declare-variable 'server-use-tcp 'nil '(#$ . 625) :set #[(sym val) "\303\304\305\"\204 \306	\204 \307\310!\210\203 \311\306!\210\312\n\"\207" [val load-in-progress sym featurep make-network-process (:family local) t message "Local sockets unsupported, using TCP sockets" random set-default] 3] :group 'server :type 'boolean :version "22.1")
#@140 The name or IP address to use as host address of the server process.
If set, the server accepts remote connections; otherwise it is local.
(custom-declare-variable 'server-host 'nil '(#$ . 1041) :group 'server :type '(choice (string :tag "Name or IP address") (const :tag "Local" nil)) :version "22.1")
(put 'server-host 'risky-local-variable t)
#@259 Directory for server authentication files.

NOTE: On FAT32 filesystems, directories are not secure;
files can be read and modified by any user or process.
It is strongly suggested to set `server-auth-dir' to a
directory residing in a NTFS partition instead.
(custom-declare-variable 'server-auth-dir '(locate-user-emacs-file "server/") '(#$ . 1394) :group 'server :type 'directory :version "22.1")
(put 'server-auth-dir 'risky-local-variable t)
#@53 If non-nil, raise frame when switching to a buffer.
(custom-declare-variable 'server-raise-frame 't '(#$ . 1845) :group 'server :type 'boolean :version "22.1")
#@53 Hook run when visiting a file for the Emacs server.
(custom-declare-variable 'server-visit-hook 'nil '(#$ . 2011) :group 'server :type 'hook)
#@59 Hook run when switching to a buffer for the Emacs server.
(custom-declare-variable 'server-switch-hook 'nil '(#$ . 2159) :group 'server :type 'hook)
#@59 Hook run when done editing a buffer for the Emacs server.
(custom-declare-variable 'server-done-hook 'nil '(#$ . 2314) :group 'server :type 'hook)
#@29 The current server process.
(defvar server-process nil (#$ . 2467))
#@60 List of current server clients.
Each element is a process.
(defvar server-clients nil (#$ . 2541))
#@64 List of client processes requesting editing of current buffer.
(defvar server-buffer-clients nil (#$ . 2646))
(byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local server-buffer-clients put permanent-local t] 4)
#@410 Specification of the window to use for selecting Emacs server buffers.
If nil, use the selected window.
If it is a function, it should take one argument (a buffer) and
display and select it.  A common value is `pop-to-buffer'.
If it is a window, use that.
If it is a frame, use the frame's selected window.

It is not meaningful to set this to a specific frame or window with Custom.
Only programs can do so.
(custom-declare-variable 'server-window 'nil '(#$ . 2887) :group 'server :version "22.1" :type '(choice (const :tag "Use selected window" :match (lambda (widget value) (not (functionp value))) nil) (function-item :tag "Display in new frame" switch-to-buffer-other-frame) (function-item :tag "Use pop-to-buffer" pop-to-buffer) (function :tag "Other function")))
#@134 Regexp matching names of temporary files.
These are deleted and reused after each edit by the programs that
invoke the Emacs server.
(custom-declare-variable 'server-temp-file-regexp '"^/tmp/Re\\|/draft$" '(#$ . 3664) :group 'server :type 'regexp)
#@356 Whether to kill buffers when done with them.
If non-nil, kill a buffer unless it already existed before editing
it with the Emacs server.  If nil, kill only buffers as specified by
`server-temp-file-regexp'.
Please note that only buffers that still have a client are killed,
i.e. buffers visited with "emacsclient --no-wait" are never killed
in this way.
(custom-declare-variable 'server-kill-new-buffers 't '(#$ . 3919) :group 'server :type 'boolean :version "21.1")
(byte-code "\301\236\204\n \302B\301\207" [minor-mode-alist server-buffer-clients (server-buffer-clients " Server")] 2)
#@178 Non-nil means the buffer existed before the server was asked to visit it.
This means that the server should not kill the buffer when you say you
are done with it in the server.
(defvar server-existing-buffer nil (#$ . 4517))
(make-variable-buffer-local 'server-existing-buffer)
#@165 The name of the Emacs server, if this Emacs process creates one.
The command `server-start' makes use of this.  It should not be
changed while a server is running.
(custom-declare-variable 'server-name '"server" '(#$ . 4802) :group 'server :type 'string :version "23.1")
#@101 The directory in which to place the server socket.
If local sockets are not supported, this is nil.
(defvar server-socket-dir (byte-code "\300\301\302\"\205 \303\304\305\306!\206 \307\310 #\207" [featurep make-network-process (:family local) format "%s/emacs%d" getenv "TMPDIR" "/tmp" user-uid] 4) (#$ . 5080))
#@54 Return a list of clients with PROPERTY set to VALUE.
(defalias 'server-clients-with #[(property value) "\306	\306\211\203! @\f\307\n\"\232\203 \nBA\211\204\n \306+\207" [result server-clients proc #1=#:--cl-dolist-temp-- value property nil process-get] 5 (#$ . 5399)])
#@99 Create a client for process PROC, if it doesn't already have one.
New clients have no properties.
(defalias 'server-add-client #[(proc) "\301\302\"\207" [proc add-to-list server-clients] 3 (#$ . 5687)])(if macro-declaration-function (funcall macro-declaration-function (quote server-with-environment) (quote (declare (indent 2)))))
#@232 Evaluate BODY with environment variables VARS set to those in ENV.
The environment variables are then restored to their previous values.

VARS should be a list of strings.
ENV should be in the same format as `process-environment'.
(defalias 'server-with-environment '(macro . #[(env vars &rest body) "\305\306!\305\307!\310\311\312	\nD\310\313	EDC\314\315\316D\317	\320F	F\321BBEE\322\fBF*\207" [value var vars env body make-symbol "var" "value" let ((process-environment process-environment)) dolist getenv-internal push if stringp concat "=" (process-environment) progn] 13 (#$ . 6027)]))
#@129 Delete PROC, including its buffers, terminals and frames.
If NOFRAME is non-nil, let the frames live.
Updates `server-clients'.
(defalias 'server-delete-client #[(proc &optional noframe) "\306\307\205 \310P	\"\210	\n>\205\312 \311	\303\"\211\312\211\203_ @\313\f!\203X r\fq\210	C\232\203W  \203= !\203B \314 \203W \315 \204W \312\"\316\216\312\317p!\210\320\"*)A\211\204 *\204\233 \321 \312#\211$\203\232 $@#\322#!\203\221 	\323#\324\"\232\203\221 \325#\324\312#\210\326#!\210$A\211$\204o *\327	\n\"\311	\330\"\211\203\270 \331!\320=\203\270 \332!\210)\333	!\334=\203\305 \335	!\210\306\336	\")\207" [noframe proc server-clients buffers buf #1=#:--cl-dolist-temp-- server-log "server-delete-client" " noframe" process-get nil buffer-live-p server-temp-file-p buffer-modified-p ((byte-code "\204 	C\303\207" [flag proc server-buffer-clients nil] 1)) kill-buffer t frame-list frame-live-p frame-parameter client set-frame-parameter delete-frame delq terminal terminal-live-p delete-terminal process-status open delete-process "Deleted" server-buffer-clients server-kill-new-buffers server-existing-buffer flag frame #2=#:--cl-dolist-temp--] 6 (#$ . 6631)])
#@54 Function to generate timestamps for `server-buffer'.
(defvar server-log-time-function 'current-time-string (#$ . 7831))
#@250 Buffer used internally by Emacs's server.
One use is to log the I/O for debugging purposes (see `server-log'),
the other is to provide a current buffer in which the process filter can
safely let-bind buffer-local variables like `default-directory'.
(defconst server-buffer " *server*" (#$ . 7958))
#@73 If non-nil, log the server's inputs and outputs in the `server-buffer'.
(defvar server-log nil (#$ . 8262))
#@129 If `server-log' is non-nil, log STRING to `server-buffer'.
If CLIENT is non-nil, add a description of it to the logged message.
(defalias 'server-log #[(string &optional client) "\2053 r\305	!q\210db\210\n \204 \306\202( <\203$ \307\310@\"\202( \307\310\"\f\261\210n\2062 \311 )\207" [server-log server-buffer server-log-time-function client string get-buffer-create " " format " %s: " newline] 4 (#$ . 8377)])
#@52 The process sentinel for Emacs server connections.
(defalias 'server-sentinel #[(proc msg) "\302!\303=\203 \304!\203 \305\306\"\210\307\310\"\203' \302!\311=\203' \306\312\313\217\210\314\315\316\302!	#\"\210\317!\207" [proc msg process-status open process-query-on-exit-flag set-process-query-on-exit-flag nil process-contact :server closed (byte-code "\301\302\303\"!\207" [proc delete-file process-get :server-file] 4) ((error)) server-log format "Status changed to %s: %s" server-delete-client] 5 (#$ . 8801)])
(defalias 'server-select-display #[(display) "\304\305!?\206 \306\307 \300\"\232?\205W \310 \311\211\2032 \n@\306	\300\"\232\203+ \312	!\210\nA\211\204 *\306\307 \300\"\232?\205W \313\314!\305\315B\316B\"\312	!\210\317\320 \"\210	*\207" [display frame #1=#:--cl-dolist-temp-- buffer fboundp make-frame-on-display frame-parameter selected-frame frame-list nil select-frame generate-new-buffer " *server-dummy*" server-dummy-buffer ((visibility)) set-window-buffer selected-window] 4])
(defalias 'server-unselect-display #[(frame) "\301!\2059 \302!\303\302!\304\"=\203' \305\302!!\306\307\"=\203' \310!\210\202- \311\312\313#\210\314\306\307\"!\210\311\307\315#\207" [frame frame-live-p frame-first-window next-window nomini window-buffer frame-parameter server-dummy-buffer delete-frame set-frame-parameter visibility t kill-buffer nil] 4])
#@113 Delete the client connection when the emacsclient frame is deleted.
(To be used from `delete-frame-functions'.)
(defalias 'server-handle-delete-frame #[(frame) "\305\306\"\307!\205D 	\205D \310\311\312 \313\211\2031 \f@	\305\306\"=\203* \nT\fA\211\204 *\n)Y\205D \314\315\316\"	\"\210\317	\320\")\207" [frame proc frame-num f #1=#:--cl-dolist-temp-- frame-parameter client frame-live-p 1 0 frame-list nil server-log format "server-handle-delete-frame, frame %s" server-delete-client noframe] 6 (#$ . 10197)])
#@84 Notify the emacsclient process to suspend itself when its tty device is suspended.
(defalias 'server-handle-suspend-tty #[(terminal) "\303\300\"\304\211\203\" \n@\305\306\307\"	\"\210\310\311\312\217\210\nA\211\204 *\304\207" [terminal proc #1=#:--cl-dolist-temp-- server-clients-with nil server-log format "server-handle-suspend-tty, terminal %s" err (server-send-string proc "-suspend \n") ((file-error (byte-code "\300\301\302\217\207" [nil (server-delete-client proc) ((error))] 3)))] 5 (#$ . 10724)])
#@82 Remove &-quotation from ARG.
See `server-quote-arg' and `server-process-filter'.
(defalias 'server-unquote-arg #[(arg) "\301\302\303\304\211%\207" [arg replace-regexp-in-string "&." #[(s) "\301H\302=\203\n \303\207\301H\304=\203 \305\207\301H\306=\203 \307\207\310\207" [s 1 38 "&" 45 "-" 110 "\n" " "] 2] t] 6 (#$ . 11243)])
#@207 In ARG, insert a & before each &, each space, each newline, and -.
Change spaces to underscores, too, so that the return value never
contains a space.

See `server-unquote-arg' and `server-process-filter'.
(defalias 'server-quote-arg #[(arg) "\301\302\303\304\211%\207" [arg replace-regexp-in-string "[-&\n ]" #[(s) "\301H\302=\203\n \303\207\301H\304=\203 \305\207\301H\306=\203 \307\207\301H\310=\205' \311\207" [s 0 38 "&&" 45 "&-" 10 "&n" 32 "&_"] 2] t] 6 (#$ . 11582)])
#@53 A wrapper around `process-send-string' for logging.
(defalias 'server-send-string #[(proc string) "\302\303P	\"\210\304	\"\207" [string proc server-log "Sent " process-send-string] 3 (#$ . 12070)])
#@207 Make sure DIR is a directory with no race-condition issues.
Creates the directory if necessary and makes sure:
- there's no symlink involved
- it's owned by us
- it's not readable/writable by anybody else.
(defalias 'server-ensure-safe-dir #[(dir) "\306!\307\310\"\211\204! \311 \312\216\313\314!\210\315\316\"\210*\307\310\"\317	8\f\320=\321\322\215\211?\2057 \323\324\",\207" [dir attrs #1=#:--cl-letf-save-- uid system-type w32 directory-file-name file-attributes integer default-file-modes ((byte-code "\302	!\210	\210)\302\207" [#1# #2=#:--cl-store-- set-default-file-modes] 2)) set-default-file-modes 448 make-directory t 2 windows-nt :safe (byte-code "@\304=\204\f \305\306\307\"\210	\203& \310\n!\203& \311\312\313\314\315!\"\316#\210\305\306\304\"\210\n\317 U\204C 	\203> \n\320U\203> \317 \321U\204C \305\306\307\"\210	\203L \305\306\304\"\210\310\322\323!\324\"!\204\\ \305\306\307\"\210\304\207" [attrs w32 uid dir t throw :safe nil zerop display-warning server format "Using `%s' to store Emacs-server authentication files.\nDirectories on FAT32 filesystems are NOT secure against tampering.\nSee variable `server-auth-dir' for details." file-name-as-directory :warning user-uid 544 500 logand file-modes 63] 6) error "The directory `%s' is unsafe" safe] 4 (#$ . 12277)])
#@657 Allow this Emacs process to be a server for client processes.
This starts a server communications subprocess through which
client "editors" can send your editing commands to this Emacs
job.  To use the server, set up the program `emacsclient' in the
Emacs distribution as your standard "editor".

Optional argument LEAVE-DEAD (interactively, a prefix arg) means just
kill any existing server communications subprocess.

If a server is already running, restart it.  If clients are
running, ask the user for confirmation first, unless optional
argument INHIBIT-PROMPT is non-nil.

To force-start a server, do \[server-force-delete] and then
\[server-start].
(defalias 'server-start #[(&optional leave-dead inhibit-prompt) "\203$ \306 \203 \307 A\204 \310 	=\203 \n\202! \204$ \311\312!\205\247\f\203, \202. @A\313BA\"CD\203B \314\315\316\217\210\317B!\320=\204S \314\321\322\217\210\202e \314E\323\324\325\326\327B\"\330Q\331#\210\320\203q \332@!\210\202e \n\203\210 \n\320=\204\201 \333\334\335!!\210\314\211D\202\246\336A!\210D\203\230 \333\334\337!!\210\340 F\341\216\342\343!\210\344\345\346\"\210\344\347\350\"\210\344\351\352\"\210\344\353\354\"\210\344\355\356\"\210\357\360\361B\362\320\363\320\364\365\366\367\370\371\f\203\342 \372\373\374\320\375G\206\331 \376\377\201N \257\202\357 \372\201O \374C\377\201P \257&\211D\204\377 \201Q \201R !\210\201S D\201T C#\210\f\205\245\201U H\314IH\201V W\203:I\201W \201X \201Y !\\C\244IHT\211H\202I\260*J\201S D\201Z J#\210C\201[ \201\\ \201] !!KL\201^ \216rKq\210\201_ \314!\210\201` M\201a \201b D\201c \"!\201d \201e \201f  !\201g J\261)rKq\210\201h \314\211L\314\201U %\210-**\207" [server-clients terminal-frame leave-dead inhibit-prompt server-use-tcp server-auth-dir daemonp frame-list selected-frame yes-or-no-p "The current server still has clients; delete them? " expand-file-name nil (delete-process server-process) ((error)) server-running-p t (delete-file server-file) ((error)) display-warning server "Unable to start the Emacs server.\n" format "There is an existing Emacs server, named %S.\n" "To start the server in this Emacs process, stop the existing\nserver or call `M-x server-force-delete' to forcibly disconnect it." :warning server-delete-client server-log message "Server stopped" server-ensure-safe-dir "Restarting server" default-file-modes ((byte-code "\302	!\210	\210)\302\207" [#1=#:--cl-letf-save-- #2=#:--cl-store-- set-default-file-modes] 2)) set-default-file-modes 448 add-hook suspend-tty-functions server-handle-suspend-tty delete-frame-functions server-handle-delete-frame kill-buffer-query-functions server-kill-buffer-query-function kill-emacs-query-functions server-kill-emacs-query-function kill-emacs-hook server-force-stop apply make-network-process :name :server :noquery :sentinel server-sentinel :filter server-process-filter :coding raw-text-unix :family ipv4 :service :host "127.0.0.1" :plist server-socket-dir server-dir server-name server-file server-process server-mode #1# server-host i auth auth-key #3=#:temp-buffer #4=#:temp-file buffer-file-coding-system (:authenticated nil) local (:authenticated t) error "Could not start server process" process-put :server-file 0 64 33 random 94 :auth-key get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n \302!\210\301\207" [#3# buffer-name kill-buffer] 2)) set-buffer-multibyte no-conversion format-network-address process-contact :local " " int-to-string emacs-pid "\n" write-region] 23 (#$ . 13587) "P"])
#@105 Kill all connections to the current server.
This function is meant to be called from `kill-emacs-hook'.
(defalias 'server-force-stop #[nil "\300\301\211\"\207" [server-start t] 3 (#$ . 17142)])
#@162 Unconditionally delete connection file for server NAME.
If server is running, it is first stopped.
NAME defaults to `server-name'.  With argument, ask for NAME.
(defalias 'server-force-delete #[(&optional name) "\203 \306\211\307\216\n\203 \310 \311\312\n\"\210\300\313!\210+\314\206! \f\203* \202, \"\306\315\316\217)\207" [server-mode #1=#:current-message #2=#:with-temp-message name server-name server-use-tcp nil ((byte-code "\203 	\203 \302\303	\"\210\202 \302\304!\210\304\207" [#2# #1# message #3="%s" nil] 3)) current-message message #3# -1 expand-file-name (byte-code "\301!\210\302\303\"\207" [file delete-file message "Connection file %S deleted"] 3) ((file-error (message "No connection file %S" file))) server-auth-dir server-socket-dir file] 3 (#$ . 17343) (list (if current-prefix-arg (read-string "Server name: " nil nil server-name)))])
#@304 Test whether server NAME is running.

Return values:
  nil              the server is definitely not running.
  t                the server seems to be running.
  something else   we cannot determine whether it's running without using
                   commands which may have to wait for a long time.
(defalias 'server-running-p #[(&optional name) "\204 	\302\303\304\217\207" [name server-name nil (byte-code "\203. \305\306!r	q\210\307\216\310\311\n\"!\210\312\313!\203+ \314\315\316\317\320!!!\236\203+ \321\202, \322+\207\323\324\325\326\327\330\331\332\333\321\334\311\n\f\"&\n!\210\321\207" [server-use-tcp #1=#:temp-buffer name server-auth-dir server-socket-dir generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) insert-file-contents-literally expand-file-name looking-at "127\\.0\\.0\\.1:[0-9]+ \\([0-9]+\\)" comm process-attributes string-to-number match-string 1 t :other delete-process make-network-process :name "server-client-test" :family local :server nil :noquery :service] 14) ((file-error))] 3 (#$ . 18224)])
#@254 Non-nil if Server mode is enabled.
See the command `server-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `server-mode'.
(custom-declare-variable 'server-mode 'nil '(#$ . 19325) :set 'custom-set-minor-mode :initialize 'custom-initialize-default :group 'server :type 'boolean :version "22.1")
#@217 Toggle Server mode.
With ARG, turn Server mode on if ARG is positive, off otherwise.
Server mode runs a process that accepts commands from the
`emacsclient' program.  See `server-start' and Info node `Emacs server'.
(defalias 'server-mode #[(&optional arg) "\303 	\304=\203 \n?\202( 	\203 \305	!\306V\202( \n\204\" \307\202( \310\311\302\"\210\312\313\n?!\210\314\315\n\2038 \316\2029 \317\"\210\320\321!\203^ \322\302!\210\303 \203Q \303 \232\203^ \310\323\n\203[ \324\202\\ \325\"\210)\326 \210\n\207" [#1=#:last-message arg server-mode current-message toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil server-start run-hooks server-mode-hook server-mode-on-hook server-mode-off-hook called-interactively-p any customize-mark-as-set "Server mode %sabled" "en" "dis" force-mode-line-update] 3 (#$ . 19756) (list (or current-prefix-arg 'toggle))])
(byte-code "\301\302\303\304\300!\205\n #\207" [server-mode-map add-minor-mode server-mode nil boundp] 5)
#@52 Eval EXPR and send the result back to client PROC.
(defalias 'server-eval-and-print #[(expr proc) "\306\307!@!\211\205. \n\205. \310\311!rq\210\312\216p\313	!\210\314ed\"\315\n\316\317\320!\"\"-)\207" [expr v proc #1=#:temp-buffer standard-output text eval read-from-string generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) pp buffer-substring-no-properties server-send-string format "-print %s\n" server-quote-arg] 7 (#$ . 20769)])
(defalias 'server-create-tty-frame #[(tty type proc) "\204 \306\307!\210	\204 \306\310!\210\311\312\313\"\210\n\314\315\211\203D \f@\316\317\320\"\"\211';\2038 \321'Q\2029 \nB)\fA\211\204 *\322\323\300B\324	B\313B\325\317\320\"B\257!)\326\327\316\330\317\320\"\"#\210\331!\210\332\333#\210\332\334\335!#\210\336\337\340!\341\"\210\342\343\344\345 !\346Q\"\210)\207" [tty type process-environment #1=#:var #2=#:--cl-dolist-temp-- proc error "Invalid terminal device" "Invalid terminal type" add-to-list frame-inherited-parameters client ("LANG" "LC_CTYPE" "LC_ALL" "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES" "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING" "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO" "TERMINFO_DIRS" "TERMPATH" "COLORFGBG" "COLORTERM") nil getenv-internal process-get env "=" make-frame (window-system) tty-type environment set-frame-parameter display "DISPLAY" select-frame process-put frame terminal frame-terminal switch-to-buffer get-buffer-create "*scratch*" norecord server-send-string "-emacs-pid " number-to-string emacs-pid "\n" #3=#:value] 9])
(defalias 'server-create-window-system-frame #[(display nowait proc) "\305\306\307\"\210\310\311!\204 \312\313\"\210\314\315\"\210\316\207\307	\203  \301\202! B\317\320\321\"BD\311\206? \322\316\303\"\206? \323\324!\206? \325\326!\n\"\312\327\330\f\"\"\210\331\f!\210\332\304\f#\210\332\333\334\f!#\210\335\336\337!\340\"\210\f*\207" [proc nowait params display frame add-to-list frame-inherited-parameters client fboundp make-frame-on-display server-log "Window system unsupported" server-send-string "-window-system-unsupported \n" nil environment process-get env frame-parameter getenv "DISPLAY" error "Please specify display" format "%s created" select-frame process-put terminal frame-terminal switch-to-buffer get-buffer-create "*scratch*" norecord] 5])
(defalias 'server-goto-toplevel #[(proc) "\302\303\304\217\210\305 \306V\205& \307\306\302\310\311!\211	L\210\312\313\314\315\316D\317FE)#\210\320 \207" [#1=#:--cl-proc-- proc nil (byte-code "\303 \304\211\203% 	@rq\210\305\302!\203 \n\203 \306 \210)	A\211\204	 *\304\207" [buffer #2=#:--cl-dolist-temp-- isearch-mode buffer-list nil boundp isearch-cancel] 3) ((quit (message nil))) recursion-depth 0 run-with-timer make-symbol "--proc--" lambda (&rest --cl-rest--) apply #[(#3=#:G93000) "\301J!\207" [#3# server-execute-continuation] 2] quote --cl-rest-- top-level] 10])
(defalias 'server-execute-continuation #[(proc) "\302\301\"\303\301\304#\210	\205 \304\305\306\217)\207" [proc continuation process-get process-put nil (funcall continuation) ((error))] 4])
#@2413 Process a request from the server to edit some files.
PROC is the server process.  STRING consists of a sequence of
commands prefixed by a dash.  Some commands have arguments;
these are &-quoted and need to be decoded by `server-unquote-arg'.
The filter parses and executes these commands.

To illustrate the protocol, here is an example command that
emacsclient sends to create a new X frame (note that the whole
sequence is sent on a single line):

	-env HOME=/home/lorentey
	-env DISPLAY=:0.0
	... lots of other -env commands
	-display :0.0
	-window-system

The following commands are accepted by the server:

`-auth AUTH-STRING'
  Authenticate the client using the secret authentication string
  AUTH-STRING.

`-env NAME=VALUE'
  An environment variable on the client side.

`-dir DIRNAME'
  The current working directory of the client process.

`-current-frame'
  Forbid the creation of new frames.

`-nowait'
  Request that the next frame created should not be
  associated with this client.

`-display DISPLAY'
  Set the display name to open X frames on.

`-position LINE[:COLUMN]'
  Go to the given line and column number
  in the next file opened.

`-file FILENAME'
  Load the given file in the current frame.

`-eval EXPR'
  Evaluate EXPR as a Lisp expression and return the
  result in -print commands.

`-window-system'
  Open a new X frame.

`-tty DEVICENAME TYPE'
  Open a new tty frame at the client.

`-suspend'
  Suspend this tty frame.  The client sends this string in
  response to SIGTSTP and SIGTTOU.  The server must cease all I/O
  on this tty until it gets a -resume command.

`-resume'
  Resume this tty frame.  The client sends this string when it
  gets the SIGCONT signal and it is the foreground process on its
  controlling tty.

`-ignore COMMENT'
  Do nothing, but put the comment in the server log.
  Useful for debugging.


The following commands are accepted by the client:

`-emacs-pid PID'
  Describes the process id of the Emacs process;
  used to forward window change signals to it.

`-window-system-unsupported'
  Signals that the server does not support creating X frames;
  the client must try again with a tty frame.

`-print STRING'
  Print STRING on stdout.  Used to send values
  returned by -eval.

`-error DESCRIPTION'
  Signal an error and delete process PROC.

`-suspend'
  Suspend this terminal, i.e., stop the client process.
  Sent when the user presses C-z.
(defalias 'server-process-filter #[(proc string) "\300\301\215\207" [--cl-block-server-process-filter-- (byte-code "\303\304P	\"\210\305	\306\"\204L \307\310\"\2035 \311\312\"\305	\313\"\232\2035 \314\225\315O\316	\306\317#\210\303\320	\"\210\202L \303\321	\"\210\322	\323\324\321!P\"\210\325	!\210\326\327\315\"\210\305	\330\"\211\203_ \nP\316	\330\315#\210)\331\332\333\217\207" [string proc prev server-log "Received " process-get :authenticated string-match "-auth \\([!-~]+\\)\n?" match-string 1 :auth-key 0 nil process-put t "Authentication successful" "Authentication failed" server-send-string "-error " server-quote-arg delete-process throw --cl-block-server-process-filter-- previous-string err (byte-code "\306!\210\307\310	\"\204 	G\311V\205\200\312\313	#\207\311\225	G=\204& \314\315\316C\"\210	\311\211\224O\317\320!\2056 \n\2066 \321\211\211\211\211\211\211\211\211\211\211\211\211@ABCDEFGHIJKL	\311\225\321O\322\323\324L\325\326#\"\211A@\211\203t\f\327\232\203\214 \203\214 \211A@\210\202o \f\330\232\203\230 \326J\202o \f\331\232\203\244 \326D\202o \f\332\232\203\303 \203\303 \211A@H\333HG!\203o \321H\202o \f\334\232\203\322 \326G\335C\202o \f\336\232\203\373 \337\340!\211M\341\342\"L\210\326G\343\344\345\346\347MD\350FEFBF)\202o \f\351\232\203$\337\340!\211N\341\342\"L\210\326G\343\344\345\352\347ND\350FEFBF)\202o \f\353\232\203=\203=\326\211G\203=\211A@\204o \f\354\232\203cA\203c\211A@C\211A@BG\206^D?G\202o \f\355\232\203\221\203\221\307\356@\"\203\221\211A@\357\360\361\f\"!\357\360\362\f\"\206\212\363!B@\202o \f\364\232\203\326\203\326\211A@OK\203\257\365OK\"O\366OE\"\211O@BABA\367\370\371O@\206\313\363#\"\210)\321@\202o \f\372\232\203\203D\203\350\373D\337\374!\211P\211A@L\210K\203P\365PJK\"L\210\343\344\345\375\347PD\350FEFBF\321@)\202o \f\376\232\203=\203=\211A@Q\312\377Q\341\377\"B#\210)\202o \f\201[ \232\203h\203h\211A@EK\203]\365EK\"E\201\\ E!E\202o \201] \201^ \f\"\210\202o D\203\255D\373=\204\231\201_  \203\231\201`  A\204\231\201a  R=\204\255\321\211CBH\205\316\201b H!\202\316C\335=\203\300\201c HJ#\202\316C\205\316\201d CB#I\312\201e \337\201f !\337\201g !\337\201h !\337\201i !\337\201j !\337\201k !\337\201l !\337\201m !STUVWXY\211ZL\210YAL\210XJL\210WFL\210VGL\210UIL\210TEL\210SCL\210\343\344\345\201n \347SD\347TD\347UD\347VD\347WD\347XD\347YD\347ZD\350\257E.#\210I\204sA\203y\201o !\210\201p !.\207" [proc string file-name-coding-system default-file-name-coding-system arg command-line-args-left server-add-client string-match "\n" 0 process-put previous-string signal cl-assertion-failed (eq (match-end 0) (length string)) default-value enable-multibyte-characters nil mapcar server-unquote-arg split-string " " t "-version" "-nowait" "-current-frame" "-display" zerop "-window-system" window-system "-resume" make-symbol "--terminal--" process-get terminal lambda (&rest --cl-rest--) apply #[(#1=#:G93001) "\301J!\302=\205 \303J!\207" [#1# terminal-live-p t resume-tty] 2] quote --cl-rest-- "-suspend" #[(#2=#:G93002) "\301J!\302=\205 \303J!\207" [#2# terminal-live-p t suspend-tty] 2] "-ignore" "-tty" "-position" "\\+\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?" string-to-number match-string 1 2 "" "-file" decode-coding-string expand-file-name server-log format "New file: %s %s" "-eval" always "--expr--" #[(#3=#:G93003) "\302J	\"\207" [#3# proc server-eval-and-print] 3] "-env" env filepos files tty-type tty-name use-current-frame dir commands dontkill display frame nowait coding-system request #4=#:--cl-terminal-- #5=#:--cl-terminal-- file #6=#:--cl-expr-- var terminal-frame #7=#:--cl-tty-name-- #8=#:--cl-dir-- #9=#:--cl-frame-- #10=#:--cl-dontkill-- #11=#:--cl-commands-- #12=#:--cl-nowait-- #13=#:--cl-files-- #14=#:--cl-proc-- "-dir" command-line-normalize-file-name error "Unknown command: %s" daemonp frame-list selected-frame server-select-display server-create-window-system-frame server-create-tty-frame continuation "--proc--" "--files--" "--nowait--" "--commands--" "--dontkill--" "--frame--" "--dir--" "--tty-name--" #[(#15=#:G93004 #16=#:G93005 #17=#:G93006 #18=#:G93007 #19=#:G93008 #20=#:G93009 #21=#:G93010 #22=#:G93011) "r\306!q\210	J\203 \307	J!\203 	J\202 \n\310J\fJJ	J\nJJ\fJ&*\207" [server-buffer #16# default-directory #22# #21# #20# get-buffer-create file-directory-p server-execute #19# #18# #17# #15#] 8] server-goto-toplevel server-execute-continuation] 17) ((error (server-return-error proc err)))] 6)] 2 (#$ . 23935)])
(defalias 'server-execute #[(proc files nowait commands dontkill frame tty-name) "\300\301\302\217\207" [nil (byte-code "\301\302\303\304\217)\207" [inhibit-quit nil err (byte-code "\205 \306\307!\210\310	\n#\306\311!\210\312\313\f\237\"\210\n\203( \314\315	\"\210\316	!\210\2029 \2049 \2049 \314\317	\"\210\316	!\210\204r \320 \204r \203V \204V \321\322\323\324!\"\210\202r \203r \325@\326@A#\210\306\327!\210\n\204r \321\322\323\330!\"\210\205\201 ?\205\201 \331!)\207" [files proc nowait buffers commands dontkill run-hooks pre-command-hook server-visit-files post-command-hook mapc funcall server-log "Close nowait client" server-delete-client "Close empty client" minibufferp message "%s" substitute-command-keys "When done with this frame, type \\[delete-frame]" server-switch-buffer nil server-switch-hook "When done with a buffer, type \\[server-edit]" server-unselect-display isearch-mode frame tty-name] 4) ((error (server-return-error proc err)))] 3) ((quit (byte-code "\301\302\303!\207" [quit-flag t eval (ignore nil)] 2)))] 3])
(defalias 'server-return-error #[(proc err) "\300\301\302\217\207" [nil (byte-code "\302\303\304\305	!!P\"\210\306\305	!\"\210\307!\207" [proc err server-send-string "-error " server-quote-arg error-message-string server-log delete-process] 6) ((error))] 3])
#@91 Move point to the position indicated in LINE-COL.
LINE-COL should be a pair (LINE . COL).
(defalias 'server-goto-line-column #[(line-col) "\205 eb\210@Sy\210A\211\302V\205 \303	S!)\207" [line-col column-number 0 move-to-column] 3 (#$ . 32328)])
#@352 Find FILES and return a list of buffers created.
FILES is an alist whose elements are (FILENAME . FILEPOS)
where FILEPOS can be nil or a pair (LINENUMBER . COLUMNNUMBER).
PROC is the client that requested this operation.
NOWAIT non-nil means this client is not waiting for the results,
so don't mark these buffers specially, just visit them normally.
(defalias 'server-visit-files #[(files proc &optional nowait) "\306\307r\n\307\211\203\217 \f@\206 @\310!\311\312\"\210\2046 \313!q\210\202g q\210\314!\203P \315!\204_ \316\306\307\"\210\202_ \317\320\321Q!\203_ \322!\210\204g \306 \323A!\210\324\325!\210+!\204\204 \326\327\330\307\306$\210\"BpB\fA\211\204 +!\204\242 \331\"\332\333\"\332\"\244#\210*\207" [client-record last-nonmenu-event files file #1=#:--cl-dolist-temp-- server-raise-frame t nil get-file-buffer add-to-history file-name-history find-file-noselect file-exists-p verify-visited-file-modtime revert-buffer y-or-n-p "File no longer exists: " ", write buffer to file? " write-file server-goto-line-column run-hooks server-visit-hook add-hook kill-buffer-hook server-kill-buffer process-put buffers process-get minibuffer-auto-raise filen obuf server-buffer-clients server-existing-buffer nowait proc] 6 (#$ . 32586)])
#@362 Mark BUFFER as "done" for its client(s).
This buries the buffer, then returns a list of the form (NEXT-BUFFER KILLED).
NEXT-BUFFER is another server buffer, as a suggestion for what to select next,
or nil.  KILLED is t if we killed BUFFER (typically, because it was visiting
a temp file).
FOR-KILLING if non-nil indicates that we are called from `kill-buffer'.
(defalias 'server-buffer-done #[(buffer &optional for-killing) "\306\211\n\306\211\203 \f@\307\305\"	\204 >A@\203w \310\"\211\306\211\203U @\311!\203L \312!\204L \310\"A\211\2043 *\313\305#\210\204w \314\315\"\210\203s r\316!\210)\202w \316!\210)\fA\211\204\f *\311!\203\376 \317!\203\376 \320rq\210\306\321\322!\210)\317!\204\252 \320\202\375 \204\375 \204\331 \203\331 rq\210)\204\331 \320\323!\210rq\210\324\306!\210)\325!\210\204\375 \326!\203\370 rq\210\324\306!\210)\325!\210\320\202\375 \323!\210)	*D\207" [killed next-buffer server-clients proc #1=#:--cl-dolist-temp-- buffers nil process-get delq bufferp buffer-live-p process-put server-log "Close" server-delete-client buffer-name t run-hooks server-done-hook bury-buffer set-buffer-modified-p kill-buffer server-temp-file-p buffer b #2=#:--cl-dolist-temp-- for-killing server-kill-buffer-running server-buffer-clients server-kill-new-buffers server-existing-buffer] 5 (#$ . 33882)])
#@258 Return non-nil if BUFFER contains a file considered temporary.
These are files whose names suggest they are repeatedly
reused to pass information to another program.

The variable `server-temp-file-regexp' controls which filenames
are considered temporary.
(defalias 'server-temp-file-p #[(&optional buffer) "\306!\205 	\306!\307\310\311\f\n#,\207" [buffer server-temp-file-regexp start string regexp inhibit-changing-match-data buffer-file-name nil t string-match] 4 (#$ . 35282)])
#@378 Offer to save current buffer, mark it as "done" for clients.
This kills or buries the buffer, then returns a list
of the form (NEXT-BUFFER KILLED).  NEXT-BUFFER is another server buffer,
as a suggestion for what to select next, or nil.
KILLED is t if we killed BUFFER, which happens if it was created
specifically for the clients and did not exist before their request for it.
(defalias 'server-done #[nil "\205, \304 \203 \305\211\306 \210*\202) \307 \203) \203) \310\311\312Q!\203) \306 \210\313p!\207" [server-buffer-clients buffer-backed-up version-control buffer-file-name server-temp-file-p nil save-buffer buffer-modified-p y-or-n-p "Save file " "? " server-buffer-done] 4 (#$ . 35780)])
#@37 Ask before killing a server buffer.
(defalias 'server-kill-buffer-query-function #[nil "?\2068 \305\306\211\203) @\211\f>\203\" \307\n!\310=\203\" \306A\211\204 \306	+\2068 \311\312\313\314p!\"!\207" [server-buffer-clients res proc #1=#:--cl-dolist-temp-- server-clients t nil process-status open yes-or-no-p format "Buffer `%s' still has clients; kill it? " buffer-name] 5 (#$ . 36487)])
#@50 Ask before exiting Emacs if it has live clients.
(defalias 'server-kill-emacs-query-function #[nil "?\2061 \304\304\211\203' @\305\306\307\310\n\311\"\">\203  \305A\211\204 \304	+\2061 \312\313!\207" [server-clients live-client proc #1=#:--cl-dolist-temp-- nil t mapcar buffer-live-p process-get buffers yes-or-no-p "This Emacs session has clients; exit anyway? "] 7 (#$ . 36894)])
#@72 Non-nil while `server-kill-buffer' or `server-buffer-done' is running.
(defvar server-kill-buffer-running nil (#$ . 37294))
#@102 Remove the current buffer from its clients' buffer list.
Designed to be added to `kill-buffer-hook'.
(defalias 'server-kill-buffer #[nil "\206 	\205 \303\n\205 \304p\303\")\207" [server-kill-buffer-running server-buffer-clients server-process t server-buffer-done] 3 (#$ . 37425)])
#@773 Switch to next server editing buffer; say "Done" for current buffer.
If a server buffer is current, it is marked "done" and optionally saved.
The buffer is also killed if it did not exist before the clients asked for it.
When all of a client's buffers are marked as "done", the client is notified.

Temporary files such as MH <draft> files are always saved and backed up,
no questions asked.  (The variable `make-backup-files', if nil, still
inhibits a backup; you can set it locally in a particular buffer to
prevent a backup for it.)  The variable `server-temp-file-regexp' controls
which filenames are considered temporary.

If invoked with a prefix argument, or if there is no server process running,
starts server process and that is all.  Invoked by \[server-edit].
(defalias 'server-edit #[(&optional arg) "\204 	\203 \303	!\304>\203 \305\306!\207\n\203 \307\310\311 \"\207\312\313!\207" [arg server-process server-clients process-status (signal exit) server-mode 1 apply server-switch-buffer server-done message "No server editing buffers exist"] 3 (#$ . 37719) "P"])
#@501 Switch to another buffer, preferably one that has a client.
Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it.

KILLED-ONE is t in a recursive call if we have already killed one
temp-file server buffer.  This means we should avoid the final
"switch to some other buffer" since we've already effectively
done that.

FILEPOS specifies a new buffer position for NEXT-BUFFER, if we
visit NEXT-BUFFER in an existing window.  If non-nil, it should
be a cons cell (LINENUMBER . COLUMNNUMBER).
(defalias 'server-switch-buffer #[(&optional next-buffer killed-one filepos) "\204M 	\n\203/ \204/ \n@\306\307\"\203\" \306\307\"\310 =\203( \306\311\"@\nA)\202 )\2039 \312\f\"\210\206E \f\206E \313\314 !?\205\340 \315\316!\207\317!\204] \320\312\321!\"\210\202\325 \322!\203j !\210\202\325 \323\324\"\211'\203\215 \204\215 \325'!\210q\210(\203\324 \326(!\210\202\324 \327!\203\232 \325!\210\202\257 \330!\203\257 \331!\204\251 \332 \325\333!!\210\334\314 !\203\276 \325\335\336\337\324#!\210\313\314 !\203\317 \325\340\341\337\342\314 $!\210\336\343\344\217\210))\205\340 \345\346\314 !!\207" [next-buffer server-clients rest proc killed-one server-window process-get frame selected-frame buffers server-switch-buffer window-dedicated-p selected-window message "No server buffers remain to edit" buffer-live-p apply server-buffer-done functionp get-buffer-window 0 select-window server-goto-line-column window-live-p framep frame-live-p make-frame frame-selected-window window-minibuffer-p next-window nil nomini get-window-with-predicate #[(w) "\301!?\205 \302\303!!\302\304 !\232\207" [w window-dedicated-p frame-terminal window-frame selected-frame] 3] visible (switch-to-buffer next-buffer) ((error (pop-to-buffer next-buffer))) select-frame-set-input-focus window-frame win filepos server-raise-frame] 7 (#$ . 38807)])
#@239 Offer to save each buffer, then kill the current client.
With ARG non-nil, silently save all file-visiting buffers, then kill.

If emacsclient was started with a list of filenames to edit, then
only these files will be asked to be saved.
(defalias 'server-save-buffers-kill-terminal #[(arg) "\303\304 \305\"\211\306=\203! \307 A\203 \310	!\210\311 \202C \312	!\202C \313!\203@ \314\302\"\310	\n\2036 \315\2027 \316\"\210\317!)\202C \320\321!)\207" [proc arg buffers frame-parameter selected-frame client nowait frame-list save-some-buffers delete-frame save-buffers-kill-emacs processp process-get #[nil "p>\207" [buffers] 2] t server-delete-client error "Invalid client frame"] 4 (#$ . 40674)])
(define-key ctl-x-map "#" 'server-edit)
#@28 Unload the server library.
(defalias 'server-unload-function #[nil "\303\304!\210\305\306\307#\210r\310 \307\211\203' \n@\211q\210\311\312\313\314#\210\nA\211\204 +\307\207" [ctl-x-map buffer #1=#:--cl-dolist-temp-- server-mode -1 substitute-key-definition server-edit nil buffer-list remove-hook kill-buffer-hook server-kill-buffer t] 5 (#$ . 41423)])
(provide 'server)
