%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/shadowfile.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\300\302!\210\303\304\305\306\307\310\311\312\313\314& \210\315\316\305\317\320\321\313\304&\210\315\322\305\323\320\324\313\304&\210\315\325\305\326\320\324\313\304&\210\315\327\330\331\320\332\313\304\333\334& \210\315\335\336\337\320\332\313\304\333\334& \207" [require cl-lib tramp 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 (locate-user-emacs-file "shadows" ".shadows") "File to keep shadow information in.\nThe `shadow-info-file' should be shadowed to all your accounts to\nensure consistency. Default: ~/.emacs.d/shadows" file :version "26.2" shadow-todo-file (locate-user-emacs-file "shadow_todo" ".shadow_todo") "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: ~/.emacs.d/shadow_todo"] 10) #@53 The identification for local files on this machine. (defvar shadow-system-name (byte-code "\300\301 \302Q\207" ["/" system-name ":"] 3) (#$ . 2173)) #@38 Your home directory on this machine. (defvar shadow-homedir "~" (#$ . 2328)) #@54 List of host clusters (see `shadow-define-cluster'). (defvar shadow-clusters nil (#$ . 2411)) #@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 (#$ . 2512)) #@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 (#$ . 2714)) (defvar shadow-files-to-copy nil) (defvar shadow-hashtable nil) (defvar shadow-info-buffer nil) (defvar shadow-todo-buffer nil) #@25 Use for debug messages. (defvar shadow-debug nil (#$ . 3055)) #@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 (#$ . 3123)]) #@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 (#$ . 3321)]) #@101 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 (#$ . 3511)]) #@135 If PREFIX begins with 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 \304 \305#\230\205 \304 \"*\207" [prefix string ls lp substring 0] 5 (#$ . 3737)]) #@49 compiler-macro for inlining `shadow-cluster-p'. (defalias 'shadow-cluster-p--cmacro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block shadow-cluster-p (and (memq (car-safe cl-x) cl-struct-shadow-cluster-tags) t)) nil] 7 (#$ . 4024)]) (put 'shadow-cluster-p 'compiler-macro 'shadow-cluster-p--cmacro) (defalias 'shadow-cluster-p #[(cl-x) "\242 >\205 \302\207" [cl-x cl-struct-shadow-cluster-tags t] 2]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put shadow-cluster-p side-effect-free error-free put shadow-cluster cl-deftype-satisfies] 5) #@52 compiler-macro for inlining `shadow-cluster-name'. (defalias 'shadow-cluster-name--cmacro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block shadow-cluster-name (progn (or (shadow-cluster-p cl-x) (signal 'wrong-type-argument (list 'shadow-cluster cl-x))) (nth 1 cl-x))) nil] 7 (#$ . 4639)]) (put 'shadow-cluster-name 'compiler-macro 'shadow-cluster-name--cmacro) #@53 Access slot "name" of `shadow-cluster' struct CL-X. (defalias 'shadow-cluster-name #[(cl-x) "\242 >\204 \302\303\304D\"\210A@\207" [cl-x cl-struct-shadow-cluster-tags signal wrong-type-argument shadow-cluster] 4 (#$ . 5057)]) (byte-code "\300\301\302\303#\300\207" [function-put shadow-cluster-name side-effect-free t] 4) #@55 compiler-macro for inlining `shadow-cluster-primary'. (defalias 'shadow-cluster-primary--cmacro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block shadow-cluster-primary (progn (or (shadow-cluster-p cl-x) (signal 'wrong-type-argument (list 'shadow-cluster cl-x))) (nth 2 cl-x))) nil] 7 (#$ . 5389)]) (put 'shadow-cluster-primary 'compiler-macro 'shadow-cluster-primary--cmacro) #@56 Access slot "primary" of `shadow-cluster' struct CL-X. (defalias 'shadow-cluster-primary #[(cl-x) "\242 >\204 \302\303\304D\"\210\3058\207" [cl-x cl-struct-shadow-cluster-tags signal wrong-type-argument shadow-cluster 2] 4 (#$ . 5822)]) (byte-code "\300\301\302\303#\300\207" [function-put shadow-cluster-primary side-effect-free t] 4) #@54 compiler-macro for inlining `shadow-cluster-regexp'. (defalias 'shadow-cluster-regexp--cmacro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block shadow-cluster-regexp (progn (or (shadow-cluster-p cl-x) (signal 'wrong-type-argument (list 'shadow-cluster cl-x))) (nth 3 cl-x))) nil] 7 (#$ . 6168)]) (put 'shadow-cluster-regexp 'compiler-macro 'shadow-cluster-regexp--cmacro) #@55 Access slot "regexp" of `shadow-cluster' struct CL-X. (defalias 'shadow-cluster-regexp #[(cl-x) "\242 >\204 \302\303\304D\"\210\3058\207" [cl-x cl-struct-shadow-cluster-tags signal wrong-type-argument shadow-cluster 3] 4 (#$ . 6596)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put shadow-cluster-regexp side-effect-free t defalias copy-shadow-cluster copy-sequence] 4) #@102 compiler-macro for inlining `make-shadow-cluster'. (fn CL-WHOLE &cl-quote &key NAME PRIMARY REGEXP) (defalias 'make-shadow-cluster--cmacro #[(cl-whole &rest #1=#:--cl-rest--) "\306\307\"A@\306\310\"A@\306\311\"A@\f\203A \f@\312>\203* \fAA\211\202 \313>A@\2038 \314\211\202 \315\316\f@\"\210\202 )\317\320\321\314 \314 \n&+\207" [#1# name primary regexp #2=#:--cl-keys-- cl-whole plist-member :name :primary :regexp (:name :primary :regexp :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name :primary :regexp)" cl--defsubst-expand (name primary regexp) (cl-block make-shadow-cluster (list 'shadow-cluster name primary regexp))] 10 (#$ . 6993)]) (put 'make-shadow-cluster 'compiler-macro 'make-shadow-cluster--cmacro) #@82 Constructor for objects of type `shadow-cluster'. (fn &key NAME PRIMARY REGEXP) (defalias 'make-shadow-cluster #[(&rest #1=#:--cl-rest--) "\305\306\"A@\305\307\"A@\305\310\"A@\f\203A \f@\311>\203* \fAA\211\202 \312>A@\2038 \313\211\202 \314\315\f@\"\210\202 )\316 \nF+\207" [#1# name primary regexp #2=#:--cl-keys-- plist-member :name :primary :regexp (:name :primary :regexp :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name :primary :regexp)" shadow-cluster] 5 (#$ . 7766)]) (byte-code "\300\301\302\303#\304\305\306\211\307\303\310\311\305\306& \207" [function-put make-shadow-cluster side-effect-free t cl-struct-define shadow-cluster nil list ((cl-tag-slot) (name) (primary) (regexp)) cl-struct-shadow-cluster-tags] 11) #@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\fF B\211)\207" [shadow-clusters rest name primary regexp cl-remove-if #[(x) " \242\n>\204 \303\304\305 D\"\210 A@\232\207" [name x cl-struct-shadow-cluster-tags signal wrong-type-argument shadow-cluster] 5] shadow-cluster] 4 (#$ . 8550)]) #@36 Return cluster named NAME, or nil. (defalias 'shadow-get-cluster #[(name) "\301\302\"\207" [shadow-clusters shadow-find #[(x) "\242 >\204 \303\304\305D\"\210A@\n\230\207" [x cl-struct-shadow-cluster-tags name signal wrong-type-argument shadow-cluster] 4]] 3 (#$ . 9069)]) #@60 Return name if SITE has the form "/name:", otherwise SITE. (defalias 'shadow-site-name #[(site) "\301\302\"\203\f \303\304\"\207\207" [site string-match "\\`/\\([-.[:word:]]+\\):\\'" match-string 1] 3 (#$ . 9352)]) #@58 Return "/name:" if NAME has word syntax, otherwise NAME. (defalias 'shadow-name-site #[(name) "\301\302\"\203\f \303\304\"\207\207" [name string-match "\\`[-.[:word:]]+\\'" format "/%s:"] 3 (#$ . 9576)]) #@77 If SITE is a cluster, return primary identification, otherwise return SITE. (defalias 'shadow-site-primary #[(site) "\303\304!!\211\203 \242\n>\204 \305\306\307 D\"\210\310 8\202 )\207" [site cluster cl-struct-shadow-cluster-tags shadow-get-cluster shadow-site-name signal wrong-type-argument shadow-cluster 2] 5 (#$ . 9789)]) #@48 Given a SITE, return cluster it is in, or nil. (defalias 'shadow-site-cluster #[(site) "\302\303!!\206\f \304\305 \"\207" [site shadow-clusters shadow-get-cluster shadow-site-name shadow-find #[(x) "\303\242 >\204 \304\305\306D\"\210\3078\310\n!\"\207" [x cl-struct-shadow-cluster-tags site string-match signal wrong-type-argument shadow-cluster 3 shadow-name-site] 5]] 3 (#$ . 10129)]) #@65 Read a cluster name or host identification from the minibuffer. (defalias 'shadow-read-site #[nil "\303\304\"\305\306 !!\204# \n\230\204# \306\n!\230\204# \307 !\211\205$ )\207" [shadow-clusters ans shadow-system-name completing-read "Host identification or cluster name: " shadow-get-cluster shadow-site-name file-remote-p] 3 (#$ . 10527)]) #@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!\306 !\n\203) \307\n\242\f>\204! \310\311\312\nD\"\210\313\n8\"\202, \230*\207" [site1 site2 cluster1 primary2 cl-struct-shadow-cluster-tags shadow-get-cluster shadow-site-primary string-match signal wrong-type-argument shadow-cluster 3] 5 (#$ . 10882)]) #@143 Parse any NAME into a `tramp-file-name' structure. Argument can be a simple name, remote file name, or already a `tramp-file-name' structure. (defalias 'shadow-parse-name #[(name) "\204 \304\207\242 >\203 \207\305!\203 \306!\207\307!\203* \310\311\312\n!\313\307!$\207\314\315\"\205L \316\317\"\316\320\"\321!\205K \322\304\211\211\304\304\257*\207" [name cl-struct-tramp-file-name-tags shadow-system-name file nil file-remote-p tramp-dissect-file-name shadow-local-file make-tramp-file-name :host shadow-site-name :localname string-match "^/\\([^:/]+\\):\\([^:]*\\)$" match-string 1 2 shadow-get-cluster tramp-file-name] 8 (#$ . 11372)]) #@109 Make a Tramp style fullname out of HUP, a `tramp-file-name' structure. Replace HOST, and NAME when non-nil. (defalias 'shadow-make-fullname #[(hup &optional host name) "\306! \203 \242\n>\204 \307\310\311D\"\210\312\233\211 \240\210)\f\203: \242\n>\2041 \307\310\311D\"\210\313\233\211\f\240\210)\242\n>\204H \307\310\311D\"\210A@\204v \314\315\242\n>\204^ \307\310\311D\"\210\3128\242\n>\204o \307\310\311D\"\210\3138#\202y \316!)\207" [hup host cl-struct-tramp-file-name-tags #1=#:c name #2=#:c copy-tramp-file-name signal wrong-type-argument tramp-file-name 4 6 format "/%s:%s" tramp-make-tramp-file-name] 8 (#$ . 12037)]) (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) "\302! P\207" [fullname newname file-remote-p] 2 (#$ . 12763)]) #@83 If FILE is not remote, return it. If it refers to a different system, return nil. (defalias 'shadow-local-file #[(file) "\204 \306\207\242 >\2033 \242 >\204 \307\310\311D\"\210A@\2043 \242 >\204/ \307\310\311D\"\210\3128\207\242 >\203<