[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] add interactive browse of revisions from vc *Annotate* buffe

From: Andre Spiegel
Subject: Re: [patch] add interactive browse of revisions from vc *Annotate* buffers
Date: Mon, 19 Jan 2004 14:33:59 +0100

On Sat, 2004-01-17 at 22:34, Benjamin Rutt wrote:

> Now that it seems like everyone has reached agreement on the key
> bindings, here is the latest patch.

Thanks, I'm really looking forward to getting this installed.

A few minor points: We already have a backend-specific function
vc-BACKEND-previous-version, which currently has a single default
implementation, vc-default-previous-version in vc.el.  It handles
RCS/CVS revision numbers (it's used to provide the defaults for C-u C-x
v =).

Could you please take a look at that function and resolve the redundancy
with vc-cvs-increment/decrement-revision in your code?  The reconciled
implementation should combine the behaviour of both previous functions. 
Please also put these functions into vc.el as defaults for all backends,
because the RCS-style revision numbers are still common for most

I'm a bit puzzled by your function vc-current-line.  I must admit that
I'm totally clueless in this area, but is there really no simpler way to
determine this?  Surely, this problem must have occured elsewhere
already.  Anybody got a hint for us?

+(defun vc-current-line ()
+  "Returns the current buffer's line number."
+  (let ((oldpoint (point)) start)
+    (save-excursion
+      (save-restriction
+       (goto-char (point-min))
+       (widen)
+       (forward-line 0)
+       (setq start (point))
+       (goto-char oldpoint)
+       (forward-line 0)
+       (1+ (count-lines (point-min) (point)))))))

Last point: The doc strings in your functions do not comply with the
Emacs guidelines yet.  Every function must have a doc string, and the
first line must be a complete sentence of its own (in the imperative
voice).  Please see the corresponding sections in the Elisp manual.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]