[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e3a6246: Improve git diff hunk headers for .el, .te
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master e3a6246: Improve git diff hunk headers for .el, .texi |
Date: |
Mon, 21 Sep 2015 18:56:54 +0000 |
branch: master
commit e3a6246eff4a793171511f32e9c6877faa2f6f3e
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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.
---
.gitattributes | 4 ++++
autogen.sh | 16 ++++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index 21af4e6..ac26a2b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -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
diff --git a/autogen.sh b/autogen.sh
index bc9c5a0..926915c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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' \
+ 'address@hidden:space:]]+([^,[:space:]][^,]+)' || exit
+
+
+ # Install Git hooks.
+
tailored_hooks=
sample_hooks=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master e3a6246: Improve git diff hunk headers for .el, .texi,
Paul Eggert <=