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

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

bug#37395: [PATCH v4] diff-mode.el: take into account patch separators


From: Lars Ingebrigtsen
Subject: bug#37395: [PATCH v4] diff-mode.el: take into account patch separators
Date: Wed, 09 Oct 2019 21:36:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Konstantin Kharlamov <Hi-Angel@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





reply via email to

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