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: Konstantin Kharlamov
Subject: bug#37395: [PATCH v4] diff-mode.el: take into account patch separators
Date: Wed, 09 Oct 2019 23:08:16 +0300

Ah, sorry, I missed it. v5 sent, now should be no new warnings.

On Ср, окт 9, 2019 at 21:36, Lars Ingebrigtsen <larsi@gnus.org> wrote:
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]