unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Matthias Meulien <orontee@gmail.com>
Cc: 52810@debbugs.gnu.org
Subject: bug#52810: 29.0.50; diff-font-lock-prettify broken on new and deleted files
Date: Wed, 29 Dec 2021 17:26:50 +0100	[thread overview]
Message-ID: <87o84z4bsl.fsf@gnus.org> (raw)
In-Reply-To: <87bl13m972.fsf@gmail.com> (Matthias Meulien's message of "Sun, 26 Dec 2021 20:56:33 +0100")

Matthias Meulien <orontee@gmail.com> writes:

> Proposed fixed

Thanks; applied to Emacs 28.

> (but I must confess I've no idea why the original code
> tried to set two distinct overlays):

There's no overlays here -- do you mean display text properties?

Anyway, the code was originally the below, but that was changed in
f0768d31457.

-                                      ((null (match-beginning 1)) "new file  ")
-                                      ((null (match-beginning 2)) "deleted   ")
-                                      (t                          "modified  "))
+                                      ((null (match-beginning 1))
+                                       (concat "new file  " (match-string 2)))
+                                      ((null (match-beginning 2))
+                                       (concat "deleted   " (match-string 1)))
+                                      (t
+                                       (concat "modified  " (match-string 1))))
                                      'face '(diff-file-header diff-header)))
-        (unless (match-beginning 2)
-          (put-text-property (match-end 1) (1- (match-end 0))
-                             'display "")))))
+        (put-text-property (match-end 1) (1- (match-end 0))
+                           'display ""))))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-12-29 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 19:56 bug#52810: 29.0.50; diff-font-lock-prettify broken on new and deleted files Matthias Meulien
2021-12-29 16:26 ` Lars Ingebrigtsen [this message]
2022-01-15 12:32   ` 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=87o84z4bsl.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=52810@debbugs.gnu.org \
    --cc=orontee@gmail.com \
    /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).