Remove ^L characters hidden randomly in the code. Not those used in text files as delimiters.

While working on a tool that processes Erlang code and testing it against this repo,
I found out about those little sneaky 0xff. I thought it may be of help to other
people build such tools to remove non-conforming-to-standard characters.
Add iodata, nonempty_string to built-in type highlighting for emacs

These built-in types were missing from emacs highlighting
Merge branch 'fenollp/treewide_remove_unexpected_0xff/OTP-11323' into maint

* fenollp/treewide_remove_unexpected_0xff/OTP-11323:
  Remove ^L characters hidden randomly in the code. Not those used in text files as delimiters.
Merge branch 'maint'
tools: Add Erlang-specific compilation error regexp for erlang-eunit

This defvar was removed in a87a9699735b0a25f99397fba9576f5756da54d3 which made
eunit fail on running tests in emacs.
Merge branch 'maint'
Merge branch 'puzza007/emacs_iodata_nonempty_string_builtin_types/OTP-11394' into maint

* puzza007/emacs_iodata_nonempty_string_builtin_types/OTP-11394:
  Add iodata, nonempty_string to built-in type highlighting for emacs
Merge branch 'maint'
Take compiler options from beam in cover:compile_beam

Similarly to cover compiling from source
(in this case some user specified compiler options are allowed)
when cover compiling from existing beam
take a filtered list of compiler options from the beamfile.
This way e.g. export_all can be preserved. See use case in eb02beb1c3
tools: Fix compile_beam_opts testcase
Merge branch 'maint'
Silence warnings about different buffer types in erl_memory

erl_memory.c:861:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->size);
                  ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:863:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p,
                      ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:869:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->no);
                      ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:871:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
            *p += sprintf(*p,
                          ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:878:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p,
                      ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:900:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_size);
                  ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:902:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*s %*s ", fw, "", fw, "");
                      ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:904:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_no);
                      ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:906:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
            *p += sprintf(*p, "%*s %*s ", fw, "", fw, "");
                          ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:909:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*s %*s %*s ", fw, "", fw, "", fw, "");
                      ^~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:986:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    area.size = sprintf(area.ptr, format, carg);
                        ^~~~~~~~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1103:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    area.size = sprintf(area.ptr,
                        ^~~~~~~~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1109:23: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        area.size += sprintf(area.ptr + area.size,
                             ^~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1120:26: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    area.size += sprintf(area.ptr + area.size,
                         ^~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1190:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "> %-*s", EM_TIME_FIELD_WIDTH - 2, "Maximum:");
                 ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1223:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "\n");
                 ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1227:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        p += sprintf(p, "%s", stop_str);
                     ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1230:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        p += sprintf(p, exit_str, state->info.exit_status);
                     ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1236:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, format, tsz, bw);
                 ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1286:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "%*" USGND_INT_32_FSTR " ", EM_TIME_FIELD_WIDTH - 1, secs);
                 ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:1311:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "\n");
                 ^
/usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                           ^
erl_memory.c:2231:32: warning: passing 'char *' to parameter of type 'usgnd_int_8 *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
    size = write_header(state, state->output.header, 1);
                               ^~~~~~~~~~~~~~~~~~~~
erl_memory.c:736:44: note: passing argument to parameter 'ptr' here
write_header(em_state *state, usgnd_int_8 *ptr, int trunc)
                                           ^
Silence warnings about socklen_t pointers sign in erl_memory

erl_memory.c:947:7: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    &saddr_size) != 0)
                    ^~~~~~~~~~~
/usr/include/sys/socket.h:616:74: note: passing argument to parameter here
int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict)
                                                                             ^

erl_memory.c:2613:57: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
    sock = accept(lsock, (struct sockaddr *) &oth_addr, &oth_addr_len);
                                                        ^~~~~~~~~~~~~
/usr/include/sys/socket.h:610:69: note: passing argument to parameter here
int     accept(int, struct sockaddr * __restrict, socklen_t * __restrict)
                                                                        ^
Merge branch 'maint'
Prepare release
Merge tag 'OTP_R16B03'

The R16B03 release

Conflicts:
	lib/sasl/vsn.mk
EEP 37: Funs with names

This adds optional names to fun expressions. A named fun expression
is parsed as a tuple `{named_fun,Loc,Name,Clauses}` in erl_parse.

If a fun expression has a name, it must be present and be the same in
every of its clauses. The function name shadows the environment of the
expression shadowing the environment and it is shadowed by the
environment of the clauses' arguments. An unused function name triggers
a warning unless it is prefixed by _, just as every variable.
Variable _ is allowed as a function name.

It is not an error to put a named function in a record field default
value.

When transforming to Core Erlang, the named fun Fun is changed into
the following expression:

    letrec 'Fun'/Arity =
               fun (Args) ->
                       let <Fun> = 'Fun'/Arity
                       in Case
    in 'Fun'/Arity

where Args is the list of arguments of 'Fun'/Arity and Case the
Core Erlang expression corresponding to the clauses of Fun.

This transformation allows us to entirely skip any k_var to k_local
transformation in the fun's clauses bodies.
Test named funs
Support EEP37 named funs in emacs erlang-mode

Change emacs erlang-mode to recognize EEP37 named funs so they're indented
properly. Specifically, modify erlang-partial-parse to allow for an
optional Erlang variable name to appear between the "fun" keyword and the
opening parenthesis of its argument list.