From: Tassilo Horn Date: Wed, 29 Dec 2021 17:00:30 +0000 (+0100) Subject: Revert "Fix fontification in diff--font-lock-prettify" X-Git-Tag: emacs-29.0.90~3364 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3cadd72673d8095df7eeb8e847db87ae42b5e2f6;p=emacs.git Revert "Fix fontification in diff--font-lock-prettify" This reverts commit 1da392d62d1ae743151f7fda83d0725ec6053686. --- diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 60d210ca220..8f83aa580e4 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2612,17 +2612,19 @@ fixed, visit it in a buffer." "\\(?:index.*\n\\)?" "--- \\(?:" null-device "\\|a/\\(.*\\)\\)\n" "\\+\\+\\+ \\(?:" null-device "\\|b/\\(.*\\)\\)\n")))) - (put-text-property (match-beginning 0) (1- (match-end 0)) - 'display - (propertize - (cond - ((null (match-string 1)) - (concat "new file " (match-string 2))) - ((null (match-string 2)) - (concat "deleted " (match-string 1))) - (t - (concat "modified " (match-string 1)))) - 'face '(diff-file-header diff-header)))))) + (put-text-property (match-beginning 0) + (or (match-beginning 2) (match-beginning 1)) + 'display (propertize + (cond + ((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))) + (put-text-property (match-end 1) (1- (match-end 0)) + 'display "")))) nil) ;;; Syntax highlighting from font-lock