]> git.eshelyaron.com Git - emacs.git/commitdiff
* diff-mode.el (diff-file-junk-re): Recognize the git format for
authorDan Nicolaescu <dann@ics.uci.edu>
Sat, 5 Apr 2008 00:35:46 +0000 (00:35 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Sat, 5 Apr 2008 00:35:46 +0000 (00:35 +0000)
new files and for changing permissions.

lisp/ChangeLog
lisp/diff-mode.el

index cb09facc268a92f9db9b12eb9c7987e79b34000a..8664a042f220e869329ca08120316c4a36b3d031 100644 (file)
@@ -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.
 
index 48b8f18a132e6d450ea13ef2a092fb914ff1dad7..dd4615dc2cece9fe210230b4c0aeca16ec728591 100644 (file)
@@ -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.