Problem reported by Alan Mackenzie in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00826.html
* .gitattributes (*.el, *.texi): New patterns.
* autogen.sh: Configure diff.elisp.xfuncname and
diff.texinfo.xfuncname if using Git.
*.sig binary
*.tiff binary
etc/e/eterm-color binary
*.sig binary
*.tiff binary
etc/e/eterm-color binary
+
+# Hooks for non-default diff hunk headers; see autogen.sh.
+*.el diff=elisp
+*.texi diff=texinfo
## cause 'make' to needlessly run 'autoheader'.
echo timestamp > src/stamp-h.in || exit
## cause 'make' to needlessly run 'autoheader'.
echo timestamp > src/stamp-h.in || exit
-## Install Git hooks, if using Git.
-if test -d .git/hooks; then
+
+## Configure Git, if using Git.
+if test -d .git; then
+
+ # Configure 'git diff' hunk header format.
+
+ git config 'diff.elisp.xfuncname' \
+ '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit
+ git config 'diff.texinfo.xfuncname' \
+ '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit
+
+
+ # Install Git hooks.
+
tailored_hooks=
sample_hooks=
tailored_hooks=
sample_hooks=