aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2019-05-22 10:18:51 -0700
committerGlenn Morris2019-05-22 10:18:51 -0700
commit0d1ff4cbe232e9ee398dc30058495c29996c0b33 (patch)
treea8a76410648760c7316c20fcde1c2809fecfec16
parent5a024b72c50129cc429bc4b8b18b8c08f3f6b430 (diff)
parent5d24af87c15d9baa9db96fe3c3200d5585d58c4e (diff)
downloademacs-0d1ff4cbe232e9ee398dc30058495c29996c0b33.tar.gz
emacs-0d1ff4cbe232e9ee398dc30058495c29996c0b33.zip
Merge from origin/emacs-26
5d24af8 Remove from docs references to obsolete MULE variables 2bdc419 Do potentially destructive operations in prepare-commit-msg # Conflicts: # src/search.c
-rwxr-xr-xautogen.sh2
-rwxr-xr-xbuild-aux/git-hooks/prepare-commit-msg45
-rw-r--r--src/fns.c6
-rw-r--r--src/search.c7
4 files changed, 49 insertions, 11 deletions
diff --git a/autogen.sh b/autogen.sh
index d0f60dc68af..cff4a54be56 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -339,7 +339,7 @@ git_config diff.texinfo.xfuncname \
339tailored_hooks= 339tailored_hooks=
340sample_hooks= 340sample_hooks=
341 341
342for hook in commit-msg pre-commit; do 342for hook in commit-msg pre-commit prepare-commit-msg; do
343 cmp -- build-aux/git-hooks/$hook "$hooks/$hook" >/dev/null 2>&1 || 343 cmp -- build-aux/git-hooks/$hook "$hooks/$hook" >/dev/null 2>&1 ||
344 tailored_hooks="$tailored_hooks $hook" 344 tailored_hooks="$tailored_hooks $hook"
345done 345done
diff --git a/build-aux/git-hooks/prepare-commit-msg b/build-aux/git-hooks/prepare-commit-msg
new file mode 100755
index 00000000000..3562a802234
--- /dev/null
+++ b/build-aux/git-hooks/prepare-commit-msg
@@ -0,0 +1,45 @@
1#!/bin/sh
2# Check the format of GNU Emacs change log entries.
3
4# Copyright 2019 Free Software Foundation, Inc.
5
6# This file is part of GNU Emacs.
7
8# GNU Emacs is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12
13# GNU Emacs is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17
18# You should have received a copy of the GNU General Public License
19# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
20
21COMMIT_MSG_FILE=$1
22COMMIT_SOURCE=$2
23SHA1=$3
24
25# Prefer gawk if available, as it handles NUL bytes properly.
26if type gawk >/dev/null 2>&1; then
27 awk=gawk
28else
29 awk=awk
30fi
31
32exec $awk '
33 # Catch the case when someone ran git-commit with -s option,
34 # which automatically adds Signed-off-by.
35 /^Signed-off-by: / {
36 print "'\''Signed-off-by:'\'' in commit message"
37 status = 1
38 }
39 END {
40 if (status != 0) {
41 print "Commit aborted; please see the file 'CONTRIBUTE'"
42 }
43 exit status
44 }
45' <"$COMMIT_MSG_FILE"
diff --git a/src/fns.c b/src/fns.c
index c3202495daf..6b1f7331f55 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1131,10 +1131,8 @@ string the same way whether it is unibyte or multibyte.) */)
1131DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte, 1131DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte,
1132 1, 1, 0, 1132 1, 1, 0,
1133 doc: /* Return the unibyte equivalent of STRING. 1133 doc: /* Return the unibyte equivalent of STRING.
1134Multibyte character codes are converted to unibyte according to 1134Multibyte character codes above 255 are converted to unibyte
1135`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'. 1135by taking just the low 8 bits of each character's code. */)
1136If the lookup in the translation table fails, this function takes just
1137the low 8 bits of each character. */)
1138 (Lisp_Object string) 1136 (Lisp_Object string)
1139{ 1137{
1140 CHECK_STRING (string); 1138 CHECK_STRING (string);
diff --git a/src/search.c b/src/search.c
index dfbae5c9628..8a0f707b723 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1324,12 +1324,7 @@ search_buffer_non_re (Lisp_Object string, ptrdiff_t pos,
1324 } 1324 }
1325 else 1325 else
1326 { 1326 {
1327 /* Converting multibyte to single-byte. 1327 /* Converting multibyte to single-byte. */
1328
1329 ??? Perhaps this conversion should be done in a special way
1330 by subtracting nonascii-insert-offset from each non-ASCII char,
1331 so that only the multibyte chars which really correspond to
1332 the chosen single-byte character set can possibly match. */
1333 raw_pattern_size = SCHARS (string); 1328 raw_pattern_size = SCHARS (string);
1334 raw_pattern_size_byte = SCHARS (string); 1329 raw_pattern_size_byte = SCHARS (string);
1335 raw_pattern = SAFE_ALLOCA (raw_pattern_size + 1); 1330 raw_pattern = SAFE_ALLOCA (raw_pattern_size + 1);