[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master aee101af91: * lisp/vc/diff-mode.el (diff--font-lock-prettify): Fi
From: |
Stefan Monnier |
Subject: |
master aee101af91: * lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix `diff-buffers` case |
Date: |
Wed, 29 Jun 2022 11:47:32 -0400 (EDT) |
branch: master
commit aee101af911655ff3dd7a4e032ee5366ce533578
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix `diff-buffers` case
---
lisp/vc/diff-mode.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 0fd67422d5..3f3e503a3f 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2682,7 +2682,17 @@ fixed, visit it in a buffer."
((and (null (match-string 4)) (match-string 5))
(concat "New " kind filemode newfile))
((null (match-string 2))
- (concat "Deleted" kind filemode oldfile))
+ ;; We used to use
+ ;; (concat "Deleted" kind filemode oldfile)
+ ;; here but that misfires for `diff-buffers'
+ ;; (see 24 Jun 2022 message in bug#54034).
+ ;; AFAIK if (match-string 2) is nil then so is
+ ;; (match-string 1), so "Deleted" doesn't sound right,
+ ;; so better just let the header in plain sight for now.
+ ;; FIXME: `diff-buffers' should maybe try to better
+ ;; mimic Git's format with "a/" and "b/" so prettification
+ ;; can "just work!"
+ nil)
(t
(concat "Modified" kind filemode oldfile)))
'face '(diff-file-header diff-header))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master aee101af91: * lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix `diff-buffers` case,
Stefan Monnier <=