;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:30 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/dvc-register.el ;;; in Emacs version 23.0.50.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`dvc-register.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require dvc-defs dvc-utils] 2) #@31 List of registered back-ends. (defvar dvc-registered-backends nil (#$ . 674)) #@162 Intern a symbol for DVC, add POSTFIX to the name. A '-' is put between DVC and the POSTFIX. Example: (dvc-intern-symbol-name 'xhg "tree-root") => xhg-tree-root (defalias 'dvc-intern-symbol-name #[(dvc postfix) "\302\303!\304 Q!\207" [dvc postfix intern symbol-name "-"] 4 (#$ . 759)]) #@273 Register DVC, NAME is displayed for user interaction. It's a macro, so it can be called without loading dvc-unified. The build system inserts a (eval-when-compile (require 'dvc-unified)) at the beginning of the autoload file, so, the macro is available in the autoloads. (defalias 'dvc-register-dvc '(macro . #[(dvc name) "\305\306!\210\307\310\"\311\312\313\314\nE\315\316\317\n\211A@)!\320P!\f\321\317\n\211A@)!\322QF )BBBB\207" [dvc-back-end-wrappers wrappers-defs dvc x name require dvc-unified mapcar #[(wrapper) "\211A@) @\306\307\n!\310\fQ!\306\311\fP! A@\312\313\312\314\"\"\315\f\316\307\n!\317\260\320 \321\322\323DC\203Z\324\325\326\327DD\330\327DBBF\202`\326\327DDE\257.\207" [dvc x dvc-noquote wrapper name symb intern symbol-name "-" "dvc-" remove &rest &optional "Wrapper for dvc-" ", for back-end " "." defun (interactive) let dvc-temp-current-active-dvc if (interactive-p) call-interactively quote funcall symb-dvc args call-args docstring] 14] progn (defvar dvc-registered-backends nil) add-to-list 'dvc-registered-backends defvar intern symbol-name "-backend-name" "Human friendly name used for the dvc backend '" ".\nThis variable was created by `dvc-register-dvc'"] 10 (#$ . 1053)])) (byte-code "\301B\302\301!\204\303\301\304\"\210\301\207" [current-load-list dvc-backend-name default-boundp set-default "Unknown"] 3) #@219 Return the function for DVC backend concatenated with POSTFIX. To be used with `apply' or `funcall'. If NODEFAULT is nil and no function is available for this backend, use dvc- instead. POSTFIX is a string. (defalias 'dvc-function #[(dvc postfix &optional nodefault) "\306 \" \204\307\n!\203\n\202g\310\311!\312P!\313\f!\204,\314\315\f\"\210\316\f\317\320#\210)\321 \320#\307 !\203= \202f\306\300 \"\211\204K \202e\306\300 \"\307!\203]\202d\322\323\311! #))))\207" [dvc postfix res nodefault dvc-register-sym second-try dvc-intern-symbol-name fboundp intern symbol-name "-dvc" featurep dvc-trace "require %S" require nil t dvc-function error "No definition and no fallback for %s-\"%s\"" fall-back result] 5 (#$ . 2444)]) #@141 Get the value of a variable in a DVC backend. If NODEFAULT is nil and no variable is available for this backend, use dvc- instead. (defalias 'dvc-variable #[(dvc postfix &optional nodefault) "\305 \" \204\306\n!\203\307\n!\2024\310\311!\312P!\313\f!\204.\314\315\f\"\210\316\f\317\320#\210)\321 \320#)\207" [dvc postfix res nodefault dvc-register-sym dvc-intern-symbol-name boundp eval intern symbol-name "-dvc" featurep dvc-trace "require %S" require nil t dvc-variable] 5 (#$ . 3211)]) #@67 Apply ARGS to the `dvc-current-active-dvc' concated with POSTFIX. (defalias 'dvc-apply #[(postfix &rest args) "\305 \211\203\306\211\307\n\" #)\202\310\311!\306\312\n #))\207" [current-dvc dvc-temp-current-active-dvc postfix args default-directory dvc-current-active-dvc apply dvc-function dvc-read-directory-name "Local tree: " dvc-apply] 6 (#$ . 3725)]) #@105 Call the function specified by concatenating `dvc-current-active-dvc' and POSTFIX, with arguments ARGS. (defalias 'dvc-call #[(postfix &rest args) "\302 \"\207" [postfix args dvc-apply] 3 (#$ . 4097)]) #@132 A cache that contains directories as keys and the DVC symbol as value. That value is considered first in `dvc-current-active-dvc'. (defvar dvc-current-active-dvc-cache (make-hash-table :test 'equal) (#$ . 4307)) #@124 Tell DVC which back-end to use in some buffers. Overrides the search for a control directory in `dvc-current-active-dvc'. (defvar dvc-buffer-current-active-dvc nil (#$ . 4526)) (make-variable-buffer-local 'dvc-buffer-current-active-dvc) #@164 Tell DVC which back-end to use temporarily. Overrides the search for a control directory in `dvc-current-active-dvc'. This is meant to be set in a let statement. (defvar dvc-temp-current-active-dvc nil (#$ . 4771)) #@815 Get the currently active dvc for the current `default-directory'. Currently supported dvc's can be found in `dvc-registered-backends'. If `dvc-prompt-active-dvc' is nil, `dvc-select-priority' specifies the priority, if more than one back-end is in use for `default-directory'. If `dvc-prompt-active-dvc' is non-nil, `dvc-select-priority' specifies the list of back-ends to test for, and the user is prompted when more than one is found. The values are cached in `dvc-current-active-dvc-cache'. If NOCACHE is non-nil, ignore the cache for this call, but still cache the result (useful for correcting an incorrect cache entry). If either `dvc-temp-current-active-dvc' (a let-bound value) or `dvc-buffer-current-active-dvc' (a buffer-local value) is non-nil, then use that value instead of the cache or searching. (defalias 'dvc-current-active-dvc #[(&optional nocache) "\206! \206!\306\n?\205\307\310 !\f\" \204\203\253\306\211 !\211\"\203`\311\"@\312\313# \314 !\203W \306\313\"\211#\203V\315\"@!#D!B!)\"A\211\"\204.!G\316=\203m\306\202\247!G\317=\203\203\320!\211$@@)!\202\247\321\322\323\324!\325#\326Q!\306\313$%\320%!\327 !\"\211$A@))+\202\366\330&\"\306 \"\331\"\203\365\311\"@\312\313# \314 !\203\354 \306\313\"\211#\203\353#GGV\203\353#\"@)\"A\211\"\204\276* \203\332\310 ! \f#\210\202 \230\204\332\310! \f#\210t\203\333\334 #\210 *\207" [dvc-temp-current-active-dvc dvc-buffer-current-active-dvc nocache default-directory dvc-current-active-dvc-cache dvc nil gethash dvc-uniquify-file-name dvc-function "tree-root" t fboundp symbol-name 0 1 intern dvc-completing-read "back-end (" mapconcat #[(option) "@\207" [option] 1] ", " "): " assoc append "/" puthash message "DVC: using %s for %s" root dvc-prompt-active-dvc dvc-select-priority tree-root-func options dvc-list current-root x selection dvc-registered-backends] 7 (#$ . 4994) "P"]) #@99 Select the DVC to use for DIRECTORY. The given value is stored in `dvc-current-active-dvc-cache'. (defalias 'dvc-select-dvc #[(directory dvc) "\303=\203 \304\305 \"\210\306\307 \n#\207" [dvc directory dvc-current-active-dvc-cache None message "Removing %s from dvc-current-active-dvc-cache" nil puthash] 4 (#$ . 6943) (list (dvc-uniquify-file-name (dvc-read-directory-name "Set dvc for path: " nil nil t)) (intern (dvc-completing-read "dvc: " (map t 'symbol-name (append '(None) dvc-registered-backends)))))]) #@69 Clear the dvc cache. Useful when changing to an alternate back-end. (defalias 'dvc-clear-dvc-cache #[nil "\301!\207" [dvc-current-active-dvc-cache clrhash] 2 (#$ . 7463) nil]) (provide 'dvc-register)