diff options
| author | Stefan Monnier | 2004-09-13 20:39:59 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-09-13 20:39:59 +0000 |
| commit | ef9c4df0c091fe6c6356c40306cf7d3c80ce2d32 (patch) | |
| tree | 479d145247169f9bfe2b8e4e1a7753d42a40c609 | |
| parent | 82ae2f3f78fca3b1932e60fbb4bb1fa050cea6db (diff) | |
| download | emacs-ef9c4df0c091fe6c6356c40306cf7d3c80ce2d32.tar.gz emacs-ef9c4df0c091fe6c6356c40306cf7d3c80ce2d32.zip | |
(vc-arch-root, vc-arch-registered): Use vc-find-root.
| -rw-r--r-- | lisp/vc-arch.el | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index c4c484a9347..e32fc474d94 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el | |||
| @@ -73,18 +73,10 @@ | |||
| 73 | (put 'Arch 'vc-functions nil) | 73 | (put 'Arch 'vc-functions nil) |
| 74 | 74 | ||
| 75 | ;;;###autoload (defun vc-arch-registered (file) | 75 | ;;;###autoload (defun vc-arch-registered (file) |
| 76 | ;;;###autoload (let ((dir file)) | 76 | ;;;###autoload (if (vc-find-root file "{arch}/=tagging-method") |
| 77 | ;;;###autoload (while (and (stringp dir) | 77 | ;;;###autoload (progn |
| 78 | ;;;###autoload (not (equal | 78 | ;;;###autoload (load "vc-arch") |
| 79 | ;;;###autoload dir (setq dir (file-name-directory dir)))) | 79 | ;;;###autoload (vc-arch-registered file)))) |
| 80 | ;;;###autoload dir) | ||
| 81 | ;;;###autoload (setq dir (if (file-directory-p | ||
| 82 | ;;;###autoload (expand-file-name "{arch}" dir)) | ||
| 83 | ;;;###autoload t (directory-file-name dir)))) | ||
| 84 | ;;;###autoload (if (eq dir t) | ||
| 85 | ;;;###autoload (progn | ||
| 86 | ;;;###autoload (load "vc-arch") | ||
| 87 | ;;;###autoload (vc-arch-registered file))))) | ||
| 88 | 80 | ||
| 89 | (defun vc-arch-add-tagline () | 81 | (defun vc-arch-add-tagline () |
| 90 | "Add an `arch-tag' to the end of the current file." | 82 | "Add an `arch-tag' to the end of the current file." |
| @@ -186,18 +178,10 @@ Only the value `maybe' can be trusted :-(." | |||
| 186 | (defun vc-arch-root (file) | 178 | (defun vc-arch-root (file) |
| 187 | "Return the root directory of a Arch project, if any." | 179 | "Return the root directory of a Arch project, if any." |
| 188 | (or (vc-file-getprop file 'arch-root) | 180 | (or (vc-file-getprop file 'arch-root) |
| 189 | (vc-file-setprop | 181 | (vc-file-setprop |
| 190 | file 'arch-root | 182 | ;; Check the =tagging-method, in case someone naively manually |
| 191 | (let ((root nil)) | 183 | ;; creates a {arch} directory somewhere. |
| 192 | (while (not (or root | 184 | file 'arch-root (vc-find-root file "{arch}/=tagging-method")))) |
| 193 | (equal file (setq file (file-name-directory file))) | ||
| 194 | (null file))) | ||
| 195 | ;; Check the =tagging-method, in case someone naively manually | ||
| 196 | ;; creates a {arch} directory somewhere. | ||
| 197 | (if (file-exists-p (expand-file-name "{arch}/=tagging-method" file)) | ||
| 198 | (setq root file) | ||
| 199 | (setq file (directory-file-name file)))) | ||
| 200 | root)))) | ||
| 201 | 185 | ||
| 202 | (defun vc-arch-register (file &optional rev comment) | 186 | (defun vc-arch-register (file &optional rev comment) |
| 203 | (if rev (error "Explicit initial revision not supported for Arch")) | 187 | (if rev (error "Explicit initial revision not supported for Arch")) |