bug-gnu-emacs
[Top][All Lists]
Advanced

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

documentation for vc-BACKEND-annotate-difference is incorrect


From: Jonathan Kamens
Subject: documentation for vc-BACKEND-annotate-difference is incorrect
Date: Sat, 5 Jan 2002 20:36:15 -0500

In GNU Emacs 21.1.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-12-06 on stripples.devel.redhat.com

The documentation for the annotate-different function reads:

;;   Only required if `annotate-command' is defined for the backend.
;;   Return the difference between the age of the line at point and the
;;   current time.  Return NIL if there is no more comparison to be made
;;   in the buffer.  Return value as defined for `current-time'.  You can
;;   safely assume that point is placed at the beginning of each line,
;;   starting at `point-min'.  The buffer that point is placed in is the
;;   Annotate output, as defined by the relevant backend.

The problem with this is that annotate-difference really doesn't
return the same thing as current-time; what it returns is the car of
what is returned by current-time.  That is, it returns the high 16
bits of a timestamp, not a cons of the high and low sixteen bits.

I should also mention in passing that it's unfortunate that
annotate-difference doesn't take the file name as well as the point.
For that matter, why does point need to be passed in when it can be
deterined simply by calling (point)?  The reason why it would be
useful for the file name to be passed in is so that annotate-command
can store state in the properties of the file which can then be
used by annotate-difference.  I solved this problem by using a global
variable to store the necessary state, but this is gross.
                                   
By the way, I should mention that despite all the little nits I've
been sending you about the new vc.el, I must say that it has overall
been pleasingly easy to integrate a new SCM into it.  Nice job!

Thanks,

  jik



reply via email to

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