Commit e3a6246e authored by Paul Eggert's avatar Paul Eggert

Improve git diff hunk headers for .el, .texi

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.
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 autogen.sh.
*.el diff=elisp
*.texi diff=texinfo
......@@ -216,8 +216,20 @@ autoreconf -fi -I m4 || 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=
......
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