summaryrefslogtreecommitdiff
path: root/lisp/vc
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2021-12-29 18:00:52 +0100
committerTassilo Horn <tsdh@gnu.org>2021-12-29 18:00:52 +0100
commit7715fb3eff59102487e37fba5fc0d421dc8b9a51 (patch)
tree3dc240cf55cf341c1e4c92f6f02ca7f6ca76a891 /lisp/vc
parent3cadd72673d8095df7eeb8e847db87ae42b5e2f6 (diff)
downloademacs-7715fb3eff59102487e37fba5fc0d421dc8b9a51.tar.gz
Revert "Revert "Fix fontification in diff--font-lock-prettify""
This reverts commit 3cadd72673d8095df7eeb8e847db87ae42b5e2f6.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/diff-mode.el24
1 files changed, 11 insertions, 13 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 8f83aa580e4..60d210ca220 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2612,19 +2612,17 @@ fixed, visit it in a buffer."
"\\(?:index.*\n\\)?"
"--- \\(?:" null-device "\\|a/\\(.*\\)\\)\n"
"\\+\\+\\+ \\(?:" null-device "\\|b/\\(.*\\)\\)\n"))))
- (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 ""))))
+ (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))))))
nil)
;;; Syntax highlighting from font-lock