GNU bug report logs - #33567
Syntactic fontification of diff hunks

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sat, 1 Dec 2018 22:13:02 UTC

Severity: wishlist

Tags: patch

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 33567 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 33567 <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#33567: Syntactic fontification of diff hunks
Date: Tue, 04 Dec 2018 08:46:46 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  33567 <at> debbugs.gnu.org
> Date: Tue, 04 Dec 2018 01:24:52 +0200
> 
> -(defun vc-find-revision-no-save (file revision &optional backend)
> -  "Read REVISION of FILE into a buffer and return the buffer.
> +(defun vc-find-revision-no-save (file revision &optional backend buffer)
> +  "Read REVISION of FILE into a BUFFER and return the buffer.

Since you use BUFFER, please drop the "a" part.

Also, the doc string should tell what BUFFER defaults to if omitted or
nil.

> +  (let ((filebuf (or buffer (get-file-buffer file) (current-buffer)))
                     ^^^^^^^^^
I would use bufferp here.  What if someone calls the function with
something that is not a buffer?  And, btw, are buffer names allowed?

Similarly with other places where you make the same test (why not make
it once and bind some local variable to the result, btw?).

Thanks.




This bug report was last modified 6 years and 194 days ago.

Previous Next


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