From 2f745f7fa46ec76d8f616c19ccb8c2eeef9a76d4 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 5 Apr 2008 00:35:46 +0000 Subject: [PATCH] * diff-mode.el (diff-file-junk-re): Recognize the git format for new files and for changing permissions. --- lisp/ChangeLog | 2 +- lisp/diff-mode.el | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb09facc268..8664a042f22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -13,7 +13,7 @@ * textmodes/nroff-mode.el (nroff-mode-map): Add menus. * diff-mode.el (diff-file-junk-re): Recognize the git format for - new files. + new files and for changing permissions. (diff-mode): Set beginning-of-defun-function and end-of-defun-function. diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 48b8f18a132..dd4615dc2ce 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -556,8 +556,9 @@ If the prefix ARG is given, restrict the view to the current file instead." (diff-end-of-hunk) (kill-region start (point))))) -;; "index " and "new file mode" are output by git-diff. -(defconst diff-file-junk-re "diff \\|index \\|new file mode") +;; "index ", "old mode", "new mode" and "new file mode" are output by git-diff. +(defconst diff-file-junk-re + "diff \\|index \\|\\(?:new\\(?: file\\)?\\|old\\) mode ") (defun diff-beginning-of-file-and-junk () "Go to the beginning of file-related diff-info. -- 2.39.5