aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier2022-06-29 11:47:24 -0400
committerStefan Monnier2022-06-29 11:47:24 -0400
commitaee101af911655ff3dd7a4e032ee5366ce533578 (patch)
treeb65764ebfc7061e719f4a5cd31302226003cfa0a /lisp/vc/diff-mode.el
parente4df6203e27fbb4458fda21f029f90a114465c1a (diff)
downloademacs-aee101af911655ff3dd7a4e032ee5366ce533578.tar.gz
emacs-aee101af911655ff3dd7a4e032ee5366ce533578.zip
* lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix `diff-buffers` case
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r--lisp/vc/diff-mode.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 0fd67422d55..3f3e503a3f3 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2682,7 +2682,17 @@ fixed, visit it in a buffer."
2682 ((and (null (match-string 4)) (match-string 5)) 2682 ((and (null (match-string 4)) (match-string 5))
2683 (concat "New " kind filemode newfile)) 2683 (concat "New " kind filemode newfile))
2684 ((null (match-string 2)) 2684 ((null (match-string 2))
2685 (concat "Deleted" kind filemode oldfile)) 2685 ;; We used to use
2686 ;; (concat "Deleted" kind filemode oldfile)
2687 ;; here but that misfires for `diff-buffers'
2688 ;; (see 24 Jun 2022 message in bug#54034).
2689 ;; AFAIK if (match-string 2) is nil then so is
2690 ;; (match-string 1), so "Deleted" doesn't sound right,
2691 ;; so better just let the header in plain sight for now.
2692 ;; FIXME: `diff-buffers' should maybe try to better
2693 ;; mimic Git's format with "a/" and "b/" so prettification
2694 ;; can "just work!"
2695 nil)
2686 (t 2696 (t
2687 (concat "Modified" kind filemode oldfile))) 2697 (concat "Modified" kind filemode oldfile)))
2688 'face '(diff-file-header diff-header)) 2698 'face '(diff-file-header diff-header))