GNU bug report logs -
#37395
Diff-mode doesn't take into account patch-separators as produced by git-format-patch
Previous Next
Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Date: Thu, 12 Sep 2019 21:34:02 UTC
Severity: normal
Tags: fixed
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Ah, sorry, I missed it. v5 sent, now should be no new warnings.
On Ср, окт 9, 2019 at 21:36, Lars Ingebrigtsen <larsi <at> gnus.org>
wrote:
> Konstantin Kharlamov <Hi-Angel <at> yandex.ru> writes:
>
>> * lisp/vc/diff-mode.el (diff-prev-line-if-patch-separator):
>> A function to return prev. line if it has git-format-patch
>> separator.
>> (diff-end-of-hunk): Make use of
>> diff-prev-line-if-patch-separator
>> diff-buffer-type: whether a buffer is a git-diff
>> (define-derived-mode): set diff-buffer-type to appropriate
>> value
>
> Byte-compiling gives:
>
> In diff-prev-line-if-patch-separator:
> vc/diff-mode.el:516:10:Warning: reference to free variable
> `diff-buffer-type'
> vc/diff-mode.el:517:7:Warning: `previous-line' is for interactive use
> only;
> use `forward-line' with negative argument instead.
>
> So you have to move the defvar earlier and adjust the previous-line,
> but
> otherwise I think it looks OK...
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.