[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52810: 29.0.50; diff-font-lock-prettify broken on new and deleted fi
From: |
Lars Ingebrigtsen |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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