Commit e3a6246e authored by Paul Eggert's avatar Paul Eggert
Browse files

Improve git diff hunk headers for .el, .texi

Problem reported by Alan Mackenzie in:
* .gitattributes (*.el, *.texi): New patterns.
* Configure diff.elisp.xfuncname and
diff.texinfo.xfuncname if using Git.
parent db828f62
......@@ -44,3 +44,7 @@ doc/misc/texinfo.tex -whitespace=blank-at-eol
*.sig binary
*.tiff binary
etc/e/eterm-color binary
# Hooks for non-default diff hunk headers; see
*.el diff=elisp
*.texi diff=texinfo
......@@ -216,8 +216,20 @@ autoreconf -fi -I m4 || exit $?
## cause 'make' to needlessly run 'autoheader'.
echo timestamp > src/ || 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.
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