[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37395: [PATCH v3] diff-mode.el: take into account patch separators
From: |
Lars Ingebrigtsen |
Subject: |
bug#37395: [PATCH v3] diff-mode.el: take into account patch separators |
Date: |
Mon, 07 Oct 2019 06:39:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
(Some minor comments.)
Konstantin Kharlamov <Hi-Angel@yandex.ru> writes:
> +(defsubst diff-prev-line-if-patch-separator ()
> + "Return previous line if it has patch separator produced by
> +git-format-patch."
I don't think this needs to be a defsubst -- a defun is fine here. And
the first doc string line should be a complete sentence.
> +(setq-local diff-buffer-type nil)
This should probably be a defvar and then a setq-local in `diff-mode'.
> + (save-excursion
> + (if (re-search-forward "^diff --git" nil t)
> + (setq diff-buffer-type 'git)
> + (setq diff-buffer-type nil))))
Hm... are we really guaranteed that all git diffs have that string in
it somewhere?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#37395: [PATCH v3] diff-mode.el: take into account patch separators,
Lars Ingebrigtsen <=