From fb420e7789b4f9a0481ee44dbdf37d3de6578ad3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 15 Dec 2014 15:09:04 -0500 Subject: * lisp/subr.el (sit-for): Tweak docstring. Fixes: debbugs:19381 * src/buffer.c (syms_of_buffer) : fix docstring. * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit to 78. --- build-aux/git-hooks/commit-msg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build-aux/git-hooks/commit-msg') diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 5eb994c6fe0..2e3e4f21cda 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -87,8 +87,8 @@ exec $awk ' status = 1 } - 72 < length && $0 ~ space { - print "Line longer than 72 characters in commit message" + 78 < length && $0 ~ space { + print "Line longer than 78 characters in commit message" status = 1 } -- cgit v1.2.1 From f646cd99e5f2181cbaef365d2f8262789a515e45 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 28 Dec 2014 10:05:14 -0800 Subject: * build-aux/git-hooks/commit-msg: Allow tabs. Treat them as if they were expanded to spaces, with tab stops every 8 columns. --- build-aux/git-hooks/commit-msg | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'build-aux/git-hooks/commit-msg') diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 2e3e4f21cda..9b6179ee613 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -87,6 +87,15 @@ exec $awk ' status = 1 } + { + # Expand tabs to spaces for length calculations etc. + while (match($0, /\t/)) { + before_tab = substr($0, 1, RSTART - 1) + after_tab = substr($0, RSTART + 1) + $0 = sprintf("%s%*s%s", before_tab, 8 - (RSTART - 1) % 8, "", after_tab) + } + } + 78 < length && $0 ~ space { print "Line longer than 78 characters in commit message" status = 1 @@ -103,12 +112,7 @@ exec $awk ' } $0 ~ non_print { - if (gsub(/\t/, "")) { - print "Tab in commit message; please use spaces instead" - } - if ($0 ~ non_print) { - print "Unprintable character in commit message" - } + print "Unprintable character in commit message" status = 1 } -- cgit v1.2.1