?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/server.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:30 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/server.el ;;; in Emacs version 24.3.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\314\315\304\301\316\317\320\321&\210\306\322\310\311\323DD\324\304\301\316\325\320\321& \210\326\322\327\330#\210\306\331\310\311\332DD\333\304\301\316\334\320\335& \210\326\331\327\330#\210\306\336\310\311\337DD\340\304\301\316\341\320\321& \210\326\336\327\330#\210\306\342\310\311\343DD\344\304\301\316\345\320\346& \210\306\347\310\311\350DD\351\304\301\316\317\320\321& \210\306\352\310\311\353DD\354\304\301\316\355&\210\306\356\310\311\357DD\360\304\301\316\355&\210\306\361\310\311\362DD\363\304\301\316\355&\207" [custom-declare-group server nil "Emacs running as a server process." :group external custom-declare-variable server-use-tcp funcall function #[0 "\300\207" [nil] 1 "\n\n(fn)"] "If non-nil, use TCP sockets instead of local sockets." :set #[514 "\301\302\303\"\204 \304\262\204 \305\306!\210\307\"\207" [load-in-progress featurep make-network-process (:family local) t message "Local sockets unsupported, using TCP sockets" set-default] 5 "\n\n(fn SYM VAL)"] :type boolean :version "22.1" server-host #[0 "\300\207" [nil] 1 "\n\n(fn)"] "The name or IP address to use as host address of the server process.\nIf set, the server accepts remote connections; otherwise it is local.\n\nDO NOT give this a non-nil value unless you know what you are\ndoing! On unsecured networks, accepting remote connections is\nvery dangerous, because server-client communication (including\nsession authentication) is not encrypted." (choice (string :tag "Name or IP address") (const :tag "Local" nil)) put risky-local-variable t server-port #[0 "\300\207" [nil] 1 "\n\n(fn)"] "The port number that the server process should listen on.\nThis variable only takes effect when the Emacs server is using\nTCP instead of local sockets. A nil value means to use a random\nport number." (choice (string :tag "Port number") (const :tag "Random" nil)) "24.1" server-auth-dir #[0 "\300\301!\207" [locate-user-emacs-file "server/"] 2 "\n\n(fn)"] "Directory for server authentication files.\nWe only use this if `server-use-tcp' is non-nil.\nOtherwise we use `server-socket-dir'.\n\nNOTE: On FAT32 filesystems, directories are not secure;\nfiles can be read and modified by any user or process.\nIt is strongly suggested to set `server-auth-dir' to a\ndirectory residing in a NTFS partition instead." directory server-auth-key #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Server authentication key.\nThis is only used if `server-use-tcp' is non-nil.\n\nNormally, the authentication key is randomly generated when the\nserver starts. It is recommended to leave it that way. Using a\nlong-lived shared key will decrease security (especially since\nthe key is transmitted as plain-text).\n\nIn some situations however, it can be difficult to share randomly\ngenerated passwords with remote hosts (e.g., no shared directory),\nso you can set the key with this variable and then copy the\nserver file to the remote host (with possible changes to IP\naddress and/or port if that applies).\n\nNote that the usual security risks of using the server over\nremote TCP, arising from the fact that client-server\ncommunications are unencrypted, still apply.\n\nThe key must consist of 64 ASCII printable characters except for\nspace (this means characters from ! to ~; or from code 33 to\n126). You can use \\[server-generate-key] to get a random key." (choice (const :tag "Random" nil) (string :tag "Password")) "24.3" server-raise-frame #[0 "\300\207" [t] 1 "\n\n(fn)"] "If non-nil, raise frame when switching to a buffer." server-visit-hook #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Hook run when visiting a file for the Emacs server." hook server-switch-hook #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Hook run when switching to a buffer for the Emacs server." server-done-hook #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Hook run when done editing a buffer for the Emacs server."] 12) #@29 The current server process. (defvar server-process nil (#$ . 4468)) #@60 List of current server clients. Each element is a process. (defvar server-clients nil (#$ . 4542)) #@64 List of client processes requesting editing of current buffer. (defvar server-buffer-clients nil (#$ . 4647)) (byte-code "\301\302!\210\303\302\304\305#\210\306\307\310\311\312DD\313\314\315\316\317\320\321& \210\306\322\310\311\323DD\324\314\315\320\325&\210\306\326\310\311\327DD\330\314\315\320\331\316\332& \210\302\236\204E \333B\301\207" [minor-mode-alist make-variable-buffer-local server-buffer-clients put permanent-local t custom-declare-variable server-window funcall function #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Specification of the window to use for selecting Emacs server buffers.\nIf nil, use the selected window.\nIf it is a function, it should take one argument (a buffer) and\ndisplay and select it. A common value is `pop-to-buffer'.\nIf it is a window, use that.\nIf it is a frame, use the frame's selected window.\n\nIt is not meaningful to set this to a specific frame or window with Custom.\nOnly programs can do so." :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")) server-temp-file-regexp #[0 "\300\207" ["^/tmp/Re\\|/draft$"] 1 "^/tmp/Re\\|/draft$\n\n(fn)"] "Regexp matching names of temporary files.\nThese are deleted and reused after each edit by the programs that\ninvoke the Emacs server." regexp server-kill-new-buffers #[0 "\300\207" [t] 1 "\n\n(fn)"] "Whether to kill buffers when done with them.\nIf non-nil, kill a buffer unless it already existed before editing\nit with the Emacs server. If nil, kill only buffers as specified by\n`server-temp-file-regexp'.\nPlease note that only buffers that still have a client are killed,\ni.e. buffers visited with \"emacsclient --no-wait\" are never killed\nin this way." boolean "21.1" (server-buffer-clients " Server")] 10) #@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 (#$ . 6614)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\315& \207" [make-variable-buffer-local server-existing-buffer custom-declare-variable server-name funcall function #[0 "\300\207" ["server"] 1 "server\n\n(fn)"] "The name of the Emacs server, if this Emacs process creates one.\nThe command `server-start' makes use of this. It should not be\nchanged while a server is running." :group server :type string :version "23.1"] 10) #@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) (#$ . 7295)) #@75 Return a list of clients with PROPERTY set to VALUE. (fn PROPERTY VALUE) (defalias 'server-clients-with #[514 "\301\211\203 \211@\302\"\232\203 \211B\262A\266\202\202 \210\211\207" [server-clients nil process-get] 9 (#$ . 7614)]) #@110 Create a client for process PROC, if it doesn't already have one. New clients have no properties. (fn PROC) (defalias 'server-add-client #[257 "\300\301\"\207" [add-to-list server-clients] 4 (#$ . 7863)]) #@258 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'. (fn ENV VARS &rest BODY) (defalias 'server-with-environment '(macro . #[642 "\300\301!\300\302!\303\304\305D\303\306\fEDC\307\310\311 D\312\313\fFF\314BBEE\315BF\207" [make-symbol "var" "value" let ((process-environment process-environment)) dolist getenv-internal push if stringp concat "=" (process-environment) progn] 18 (#$ . 8077)])) (put 'server-with-environment 'lisp-indent-function 2) #@158 Delete PROC, including its buffers, terminals and frames. If NOFRAME is non-nil, let the frames live. Updates `server-clients'. (fn PROC &optional NOFRAME) (defalias 'server-delete-client #[513 "\305\306\205 \307P\"\210>\205\310 \310\311\"\211\211\203h \211@\312!\203a r\211q\210 C\232\203` \n\2035 \203: \313 \203` \314 \204` \315C\316\317\320\321\322\323\"\324\"\325\326%DC\216\315\327p!\210\211\330\240\210)\210)A\266\202\202 \210\204\226 \331 \211\203\225 \211@\332!\203\216 \333\334\"\232\203\216 \335\334\315#\210\336!\210A\266\202\202o \210\337\"\f\340=\204\266 \310\341\"\211\203\265 \342!\330=\203\265 \343!\210\210\344!\345=\203\302 \346!\210\305\347\"\262\207" [server-clients server-buffer-clients server-kill-new-buffers server-existing-buffer system-type server-log "server-delete-client" " noframe" process-get buffers buffer-live-p server-temp-file-p buffer-modified-p nil funcall make-byte-code 0 "\301@?\205\n \300C\211\207" vconcat vector [server-buffer-clients] 2 "\n\n(fn)" kill-buffer t frame-list frame-live-p frame-parameter client set-frame-parameter delete-frame delq windows-nt terminal terminal-live-p delete-terminal process-status open delete-process "Deleted"] 14 (#$ . 8725)]) #@54 Function to generate timestamps for `server-buffer'. (defvar server-log-time-function 'current-time-string (#$ . 9975)) #@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*" (#$ . 10102)) #@73 If non-nil, log the server's inputs and outputs in the `server-buffer'. (defvar server-log nil (#$ . 10407)) #@159 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. (fn STRING &optional CLIENT) (defalias 'server-log #[513 "\2053 r\303 !q\210db\210\n \204 \304\202( <\203$ \305\306@\"\202( \305\306\"\261\210n\2062 \307 )\207" [server-log server-buffer server-log-time-function get-buffer-create " " format " %s: " newline] 6 (#$ . 10523)]) #@67 The process sentinel for Emacs server connections. (fn PROC MSG) (defalias 'server-sentinel #[514 "\300!\301=\203 \302!\203 \303\304\"\210\305\306\"\203; \300!\307=\203; \310\311\312\313\314\315\316!\317\"\320\321%D\322\311\323\310EDC\217\210\324\325\326\300!#\"\210\327!\207" [process-status open process-query-on-exit-flag set-process-query-on-exit-flag nil process-contact :server closed #1=#:err funcall make-byte-code 0 "\301\302\300\303\"!\207" vconcat vector [delete-file process-get :server-file] 4 "\n\n(fn)" error #[257 "\300\207" [nil] 2 "\n\n(fn IGNORED)"] server-log format "Status changed to %s: %s" server-delete-client] 10 (#$ . 10941)]) (defalias 'server--on-display-p #[514 "\300\301\"\232\205 \302!\303=?\207" [frame-parameter display framep t] 5 "\n\n(fn FRAME DISPLAY)"]) (defalias 'server-select-display #[257 "\300\301!?\206\f \302\303 \"?\205K \304 \211\203* \211@\302\"\203# \305!\210A\266\202\202 \210\302\303 \"?\205K \306\307!\301\310B\311B\"\305!\210\312\313 \"\210\262\207" [fboundp make-frame-on-display server--on-display-p selected-frame frame-list select-frame generate-new-buffer " *server-dummy*" server-dummy-buffer ((visibility)) set-window-buffer selected-window] 6 "\n\n(fn DISPLAY)"]) (defalias 'server-unselect-display #[257 "\300!\2059 \301\302\"\303\304\"\203\"