aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2020-08-25 15:29:38 +0200
committerMichael Albinus2020-08-25 15:29:38 +0200
commit36f2f67c96d44c82ce31dafb38cd4e2622a5a372 (patch)
tree61f4d8cb918bfc22c7deab7258f00e2ae36d4482
parent478c2e23620eeda65030458762a843231f7e9b35 (diff)
parent44104a607aeb7fd73bf7edcbbe6a508eee36dd0f (diff)
downloademacs-36f2f67c96d44c82ce31dafb38cd4e2622a5a372.tar.gz
emacs-36f2f67c96d44c82ce31dafb38cd4e2622a5a372.zip
Merge from origin/emacs-27
44104a607a Fix error in GMP test e26e63444d Add Feature testing for Windows binaries 4e2caef384 ; * src/character.c (str_as_multibyte): Fix the commentary. d3a4ce8420 Revert "; * etc/NEWS: Remove temporary note on documentati... 16f00e36dc * admin/admin.el (set-version): Trap yet another NEWS error. 121be3e118 ; * etc/NEWS: Remove temporary note on documentation. (Bu... 5fcb97dabd Fix cond jump table compilation (bug#42919)
-rw-r--r--admin/admin.el2
-rw-r--r--etc/NEWS.272
-rw-r--r--etc/w32-feature.el87
-rw-r--r--lisp/emacs-lisp/bytecomp.el52
-rw-r--r--src/character.c6
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el16
6 files changed, 131 insertions, 34 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 923f0100820..310cd54e957 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -151,7 +151,7 @@ Root must be the root of an Emacs source tree."
151 (display-warning 'admin 151 (display-warning 'admin
152 "NEWS file contains empty sections - remove them?")) 152 "NEWS file contains empty sections - remove them?"))
153 (goto-char (point-min)) 153 (goto-char (point-min))
154 (if (re-search-forward "^\\(\\+\\+\\+ *\\|--- *\\)$" nil t) 154 (if (re-search-forward "^\\(\\+\\+\\+ *$\\|--- *$\\|Temporary note:\\)" nil t)
155 (display-warning 'admin 155 (display-warning 'admin
156 "NEWS file still contains temporary markup. 156 "NEWS file still contains temporary markup.
157Documentation changes might not have been completed!")))) 157Documentation changes might not have been completed!"))))
diff --git a/etc/NEWS.27 b/etc/NEWS.27
index 31b69025173..5ef54309893 100644
--- a/etc/NEWS.27
+++ b/etc/NEWS.27
@@ -24,7 +24,6 @@ applies, and please also update docstrings as needed.
24 24
25* Installation Changes in Emacs 27.1 25* Installation Changes in Emacs 27.1
26 26
27---
28** Emacs now uses GMP, the GNU Multiple Precision library. 27** Emacs now uses GMP, the GNU Multiple Precision library.
29By default, if 'configure' does not find a suitable libgmp, it 28By default, if 'configure' does not find a suitable libgmp, it
30arranges for the included mini-gmp library to be built and used. 29arranges for the included mini-gmp library to be built and used.
@@ -58,7 +57,6 @@ that building with Cairo enabled results in using Pango instead of
58libXft for font support, and that Pango 1.44 has removed support for 57libXft for font support, and that Pango 1.44 has removed support for
59bitmapped fonts. 58bitmapped fonts.
60 59
61+++
62** Emacs now uses a "portable dumper" instead of unexec. 60** Emacs now uses a "portable dumper" instead of unexec.
63This improves compatibility with memory allocation on modern systems, 61This improves compatibility with memory allocation on modern systems,
64and in particular better supports the Address Space Layout 62and in particular better supports the Address Space Layout
diff --git a/etc/w32-feature.el b/etc/w32-feature.el
new file mode 100644
index 00000000000..3c0f74175cf
--- /dev/null
+++ b/etc/w32-feature.el
@@ -0,0 +1,87 @@
1;;; w32-feature.el --- Check Availability of Emacs Features -*- lexical-binding: t -*-
2
3;; Copyright (C) 2020 Free Software Foundation, Inc.
4
5;; Author: Phillip Lord <phillip.lord@russet.org.uk>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;; This file provides tests for various features of Emacs. It is
25;; designed to check whether bundled binary distributions of Emacs on
26;; windows are fully functional.
27
28;;; Code:
29(require 'ert)
30
31(ert-deftest feature-optimization ()
32 (should
33 (string-match-p "CFLAGS=-O2" system-configuration-options)))
34
35(ert-deftest feature-harfbuzz ()
36 (should
37 (eq
38 'harfbuzz
39 (car (frame-parameter nil 'font-backend)))))
40
41(ert-deftest feature-gnutls ()
42 (should (gnutls-available-p)))
43
44(ert-deftest feature-zlib ()
45 (should (zlib-available-p)))
46
47(ert-deftest feature-thread ()
48 (should (fboundp 'make-thread)))
49
50(ert-deftest feature-json ()
51 (should
52 (fboundp 'json-serialize)))
53
54(ert-deftest feature-gmp ()
55 (should
56 (string-match-p "GMP" system-configuration-features)))
57
58(ert-deftest feature-module ()
59 (should (fboundp 'module-load)))
60
61(ert-deftest feature-libxml ()
62 (should (libxml-available-p)))
63
64(ert-deftest feature-lcms2 ()
65 (should (lcms2-available-p)))
66
67(ert-deftest feature-xpm ()
68 (should (image-type-available-p 'xpm)))
69
70(ert-deftest feature-gif ()
71 (should (image-type-available-p 'gif)))
72
73(ert-deftest feature-png ()
74 (should (image-type-available-p 'png)))
75
76(ert-deftest feature-xpm ()
77 (should (image-type-available-p 'xpm)))
78
79(ert-deftest feature-jpeg ()
80 (should (image-type-available-p 'jpeg)))
81
82(ert-deftest feature-tiff ()
83 (should (image-type-available-p 'tiff)))
84
85(ert-deftest feature-svg ()
86 (should (image-type-available-p 'svg)))
87;;; feature.el ends here
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 7ae8749ab40..966990bac96 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4132,40 +4132,44 @@ Return (TAIL VAR TEST CASES), where:
4132 (switch-var nil) 4132 (switch-var nil)
4133 (switch-test 'eq)) 4133 (switch-test 'eq))
4134 (while (pcase (car clauses) 4134 (while (pcase (car clauses)
4135 (`((,fn ,expr1 ,expr2) . ,body) 4135 (`((,(and fn (or 'eq 'eql 'equal)) ,expr1 ,expr2) . ,body)
4136 (let* ((vars (byte-compile--cond-vars expr1 expr2)) 4136 (let* ((vars (byte-compile--cond-vars expr1 expr2))
4137 (var (car vars)) 4137 (var (car vars))
4138 (value (cdr vars))) 4138 (value (cdr vars)))
4139 (and var (or (eq var switch-var) (not switch-var)) 4139 (and var (or (eq var switch-var) (not switch-var))
4140 (cond 4140 (progn
4141 ((memq fn '(eq eql equal))
4142 (setq switch-var var) 4141 (setq switch-var var)
4143 (setq switch-test 4142 (setq switch-test
4144 (byte-compile--common-test switch-test fn)) 4143 (byte-compile--common-test switch-test fn))
4145 (unless (member value keys) 4144 (unless (member value keys)
4146 (push value keys) 4145 (push value keys)
4147 (push (cons (list value) (or body '(t))) cases)) 4146 (push (cons (list value) (or body '(t))) cases))
4148 t) 4147 t))))
4149 ((and (memq fn '(memq memql member)) 4148 (`((,(and fn (or 'memq 'memql 'member)) ,var ,expr) . ,body)
4150 (listp value) 4149 (and (symbolp var)
4151 ;; Require a non-empty body, since the member 4150 (or (eq var switch-var) (not switch-var))
4152 ;; function value depends on the switch 4151 (macroexp-const-p expr)
4153 ;; argument. 4152 ;; Require a non-empty body, since the member
4154 body) 4153 ;; function value depends on the switch argument.
4155 (setq switch-var var) 4154 body
4156 (setq switch-test 4155 (let ((value (eval expr)))
4157 (byte-compile--common-test 4156 (and (proper-list-p value)
4158 switch-test (cdr (assq fn '((memq . eq) 4157 (progn
4159 (memql . eql) 4158 (setq switch-var var)
4160 (member . equal)))))) 4159 (setq switch-test
4161 (let ((vals nil)) 4160 (byte-compile--common-test
4162 (dolist (elem value) 4161 switch-test
4163 (unless (funcall fn elem keys) 4162 (cdr (assq fn '((memq . eq)
4164 (push elem vals))) 4163 (memql . eql)
4165 (when vals 4164 (member . equal))))))
4166 (setq keys (append vals keys)) 4165 (let ((vals nil))
4167 (push (cons (nreverse vals) body) cases))) 4166 (dolist (elem value)
4168 t)))))) 4167 (unless (funcall fn elem keys)
4168 (push elem vals)))
4169 (when vals
4170 (setq keys (append vals keys))
4171 (push (cons (nreverse vals) body) cases)))
4172 t))))))
4169 (setq clauses (cdr clauses))) 4173 (setq clauses (cdr clauses)))
4170 ;; Assume that a single switch is cheaper than two or more discrete 4174 ;; Assume that a single switch is cheaper than two or more discrete
4171 ;; compare clauses. This could be tuned, possibly taking into 4175 ;; compare clauses. This could be tuned, possibly taking into
diff --git a/src/character.c b/src/character.c
index 4902e564b1d..5860f6a0c8c 100644
--- a/src/character.c
+++ b/src/character.c
@@ -495,9 +495,9 @@ parse_str_as_multibyte (const unsigned char *str, ptrdiff_t len,
495 495
496/* Arrange unibyte text at STR of NBYTES bytes as a multibyte text. 496/* Arrange unibyte text at STR of NBYTES bytes as a multibyte text.
497 It actually converts only such 8-bit characters that don't construct 497 It actually converts only such 8-bit characters that don't construct
498 a multibyte sequence to multibyte forms of Latin-1 characters. If 498 a multibyte sequence to multibyte forms of raw bytes. If NCHARS
499 NCHARS is nonzero, set *NCHARS to the number of characters in the 499 is nonzero, set *NCHARS to the number of characters in the text.
500 text. It is assured that we can use LEN bytes at STR as a work 500 It is assured that we can use LEN bytes at STR as a work
501 area and that is enough. Return the number of bytes of the 501 area and that is enough. Return the number of bytes of the
502 resulting text. */ 502 resulting text. */
503 503
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 834e3b6d914..a9dcf152617 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -354,10 +354,18 @@
354 '((a c) (b c) (7 c) (-3 c) (nil nil) (t c) (q c) (r c) (s c) 354 '((a c) (b c) (7 c) (-3 c) (nil nil) (t c) (q c) (r c) (s c)
355 (t c) (x "a") (x "c") (x c) (x d) (x e))) 355 (t c) (x "a") (x "c") (x c) (x d) (x e)))
356 356
357 ;; `substring' bytecode generation (bug#39709). 357 (mapcar (lambda (x) (cond ((member '(a . b) x) 1)
358 (substring "abcdef") 358 ((equal x '(c)) 2)))
359 (substring "abcdef" 2) 359 '(((a . b)) a b (c) (d)))
360 (substring "abcdef" 3 2)) 360 (mapcar (lambda (x) (cond ((memq '(a . b) x) 1)
361 ((equal x '(c)) 2)))
362 '(((a . b)) a b (c) (d)))
363 (mapcar (lambda (x) (cond ((member '(a b) x) 1)
364 ((equal x '(c)) 2)))
365 '(((a b)) a b (c) (d)))
366 (mapcar (lambda (x) (cond ((memq '(a b) x) 1)
367 ((equal x '(c)) 2)))
368 '(((a b)) a b (c) (d))))
361 "List of expression for test. 369 "List of expression for test.
362Each element will be executed by interpreter and with 370Each element will be executed by interpreter and with
363bytecompiled code, and their results compared.") 371bytecompiled code, and their results compared.")