Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1f22ad24
Commit
1f22ad24
authored
Oct 02, 2000
by
André Spiegel
Browse files
(vc-registered): If FILE used to be registered under a certain
backend, try that one first.
parent
8989ab56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
lisp/vc-hooks.el
lisp/vc-hooks.el
+14
-11
No files found.
lisp/vc-hooks.el
View file @
1f22ad24
...
...
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; $Id: vc-hooks.el,v 1.1
19
2000/09/
1
2 13:
00:30 fx
Exp $
;; $Id: vc-hooks.el,v 1.1
20
2000/09/2
1
13:
15:26 spiegel
Exp $
;; This file is part of GNU Emacs.
...
...
@@ -241,9 +241,10 @@ exist."
(
defun
vc-registered
(
file
)
"Return non-nil if FILE is registered in a version control system.
This function does not cache its result; it performs the test each
time it is invoked on a file. For a caching check whether a file is
registered, use `vc-backend'."
This function performs the check each time it is called. To rely
on the result of a previous call, use `vc-backend' instead. If the
file was previously registered under a certain backend, then that
backend is tried first."
(
let
(
handler
)
(
if
(
boundp
'file-name-handler-alist
)
(
setq
handler
(
find-file-name-handler
file
'vc-registered
)))
...
...
@@ -253,13 +254,15 @@ registered, use `vc-backend'."
;; There is no file name handler.
;; Try vc-BACKEND-registered for each handled BACKEND.
(
catch
'found
(
mapcar
(
lambda
(
b
)
(
and
(
vc-call-backend
b
'registered
file
)
(
vc-file-setprop
file
'vc-backend
b
)
(
throw
'found
t
)))
(
unless
vc-ignore-vc-files
vc-handled-backends
))
(
let
((
backend
(
vc-file-getprop
file
'vc-backend
)))
(
mapcar
(
lambda
(
b
)
(
and
(
vc-call-backend
b
'registered
file
)
(
vc-file-setprop
file
'vc-backend
b
)
(
throw
'found
t
)))
(
if
(
or
(
not
backend
)
(
eq
backend
'none
))
vc-handled-backends
(
cons
backend
vc-handled-backends
))))
;; File is not registered.
(
vc-file-setprop
file
'vc-backend
'none
)
nil
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment