From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33567: Syntactic fontification of diff hunks Date: Tue, 04 Dec 2018 08:46:46 +0200 Message-ID: <83bm61aiw9.fsf@gnu.org> References: <878t18j4is.fsf@mail.linkov.net> <83a7lobemr.fsf@gnu.org> <87a7lnv6ex.fsf@mail.linkov.net> <67cd7856-d52c-0e00-cc9c-25b833874b15@yandex.ru> <871s6yp517.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1543905968 22201 195.159.176.226 (4 Dec 2018 06:46:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2018 06:46:08 +0000 (UTC) Cc: 33567@debbugs.gnu.org, dgutov@yandex.ru To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 07:46:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gU4T5-0005f6-UV for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2018 07:46:04 +0100 Original-Received: from localhost ([::1]:54209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gU4VC-0006Bh-DK for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2018 01:48:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gU4V5-0006At-JQ for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2018 01:48:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gU4V1-0005ft-Bm for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2018 01:48:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55462) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gU4V0-0005dk-PH for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2018 01:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gU4V0-000174-Et for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2018 01:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2018 06:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33567-submit@debbugs.gnu.org id=B33567.15439060284213 (code B ref 33567); Tue, 04 Dec 2018 06:48:02 +0000 Original-Received: (at 33567) by debbugs.gnu.org; 4 Dec 2018 06:47:08 +0000 Original-Received: from localhost ([127.0.0.1]:59720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gU4U8-00015s-5H for submit@debbugs.gnu.org; Tue, 04 Dec 2018 01:47:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gU4U7-00015V-1M for 33567@debbugs.gnu.org; Tue, 04 Dec 2018 01:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gU4Tx-0002mP-JR for 33567@debbugs.gnu.org; Tue, 04 Dec 2018 01:47:01 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gU4Tx-0002lO-4H; Tue, 04 Dec 2018 01:46:57 -0500 Original-Received: from [176.228.60.248] (port=1196 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gU4Tt-0000Hz-SQ; Tue, 04 Dec 2018 01:46:56 -0500 In-reply-to: <871s6yp517.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 04 Dec 2018 01:24:52 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153053 Archived-At: > From: Juri Linkov > Cc: Eli Zaretskii , 33567@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.