From d875a22bc6bebb1e45dd39c451fef4e264fca4e3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 14 Nov 2020 15:55:35 +0200 Subject: [PATCH 1/7] Update the various INSTALL files * nt/INSTALL.W64: * nt/INSTALL: * INSTALL: Update the installation information, in particular the fact that HarfBuzz is now preferred as the shaping library. --- INSTALL | 34 ++++++++++++++++++++-------------- nt/INSTALL | 18 ++++++++++++++++++ nt/INSTALL.W64 | 12 +++++++----- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/INSTALL b/INSTALL index 4d65f302aac..cb1fe8d3c2c 100644 --- a/INSTALL +++ b/INSTALL @@ -117,19 +117,25 @@ ADDITIONAL DISTRIBUTION FILES * Complex Text Layout support libraries -On GNU and Unix systems, Emacs needs the optional libraries "m17n-db", -"libm17n-flt", "libotf" to correctly display such complex scripts as -Indic and Khmer, and also for scripts that require Arabic shaping -support (Arabic and Farsi). On some systems, particularly GNU/Linux, -these libraries may be already present or available as additional -packages. Note that if there is a separate 'dev' or 'devel' package, -for use at compilation time rather than run time, you will need that -as well as the corresponding run time package; typically the dev -package will contain header files and a library archive. Otherwise, -you can download the libraries from . +On GNU and Unix systems, Emacs needs optional libraries to correctly +display such complex scripts as Indic and Khmer, and also for scripts +that require Arabic shaping support (Arabic and Farsi). If the +HarfBuzz library is installed, Emacs will build with it and use it for +this purpose. HarfBuzz is the preferred shaping engine, both on Posix +hosts and on MS-Windows, so we recommend installing it before building +Emacs. The alternative for GNU/Linux and Posix systems is to use the +"m17n-db", "libm17n-flt", and "libotf" libraries. (On some systems, +particularly GNU/Linux, these libraries may be already present or +available as additional packages.) Note that if there is a separate +'dev' or 'devel' package, for use at compilation time rather than run +time, you will need that as well as the corresponding run time +package; typically the dev package will contain header files and a +library archive. On MS-Windows, if HarfBuzz is not available, Emacs +will use the Uniscribe shaping engine that is part of the OS. Note that Emacs cannot support complex scripts on a TTY, unless the -terminal includes such a support. +terminal includes such a support. However, most modern terminal +emulators, such as xterm, do support such scripts. * intlfonts-VERSION.tar.gz @@ -234,10 +240,10 @@ directory. On Red Hat-based systems, the corresponding command is config-manager --set-enabled fedora-debuginfo updates-debuginfo'). Once you have installed the source package, for example at -/path/to/emacs-26.1, add the following line to your startup file: +/path/to/emacs-27.1, add the following line to your startup file: (setq find-function-C-source-directory - "/path/to/emacs-26.1/src") + "/path/to/emacs-27.1/src") The installation directory of the Emacs source package will contain the exact package name and version number Emacs is installed on your @@ -249,7 +255,7 @@ Emacs debugging symbols are distributed by a debug package. It does not exist for every released Emacs package, this depends on the distribution. On Debian-based systems, you can install a debug package of Emacs with a command like 'apt-get install emacs-dbg' (on -older systems, replace 'emacs' with eg 'emacs25'). On Red Hat-based +older systems, replace 'emacs' with eg 'emacs27'). On Red Hat-based systems, the corresponding command is 'dnf debuginfo-install emacs'. diff --git a/nt/INSTALL b/nt/INSTALL index 2fe2c8c2673..27fb5f096f7 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -502,11 +502,21 @@ build will run on Windows 9X and newer systems). Does Emacs use -lgnutls? yes Does Emacs use -lxml2? yes Does Emacs use -lfreetype? no + Does Emacs use HarfBuzz? yes Does Emacs use -lm17n-flt? no Does Emacs use -lotf? no Does Emacs use -lxft? no + Does Emacs use -lsystemd? no + Does Emacs use -ljansson? yes + Does Emacs use the GMP library? yes Does Emacs directly use zlib? yes + Does Emacs have dynamic modules support? yes Does Emacs use toolkit scroll bars? yes + Does Emacs support Xwidgets? no + Does Emacs have threading support in lisp? yes + Does Emacs support the portable dumper? yes + Does Emacs support the legacy unexec dumping? no + Which dumping strategy does Emacs use? pdumper You are almost there, hang on. @@ -815,6 +825,14 @@ build will run on Windows 9X and newer systems). the libjansson DLL (for 32-bit builds of Emacs) are available from the ezwinports site and from the MSYS2 project. +* Optional support for HarfBuzzz shaping library + + Emacs supports display of complex scripts and Arabic shaping. The + preferred library for that is HarfBuzz; prebuilt binaries are + available from the ezwinports site (for 32-bit builds of Emacs) and + from the MSYS2 project. If HarfBuzz is not available, Emacs will + use the Uniscribe shaping engine that is part of MS-Windows. + This file is part of GNU Emacs. diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64 index c3d4dfa4c28..498fc38f612 100644 --- a/nt/INSTALL.W64 +++ b/nt/INSTALL.W64 @@ -55,14 +55,16 @@ packages (you can copy and paste it into the shell with Shift + Insert): mingw-w64-x86_64-jansson \ mingw-w64-x86_64-libxml2 \ mingw-w64-x86_64-gnutls \ - mingw-w64-x86_64-zlib + mingw-w64-x86_64-zlib \ + mingw-w64-x86_64-harfbuzz The packages include the base developer tools (autoconf, grep, make, etc.), the compiler toolchain (gcc, gdb, etc.), several image libraries, an XML -library, the GnuTLS (transport layer security) library, and zlib for -decompressing text. Only the first three packages are required (base-devel, -toolchain, xpm-nox); the rest are optional. You can select only part of the -libraries if you don't need them all. +library, the GnuTLS (transport layer security) library, zlib for +decompressing text, and HarfBuzz for use as the shaping engine. Only the +first three packages are required (base-devel, toolchain, xpm-nox); the +rest are optional. You can select only part of the libraries if you don't +need them all. You now have a complete build environment for Emacs. From 03eeab469ed829b4f06d970034ef1bbce01fea6e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 14 Nov 2020 15:59:31 +0200 Subject: [PATCH 2/7] ; Update the expected result files in test/manual/etags. --- test/manual/etags/ETAGS.good_1 | 14 +++++++------- test/manual/etags/ETAGS.good_2 | 14 +++++++------- test/manual/etags/ETAGS.good_3 | 14 +++++++------- test/manual/etags/ETAGS.good_4 | 14 +++++++------- test/manual/etags/ETAGS.good_5 | 14 +++++++------- test/manual/etags/ETAGS.good_6 | 14 +++++++------- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/test/manual/etags/ETAGS.good_1 b/test/manual/etags/ETAGS.good_1 index 5451a79efaa..3de15514e79 100644 --- a/test/manual/etags/ETAGS.good_1 +++ b/test/manual/etags/ETAGS.good_1 @@ -3153,13 +3153,13 @@ tex-src/gzip.texi,303 @node Top,62,2139 @node Copying,80,2652 @node Overview,83,2705 -@node Sample,166,7272 -@node Invoking gzip,Invoking gzip210,8828 -@node Advanced usage,Advanced usage357,13496 -@node Environment,420,15208 -@node Tapes,437,15769 -@node Problems,460,16768 -@node Concept Index,Concept Index473,17288 +@node Sample,166,7273 +@node Invoking gzip,Invoking gzip210,8829 +@node Advanced usage,Advanced usage357,13497 +@node Environment,420,15209 +@node Tapes,437,15770 +@node Problems,460,16769 +@node Concept Index,Concept Index473,17289 tex-src/texinfo.tex,30627 \def\texinfoversion{\texinfoversion26,1035 diff --git a/test/manual/etags/ETAGS.good_2 b/test/manual/etags/ETAGS.good_2 index ab2111eafb2..ddb8d19540b 100644 --- a/test/manual/etags/ETAGS.good_2 +++ b/test/manual/etags/ETAGS.good_2 @@ -3726,13 +3726,13 @@ tex-src/gzip.texi,303 @node Top,62,2139 @node Copying,80,2652 @node Overview,83,2705 -@node Sample,166,7272 -@node Invoking gzip,Invoking gzip210,8828 -@node Advanced usage,Advanced usage357,13496 -@node Environment,420,15208 -@node Tapes,437,15769 -@node Problems,460,16768 -@node Concept Index,Concept Index473,17288 +@node Sample,166,7273 +@node Invoking gzip,Invoking gzip210,8829 +@node Advanced usage,Advanced usage357,13497 +@node Environment,420,15209 +@node Tapes,437,15770 +@node Problems,460,16769 +@node Concept Index,Concept Index473,17289 tex-src/texinfo.tex,30627 \def\texinfoversion{\texinfoversion26,1035 diff --git a/test/manual/etags/ETAGS.good_3 b/test/manual/etags/ETAGS.good_3 index e53fb9629c5..40be768aacb 100644 --- a/test/manual/etags/ETAGS.good_3 +++ b/test/manual/etags/ETAGS.good_3 @@ -3560,13 +3560,13 @@ tex-src/gzip.texi,303 @node Top,62,2139 @node Copying,80,2652 @node Overview,83,2705 -@node Sample,166,7272 -@node Invoking gzip,Invoking gzip210,8828 -@node Advanced usage,Advanced usage357,13496 -@node Environment,420,15208 -@node Tapes,437,15769 -@node Problems,460,16768 -@node Concept Index,Concept Index473,17288 +@node Sample,166,7273 +@node Invoking gzip,Invoking gzip210,8829 +@node Advanced usage,Advanced usage357,13497 +@node Environment,420,15209 +@node Tapes,437,15770 +@node Problems,460,16769 +@node Concept Index,Concept Index473,17289 tex-src/texinfo.tex,30627 \def\texinfoversion{\texinfoversion26,1035 diff --git a/test/manual/etags/ETAGS.good_4 b/test/manual/etags/ETAGS.good_4 index 5a4b5b4b8ba..15f67c5d28a 100644 --- a/test/manual/etags/ETAGS.good_4 +++ b/test/manual/etags/ETAGS.good_4 @@ -3317,13 +3317,13 @@ tex-src/gzip.texi,303 @node Top,62,2139 @node Copying,80,2652 @node Overview,83,2705 -@node Sample,166,7272 -@node Invoking gzip,Invoking gzip210,8828 -@node Advanced usage,Advanced usage357,13496 -@node Environment,420,15208 -@node Tapes,437,15769 -@node Problems,460,16768 -@node Concept Index,Concept Index473,17288 +@node Sample,166,7273 +@node Invoking gzip,Invoking gzip210,8829 +@node Advanced usage,Advanced usage357,13497 +@node Environment,420,15209 +@node Tapes,437,15770 +@node Problems,460,16769 +@node Concept Index,Concept Index473,17289 tex-src/texinfo.tex,30627 \def\texinfoversion{\texinfoversion26,1035 diff --git a/test/manual/etags/ETAGS.good_5 b/test/manual/etags/ETAGS.good_5 index f89cfefc388..583de5cbe22 100644 --- a/test/manual/etags/ETAGS.good_5 +++ b/test/manual/etags/ETAGS.good_5 @@ -4297,13 +4297,13 @@ tex-src/gzip.texi,303 @node Top,62,2139 @node Copying,80,2652 @node Overview,83,2705 -@node Sample,166,7272 -@node Invoking gzip,Invoking gzip210,8828 -@node Advanced usage,Advanced usage357,13496 -@node Environment,420,15208 -@node Tapes,437,15769 -@node Problems,460,16768 -@node Concept Index,Concept Index473,17288 +@node Sample,166,7273 +@node Invoking gzip,Invoking gzip210,8829 +@node Advanced usage,Advanced usage357,13497 +@node Environment,420,15209 +@node Tapes,437,15770 +@node Problems,460,16769 +@node Concept Index,Concept Index473,17289 tex-src/texinfo.tex,30627 \def\texinfoversion{\texinfoversion26,1035 diff --git a/test/manual/etags/ETAGS.good_6 b/test/manual/etags/ETAGS.good_6 index 0a31ed078e8..86df93afab1 100644 --- a/test/manual/etags/ETAGS.good_6 +++ b/test/manual/etags/ETAGS.good_6 @@ -4297,13 +4297,13 @@ tex-src/gzip.texi,303 @node Top,62,2139 @node Copying,80,2652 @node Overview,83,2705 -@node Sample,166,7272 -@node Invoking gzip,Invoking gzip210,8828 -@node Advanced usage,Advanced usage357,13496 -@node Environment,420,15208 -@node Tapes,437,15769 -@node Problems,460,16768 -@node Concept Index,Concept Index473,17288 +@node Sample,166,7273 +@node Invoking gzip,Invoking gzip210,8829 +@node Advanced usage,Advanced usage357,13497 +@node Environment,420,15209 +@node Tapes,437,15770 +@node Problems,460,16769 +@node Concept Index,Concept Index473,17289 tex-src/texinfo.tex,30627 \def\texinfoversion{\texinfoversion26,1035 From 66bcec8838ab05b5690d7f530851ecf594c5d877 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 15 Nov 2020 10:34:54 +0000 Subject: [PATCH 3/7] * lisp/progmodes/cc-langs.el (c-<>-notable-chars-re): Fix wrong '-' in regexp --- lisp/progmodes/cc-langs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 0a7f4565c0e..56c3a4889b2 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -3643,7 +3643,7 @@ When \"(\" is present, that defun will attempt to parse a parenthesized expression inside the template. When \")\" is present it will treat an unbalanced closing paren as a sign of the invalidity of the putative template construct." - t "[<;{},|+&->)]" + t "[<;{},|+&>)-]" c++ "[<;{},>()]") (c-lang-defvar c-<>-notable-chars-re (c-lang-const c-<>-notable-chars-re)) From 4ec740866a65761fa1318400f299b2d591b05acf Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 15 Nov 2020 13:23:15 +0000 Subject: [PATCH 4/7] Make the invocation of combine-change-calls in comment-region valid This fixes bug #44581. The problem was that whitespace outside of the (BEG END) region was being deleted, and this made the invocation of combine-change-calls with (BEG END) invalid. * lisp/newcomment.el (comment-region-default): Amend the second argument to combine-change-calls. --- lisp/newcomment.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index e111ae8e225..3eb158dc2c8 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -1292,7 +1292,15 @@ changed with `comment-style'." (defun comment-region-default (beg end &optional arg) (if comment-combine-change-calls - (combine-change-calls beg end (comment-region-default-1 beg end arg)) + (combine-change-calls beg + ;; A new line might get inserted and whitespace deleted + ;; after END for line comments. Ensure the next argument is + ;; after any and all changes. + (save-excursion + (goto-char end) + (forward-line) + (point)) + (comment-region-default-1 beg end arg)) (comment-region-default-1 beg end arg))) ;;;###autoload From 286c63277287a52148d8b9a8b57979d1d04d2ed0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 15 Nov 2020 19:26:38 +0200 Subject: [PATCH 5/7] Reformat argument commentary in etags.c * lib-src/etags.c (pfnote, consider_token, C_entries): Resurrect original format of comments to function arguments. --- lib-src/etags.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index 8babe926db1..f761a7b7c33 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1973,14 +1973,13 @@ make_tag (const char *name, /* tag name, or NULL if unnamed */ /* Record a tag. */ static void -pfnote (char *name, bool is_func, char *linestart, ptrdiff_t linelen, - intmax_t lno, intmax_t cno) - /* tag name, or NULL if unnamed */ - /* tag is a function */ - /* start of the line where tag is */ - /* length of the line where tag is */ - /* line number */ - /* character number */ +pfnote (char *name, /* tag name, or NULL if unnamed */ + bool is_func, /* tag is a function */ + char *linestart, /* start of the line where tag is */ + ptrdiff_t linelen, /* length of the line where tag is */ + intmax_t lno, /* line number */ + intmax_t cno) /* character number */ + { register node *np; @@ -2904,15 +2903,13 @@ static void make_C_tag (bool); */ static bool -consider_token (char *str, ptrdiff_t len, int c, int *c_extp, - ptrdiff_t bracelev, ptrdiff_t parlev, bool *is_func_or_var) - /* IN: token pointer */ - /* IN: token length */ - /* IN: first char after the token */ - /* IN, OUT: C extensions mask */ - /* IN: brace level */ - /* IN: parenthesis level */ - /* OUT: function or variable found */ +consider_token (char *str, /* IN: token pointer */ + ptrdiff_t len, /* IN: token length */ + int c, /* IN: first char after the token */ + int *c_extp, /* IN, OUT: C extensions mask */ + ptrdiff_t bracelev, /* IN: brace level */ + ptrdiff_t parlev, /* IN: parenthesis level */ + bool *is_func_or_var) /* OUT: function or variable found */ { /* When structdef is stagseen, scolonseen, or snone with bracelev > 0, structtype is the type of the preceding struct-like keyword, and @@ -3311,9 +3308,8 @@ perhaps_more_input (FILE *inf) * C syntax and adds them to the list. */ static void -C_entries (int c_ext, FILE *inf) - /* extension of C */ - /* input file */ +C_entries (int c_ext, /* extension of C */ + FILE *inf) /* input file */ { char c; /* latest char read; '\0' for end of line */ char *lp; /* pointer one beyond the character `c' */ From 53e2a612ad7441ac24d27872d404f6f0f15a3962 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 15 Nov 2020 15:08:58 -0800 Subject: [PATCH 6/7] ; * lib-src/make-fingerprint.c: Update commentary. --- lib-src/make-fingerprint.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib-src/make-fingerprint.c b/lib-src/make-fingerprint.c index c013d0aca3b..b72ee90bbca 100644 --- a/lib-src/make-fingerprint.c +++ b/lib-src/make-fingerprint.c @@ -19,9 +19,12 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* The arguments given to this program are all the object files that - go into building GNU Emacs. There is no special search logic to find - the files. */ +/* The argument given to this program is the initial version of the + temacs executable file used when building GNU Emacs. This program computes + a digest fingerprint for the executable, and modifies the binary in + place, replacing all instances of the existing fingerprint (normally + the default fingerprint from libgnu's lib/fingerprint.c) with the + new value. With option -r, it just prints the digest. */ #include From 75723ec212ca0ac0b5f019622960caf083e95105 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 16 Nov 2020 12:48:54 +0100 Subject: [PATCH 7/7] ; * lisp/emacs-lisp/benchmark.el (benchmark-run): Fix docstring --- lisp/emacs-lisp/benchmark.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index a7fcc5cb8f2..ee0774db23a 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -43,7 +43,7 @@ ;;;###autoload (defmacro benchmark-run (&optional repetitions &rest forms) "Time execution of FORMS. -If REPETITIONS is supplied as a number, run forms that many times, +If REPETITIONS is supplied as a number, run FORMS that many times, accounting for the overhead of the resulting loop. Otherwise run FORMS once. Return a list of the total elapsed time for execution, the number of