GNU bug report logs - #2652
23.0.91; wacky behavior of "v" command in *vc-dir* buffer

Previous Next

Package: emacs;

Reported by: Miles Bader <miles <at> gnu.org>

Date: Fri, 13 Mar 2009 00:05:05 UTC

Severity: normal

Done: Dan Nicolaescu <dann <at> ics.uci.edu>

Bug is archived. No further changes may be made.

Full log


Message #81 received at 2652 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 2652 <at> debbugs.gnu.org, Miles Bader <miles <at> gnu.org>
Subject: Re: bug#2652: 23.0.91; wacky behavior of "v" command in *vc-dir*  buffer
Date: Mon, 23 Mar 2009 13:34:11 -0400
>> > But I don't really want to check it in at this point without an explicit
>> > request from Stefan.
>> Removing calls to determine the backend (and replace them with backend
>> info propagated from elsewhere) is generally a good thing.

> How about this one?

Doesn't look too bad, tho "backend-arg" rings pretty poorly.  I think
this hints at the need to just use a single `backend' var (moved out of
the let into the arg) which is then defaulted via (unless backend (setq
backend (vc-backend file))).

> It removes an extra vc-backend call for each VC managed file.

Good.  Note that the issue is not performance but semantics: in most/all
of those cases, the behavior would be at best odd if the recomputed
backend were different from the caller's idea.

> And another one could be eliminated, but I am not 100% sure what this
> comment means:
>       ;; Let the backend setup any buffer-local things he needs.
>       (vc-call-backend (vc-backend buffer-file-name) 'find-file-hook))

The comment just means "run a hook so the backend can set things up".
Grep for "vc-.*-find-file-hook" to see for what it is currently used.
So yes, this should just use `backend' (which I'd prefer over `bk').


        Stefan




This bug report was last modified 16 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.