From: Lars Ingebrigtsen <larsi@gnus.org>
To: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Cc: 37395@debbugs.gnu.org
Subject: bug#37395: [PATCH v3] diff-mode.el: take into account patch separators
Date: Mon, 07 Oct 2019 06:39:40 +0200 [thread overview]
Message-ID: <874l0l9njn.fsf@gnus.org> (raw)
In-Reply-To: <20190916202643.27946-1-Hi-Angel@yandex.ru> (Konstantin Kharlamov's message of "Mon, 16 Sep 2019 23:26:43 +0300")
(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
next prev parent reply other threads:[~2019-10-07 4:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-12 21:33 bug#37395: Diff-mode doesn't take into account patch-separators as produced by git-format-patch Konstantin Kharlamov
2019-09-12 21:34 ` bug#37395: [PATCH] diff-mode.el: take into account patch separators Konstantin Kharlamov
2019-09-13 6:14 ` Eli Zaretskii
2019-09-13 6:58 ` Konstantin Kharlamov
2019-09-16 20:31 ` Konstantin Kharlamov
2019-09-13 9:19 ` bug#37395: [PATCH v2] " Konstantin Kharlamov
2019-09-16 20:26 ` bug#37395: [PATCH v3] " Konstantin Kharlamov
2019-10-07 4:39 ` Lars Ingebrigtsen [this message]
2019-10-07 23:04 ` Konstantin Kharlamov
2019-10-07 23:12 ` Konstantin Kharlamov
2019-10-08 15:59 ` Lars Ingebrigtsen
2019-10-08 20:08 ` Konstantin Kharlamov
2019-10-08 19:34 ` bug#37395: [PATCH v4] " Konstantin Kharlamov
2019-10-09 19:36 ` Lars Ingebrigtsen
2019-10-09 20:08 ` Konstantin Kharlamov
2019-10-09 20:07 ` bug#37395: [PATCH v5] " Konstantin Kharlamov
2019-10-13 3:53 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874l0l9njn.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=37395@debbugs.gnu.org \
--cc=Hi-Angel@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).