On 04/21/2014 02:51 PM, Stefan Monnier wrote: >>>> + (condition-case err >>>> + (vc-call-backend backend 'root default-directory) >>>> + (vc-not-supported >>>> + (unless (eq (cadr err) 'root) >>>> + (signal (car err) (cdr err))) >>>> + nil))))) >>> Why do we need this gymnastics? >> So that we don't accidentally suppress errors we *don't* expect to get. > > No: I see the hypothetical reason, but I was wondering about > a practical reason. IOW, I think this is overkill. Note that the cost > is not only in code complexity but catching&re-raising signals also > defeats the backtraces in debug-on-error, which can be a pain. We're not catching all errors --- just vc-not-supported --- and it amounts to an assertion that nothing else went horribly wrong, because we re-raise only in cases where we'd otherwise swallow the error, and an error with a truncated stack is at least better than nothing at all. > I even wonder if we should allow `root' to fail. E.g. RCS/CVS could > just walk up the directories until there's no RCS/CVS subdir. Works for me. Backends could also just have their root functions explicitly return nil if they can't figure it out.