Commit 2f745f7f authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

* diff-mode.el (diff-file-junk-re): Recognize the git format for

new files and for changing permissions.
parent 90e9ca17
......@@ -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.
 
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment