-For backends which dont support it, `vc-not-supported' is signalled."
-
- (let ((symbol (intern (downcase (format "vc-%s-unregister" backend)))))
- (if (functionp symbol)
- (funcall symbol file)
- ;; CVS, SVN, SCCS, SRC and Mtn are not supported.
- (signal 'vc-not-supported (list 'unregister backend)))))
+For backends which don't support it, `vc-not-supported' is signalled."
+ ;; CVS, SVN, SCCS, SRC and Mtn are not supported, and will signal
+ ;; `vc-not-supported'.
+ (prog1
+ (vc-call-backend backend 'unregister file)
+ (vc-file-clearprops file)))
+
+(defmacro vc-test--run-maybe-unsupported-function (func &rest args)
+ "Run FUNC withs ARGS as arguments.
+Catch the `vc-not-supported' error."
+ `(let (err)
+ (condition-case err
+ (funcall ,func ,@args)
+ (vc-not-supported 'vc-not-supported)
+ (t (signal (car err) (cdr err))))))