diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-02-21 18:53:05 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-02-21 18:53:05 -0500 |
commit | 8e90216389feafb7391c56f8d8441562eaa13c9d (patch) | |
tree | 8a78b5891604bbc237504e0c39f640fcf639e70a /lisp/vc/diff-mode.el | |
parent | 89f399324be874d42747ff67ee3bcdbe0b6120d1 (diff) | |
download | emacs-8e90216389feafb7391c56f8d8441562eaa13c9d.tar.gz emacs-8e90216389feafb7391c56f8d8441562eaa13c9d.tar.bz2 emacs-8e90216389feafb7391c56f8d8441562eaa13c9d.zip |
* lisp/vc/diff-mode.el (diff--font-lock-prettify): Recognize mode changes
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r-- | lisp/vc/diff-mode.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index c28321e4731..511cc89778d 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2636,6 +2636,7 @@ fixed, visit it in a buffer." " and " file5 " \\(?7:differ\\)\n")) (horb (concat "\\(?:" header "\\|" binary "\\)"))) (concat "diff.*?\\(?: a/\\(.*?\\) b/\\(.*\\)\\)?\n" + "\\(?:\\(?:old\\|new\\) mode .*\n\\)*" "\\(?:" ;; For new/deleted files, there might be no ;; header (and no hunk) if the file is/was empty. @@ -2647,6 +2648,8 @@ fixed, visit it in a buffer." ;; or from the two header lines. Prefer the header line info if ;; available since the `diff' line is ambiguous in case the ;; file names include " b/" or " a/". + ;; FIXME: This prettification throws away all the information + ;; about file modes (and the index hashes). (let ((oldfile (or (match-string 4) (match-string 1))) (newfile (or (match-string 5) (match-string 2))) (kind (if (match-beginning 7) " BINARY" |