?
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/shadowfile.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/shadowfile.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!\210\302\303\304\305\306\307\310\311\312\313& \210\314\315\304\316\317\320\312\303&\210\314\321\304\322\317\323\312\303&\210\314\324\304\325\317\323\312\303&\210\314\326\304\327\317\330\312\303&\210\314\331\304\332\317\333\312\303&\207" [require ange-ftp custom-declare-group shadow nil "Automatic file copying when saving a file." :prefix "shadow-" :link (emacs-commentary-link "shadowfile") :group files custom-declare-variable shadow-noquery "If t, always copy shadow files without asking.\nIf nil (the default), always ask. If not nil and not t, ask only if there\nis no buffer currently visiting the file." :type (choice (const t) (const nil) (other :tag "Ask if no buffer" maybe)) shadow-inhibit-message "If non-nil, do not display a message when a file needs copying." boolean shadow-inhibit-overload "If non-nil, shadowfile won't redefine \\[save-buffers-kill-emacs].\nNormally it overloads the function `save-buffers-kill-emacs' to check for\nfiles that have been changed and need to be copied to other systems." shadow-info-file "File to keep shadow information in.\nThe `shadow-info-file' should be shadowed to all your accounts to\nensure consistency. Default: ~/.shadows" (choice (const nil) file) shadow-todo-file "File to store the list of uncopied shadows in.\nThis means that if a remote system is down, or for any reason you cannot or\ndecide not to copy your shadow files at the end of one Emacs session, it will\nremember and ask you again in your next Emacs session.\nThis file must NOT be shadowed to any other system, it is host-specific.\nDefault: ~/.shadow_todo" (choice (const nil) file)] 10) #@40 The complete hostname of this machine. (defvar shadow-system-name (system-name) (#$ . 2200)) #@38 Your home directory on this machine. (defvar shadow-homedir nil (#$ . 2299)) #@54 List of host clusters (see `shadow-define-cluster'). (defvar shadow-clusters nil (#$ . 2382)) #@149 List of files that are shared between hosts. This list contains shadow structures with literal filenames, created by `shadow-define-literal-group'. (defvar shadow-literal-groups nil (#$ . 2483)) #@162 List of file types that are shared between hosts. This list contains shadow structures with regexps matching filenames, created by `shadow-define-regexp-group'. (defvar shadow-regexp-groups nil (#$ . 2685)) (defvar shadow-files-to-copy nil) (defvar shadow-hashtable nil) (defvar shadow-info-buffer nil) (defvar shadow-todo-buffer nil) #@69 Add members of list A to list B if not equal to items already in B. (defalias 'shadow-union #[(a b) "\204 \207@ \235\203 \302A \"\207\302A@ B\"\207" [a b shadow-union] 4 (#$ . 3026)]) #@80 If FUNC applied to some element of LIST is non-nil, return first such element. (defalias 'shadow-find #[(func list) "\203 @!\204 A\211\204 @\207" [list func] 3 (#$ . 3224)]) #@123 Remove elements satisfying FUNC from LIST. Nondestructive; actually returns a copy of the list with the elements removed. (defalias 'shadow-remove-if #[(func list) "\205 @!\203 \302 A\"\207@\302 A\"B\207" [list func shadow-remove-if] 4 (#$ . 3414)]) #@99 Like `regexp-quote', but includes the ^ and $. This makes sure regexp matches nothing but STRING. (defalias 'shadow-regexp-superquote #[(string) "\301\302!\303Q\207" [string "^" regexp-quote "$"] 3 (#$ . 3678)]) #@130 If PREFIX begins STRING, return the rest. Return value is non-nil if PREFIX and STRING are `string=' up to the length of PREFIX. (defalias 'shadow-suffix #[(prefix string) "G G\nY\205 \304O\230\205 \305O*\207" [prefix string ls lp 0 nil] 4 (#$ . 3898)]) #@309 Create a shadow cluster. It is called NAME, uses the PRIMARY hostname and REGEXP matching all hosts in the cluster. The variable `shadow-clusters' associates the names of clusters to these structures. This function is for program use: to create clusters interactively, use `shadow-define-cluster' instead. (defalias 'shadow-make-cluster #[(name primary regexp) " \nE\207" [name primary regexp] 3 (#$ . 4170)]) #@33 Return the name of the CLUSTER. (defalias 'shadow-cluster-name '(macro . #[(cluster) "\301\302E\207" [cluster elt 0] 3 (#$ . 4589)])) #@43 Return the primary hostname of a CLUSTER. (defalias 'shadow-cluster-primary '(macro . #[(cluster) "\301\302E\207" [cluster elt 1] 3 (#$ . 4730)])) #@48 Return the regexp matching hosts in a CLUSTER. (defalias 'shadow-cluster-regexp '(macro . #[(cluster) "\301\302E\207" [cluster elt 2] 3 (#$ . 4884)])) #@197 Put cluster NAME on the list of clusters. Replace old definition, if any. PRIMARY and REGEXP are the information defining the cluster. For interactive use, call `shadow-define-cluster' instead. (defalias 'shadow-set-cluster #[(name primary regexp) "\305\306\"\307\n\f# B\211)\207" [shadow-clusters rest name primary regexp shadow-remove-if #[(x) " @\232\207" [name x] 2] shadow-make-cluster] 4 (#$ . 5043)]) #@36 Return cluster named NAME, or nil. (defalias 'shadow-get-cluster '(macro . #[(name) "\301\302E\207" [name assoc shadow-clusters] 3 (#$ . 5464)])) #@67 If SITE is a cluster, return primary host, otherwise return SITE. (defalias 'shadow-site-primary #[(site) "\303 \"\211\203 \n\304\234\202 )\207" [site shadow-clusters c assoc 1] 4 (#$ . 5617)]) #@75 Given a SITE (hostname or cluster name), return cluster it is in, or nil. (defalias 'shadow-site-cluster #[(site) "\302 \"\206 \303\304 \"\207" [site shadow-clusters assoc shadow-find #[(x) "\302\303\234 \"\207" [x site string-match 2] 3]] 3 (#$ . 5822)]) #@54 Read a cluster name or hostname from the minibuffer. (defalias 'shadow-read-site #[nil "\302\303\"\211\304\232?\205 )\207" [shadow-clusters ans completing-read "Host or cluster name [RET when done]: " ""] 4 (#$ . 6087)]) #@160 Non-nil if SITE1 is or includes SITE2. Each may be a host or cluster name; if they are clusters, regexp of SITE1 will be matched against the primary of SITE2. (defalias 'shadow-site-match #[(site1 site2) " \230\206 \305\n\"\306 !\203 \307\310\234\f\"\202 \f\230*\207" [site1 site2 shadow-clusters cluster1 primary2 assoc shadow-site-primary string-match 2] 3 (#$ . 6319)]) #@41 Return the default username for a SITE. (defalias 'shadow-get-user #[(site) "\301\302!!\207" [site ange-ftp-get-user shadow-site-primary] 3 (#$ . 6708)]) #@142 Parse FULLNAME into (site user path) list. Leave it alone if it already is one. Return nil if the argument is not a full ange-ftp pathname. (defalias 'shadow-parse-fullname #[(fullname) "<\203 \207\301!\207" [fullname ange-ftp-ftp-name] 2 (#$ . 6870)]) #@118 Parse any NAME into (site user name) list. Argument can be a simple name, full ange-ftp name, or already a hup list. (defalias 'shadow-parse-name #[(name) "\302!\206 \303 E\207" [name shadow-system-name shadow-parse-fullname user-login-name] 3 (#$ . 7135)]) #@124 Make an ange-ftp style fullname out of HOST, USER (optional), and NAME. This is probably not as general as it ought to be. (defalias 'shadow-make-fullname #[(host user name) "\303\205 \304P \305\n\260\207" [user host name "/" "@" ":"] 5 (#$ . 7404)]) (put 'shadow-make-fullname 'byte-optimizer 'byte-compile-inline-expand) #@61 Return FULLNAME with the name component changed to NEWNAME. (defalias 'shadow-replace-name-component #[(fullname newname) "\306!\211@ A@\n\307\f\205 \f\310P \311\260,\207" [fullname hup newname name user host shadow-parse-fullname "/" "@" ":"] 6 (#$ . 7737)]) #@130 If FILE is at this site, remove /user@host part. If refers to a different system or a different user on this system, return nil. (defalias 'shadow-local-file #[(file) "\303!\211\204\f \202$ \304 @\n\"\203# A@\305 \230\203# \306 8\202$ \307)\207" [file hup shadow-system-name shadow-parse-fullname shadow-site-match user-login-name 2 nil] 4 (#$ . 8012)]) #@130 If hostname part of FILE is a cluster, expand it to cluster's primary hostname. Will return the name bare if it is a local file. (defalias 'shadow-expand-cluster-in-file-name #[(file) "\305!\211\204\f \202- \306 !\206- \307 @! A@\310 8\311\205' \312P\f\313\n\260+)\207" [file hup name user host shadow-parse-name shadow-local-file shadow-site-primary 2 "/" "@" ":"] 6 (#$ . 8377)]) #@44 Expand file name and get FILE's true name. (defalias 'shadow-expand-file-name #[(file &optional default) "\302\303 \"!\207" [file default file-truename expand-file-name] 4 (#$ . 8774)]) #@162 Simplify FILE. Do so by replacing (when possible) home directory with ~, and hostname with cluster name that includes it. Filename should be absolute and true. (defalias 'shadow-contract-file-name #[(file) "\306!\307 !\203 \n\202- \310\311\312\313 @ A@\314\315\f\205# \f\316P \317\260+!!8!\320\311 8\"\321 @!\211\203I \322\234\202K @ A@\203Z \323P\202] \311 8\315\f\205h \f\316P \317\260.\207" [file hup shadow-homedir name user host shadow-parse-name shadow-local-file file-name-as-directory 2 shadow-parse-fullname expand-file-name "~" "/" "@" ":" shadow-suffix shadow-site-cluster 0 "~/" homedir suffix cluster] 10 (#$ . 8968)]) #@237 True if the site of PATTERN and of FILE are on the same site. If usernames are supplied, they must also match exactly. PATTERN and FILE may be lists of host, user, name, or ange-ftp file names. FILE may also be just a local filename. (defalias 'shadow-same-site #[(pattern file) "\304!\305 !\306@\n@\"\205 A@?\206 A@\nA@\230*\207" [pattern file file-sup pattern-sup shadow-parse-fullname shadow-parse-name shadow-site-match] 3 (#$ . 9637)]) #@404 Return t if PATTERN matches FILE. If REGEXP is supplied and non-nil, the file part of the pattern is a regular expression, otherwise it must match exactly. The sites and usernames must match---see `shadow-same-site'. The pattern must be in full ange-ftp format, but the file can be any valid filename. This function does not do any filename expansion or contraction, you must do that yourself first. (defalias 'shadow-file-match #[(pattern file &optional regexp) "\305!\306\n!\307 \"\205% \f\203 \310\311 8\3118\"\202% \311 8\3118\230*\207" [pattern pattern-sup file file-sup regexp shadow-parse-fullname shadow-parse-name shadow-same-site string-match 2] 4 (#$ . 10095)]) #@373 Edit (or create) the definition of a cluster NAME. This is a group of hosts that share directories, so that copying to or from one of them is sufficient to update the file on all of them. Clusters are defined by a name, the network address of a primary host (the one we copy files to), and a regular expression that matches the hostnames of all the sites in the cluster. (defalias 'shadow-define-cluster #[(name) "\306 \"\307\310\n\203 \n\311\234\202 \"\312\313\307\314\n\203# \n\315\234\202&