From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.devel Subject: Re: master updated (e6041a0 -> 6220fae) Date: Fri, 17 Feb 2017 16:43:07 +0100 Organization: http://mina86.com/ Message-ID: References: <20170215164632.13342.86743@vcs0.savannah.gnu.org> <6gshndfkwd.fsf@fencepost.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487346203 7314 195.159.176.226 (17 Feb 2017 15:43:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2017 15:43:23 +0000 (UTC) User-Agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/26.0.50.1 (x86_64-unknown-linux-gnu) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 17 16:43:18 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cekgo-0001Lx-2N for ged-emacs-devel@m.gmane.org; Fri, 17 Feb 2017 16:43:18 +0100 Original-Received: from localhost ([::1]:54356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cekgt-0000HS-Se for ged-emacs-devel@m.gmane.org; Fri, 17 Feb 2017 10:43:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cekgj-0000FI-5C for emacs-devel@gnu.org; Fri, 17 Feb 2017 10:43:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cekgh-0007Kn-H2 for emacs-devel@gnu.org; Fri, 17 Feb 2017 10:43:13 -0500 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:35085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cekgh-0007KJ-7a for emacs-devel@gnu.org; Fri, 17 Feb 2017 10:43:11 -0500 Original-Received: by mail-wr0-x22b.google.com with SMTP id c4so32099600wrd.2 for ; Fri, 17 Feb 2017 07:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version :content-transfer-encoding; bh=PZxE7v6en/mmkQXopxh4J6YUwqhRpTHT/3biD5jPS/o=; b=hLDnbyhDdtMIJT8+WOOHweazfFMSOspFOLs9oQcHsIAePpgZptvQTVoj2oDzWmpaEE 5f4iE7pCYuNlagmwDVOFXQFX8yTUiv9dGqpLeDrRotaZk9IOrbMejxHyzvg9HLdS91rB /v0bgjaljFXfZzMThR+LllEk2vtjmLp7R8ikU0RhfyL20C8w+ZqkpmWr3/Oe1D69mb3P ABJl4aQa0C4oZsNJlU+/U4glUOG2gF6wOp9MW0OqBm7Ro+ntAb1TudKgJNiWbRcu+k6u L4/v3xczWkGTe/BFx35dSN4znWNmnGMJzIJckJFew/1i8vWBtjOlM1ghaLvG2C6qp2hX lfpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-transfer-encoding; bh=PZxE7v6en/mmkQXopxh4J6YUwqhRpTHT/3biD5jPS/o=; b=Hf+4n/pjm83Of7mCMp6VV9WQfsX5Fb7AWooF8M5io0WEFqa9puPNRB6t7Zxu+QYlR1 MDzrllAeRjj0Eovp9zgzRYU5wc/8niAHMThSMVNFq/e+SxuQF06Ih/p3bcPUClq4TC2A fOEe/dmcWJN4E+NlklE3qSl1ehoA+BysK7jd2oBHCJQHefgGpgKXAdBQIGW5LATJMXvG ZD0mO4r5IFXOjuor2Ytyyegw/QJ2iDFduQBF9Vg21yIrtf981VpPn1IPfQSy0Aw+K8PH DAQ05z1yELzjr1eF9m7vyt2sm2pAdamGT208XrUFcB+2NhyY3tmIsLLB55781o21cl4V wtbg== X-Gm-Message-State: AMke39kdk2XCbdOYo+26VX/gNn/6eQHOOYAoHSCUfFF/L9SEtxogUEEfHRNxAUxcy2LwzXED X-Received: by 10.223.135.219 with SMTP id c27mr6864086wrc.139.1487346189556; Fri, 17 Feb 2017 07:43:09 -0800 (PST) Original-Received: from mpn-glaptop ([2620:0:105f:fd00:611e:6ff3:b8bb:ada3]) by smtp.gmail.com with ESMTPSA id x25sm13450763wrx.27.2017.02.17.07.43.08 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 17 Feb 2017 07:43:08 -0800 (PST) In-Reply-To: <6gshndfkwd.fsf@fencepost.gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACP0lEQVQ4T23Sv2vbQBQHcBk1xE6WyALX107VUEgmn6+ouUwpEQQ6uRjttkWP4CkBg2M0BQLBdPFZYPsyFYo7qEtKDQ7on+t7+nF2Ux8ahD587717OmNYrOvycHsZ+o2r051wHTHysAvGb8ygvgu4QWT0sCmkgZCIEnlV2X8BtyraazFGDuxhmKSQJMlwHQ7v5MHSNxmz78rfElwAa3ieVD9e+hBhjaPDDG6NgFo2f4wBMNIo5YmRtF0RyDgFjJjlMIWbnuM4x9MMfABGTlN4qgIQB4A1DEyA1BHWtfeWNUMwiVJKoqh97KrkOO+qzgluVYLvFCUKAX73nONeBr7BGMdM6Sg0kuep03VywLaIzRiVr+GAzKlpQIsAFnWAG2e6DT5WmWDiudZMIc6hYrMOmeMQK9WX0B+/RfjzL9DI7Y9/Iayn29Ci0r2i4f9gMimMSZLCDMalgQGU5hnUtqAN0OGvEmO1Wnl0C0wWSCEHnuHBqmygxdxA8oWXwbipoc1EoNR9DqOpBpOJrnr0criQab9ZT4LL+wI+K7GBQH30CrhUruilgP9DRTrhVWZCiAyILP+wiuLeCKGTD6r/nc8LOJcAwR6IBTUs+7CASw3QFZ0MdA2PI3zNziH4ZKVhXCRMBjeZ1DWMekKwDCASwExy+NQ86TaykaDAFHO4aP48y4 fIcDM5yOG8GcTLbOyp8A8azjJI93JFd1EA6yN8sSxMQJWoABqniRZVykYgRXErzrdqExAoUrRb0xfRp8p2A/4XmfilTtkDZ4cAAAAASUVORK5CYII= X-Face: -TR8(rDTHy/(xl?SfWd1|3:TTgDIatE^t'vop%*gVg[kn$t{EpK(P"VQ=~T2#ysNmJKN$"yTRLB4YQs$4{[.]Fc1)*O]3+XO^oXM>Q#b^ix, O)Zbn)q[y06$`e3?C)`CwR9y5riE=fv^X@x$y?D:XO6L&x4f-}}I4=VRNwiA^t1-ZrVK^07.Pi/57c_du'& X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:170217:rgm@gnu.org::mpDJo+X7WKMnGanw:0000001xLQ X-Hashcash: 1:20:170217:emacs-devel@gnu.org::U8pzRoNKxXoWSDP3:0000000000000000000000000000000000000000004QKJ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c0c::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212435 Archived-At: On Fri, Feb 17 2017, Glenn Morris wrote: > Hi - this fails to bootstrap from a truly clean tree (probably you need > to "make extraclean" in an existing tree to see it). > > Ref: http://hydra.nixos.org/build/48774928 > > Loading lisp/international/characters.el (source)... > Wrong type argument: char-table-p, nil The attached patch fixes this. Anyone know of any downside of this approach? If not, I=E2=80=99ll go ahead and push it. >From 9f9863e50298a3506165cc1f056ab3238f37cb9f Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Fri, 17 Feb 2017 16:36:44 +0100 Subject: [PATCH] =3D?UTF-8?q?Fix=3D20build=3D20failure=3D20caused=3D20by=3D= 20=3DE2=3D80=3D98?=3D =3D?UTF-8?q?Generate=3D20upcase=3D20and=3D20downcase=3D20tables=3D20from= =3D20Unicode?=3D =3D?UTF-8?q?=3DE2=3D80=3D99?=3D MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit The [5ec3a584: Generate upcase and downcase tables from Unicode data] commit broke bootstrap from a truly clean tree (e.g. a fresh clone or one created with =E2=80=98make extraclean=E2=80=99), see . The failure was caused by characters.el trying to read Unicode property tables which aren=E2=80=99t available so early in the build proces= s. Wrap the part that requires Unicode property tables in a condition checking if those are available. If they aren=E2=80=99t they case and synt= ax tables won=E2=80=99t be fully set but later on, the characters.el file will= be evaluated again and this time with Unicode properties available so final Emacs ends up with the exact same case and syntax tables. --- lisp/international/characters.el | 132 ++++++++++++++++++++---------------= ---- 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/lisp/international/characters.el b/lisp/international/characte= rs.el index 9e993e7060a..3eb287fd963 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -665,70 +665,74 @@ ?L ;; Combining marks (modify-category-entry '(#x20d0 . #x20ff) ?^) =20 - ;; Set all Letter, uppercase; Letter, lowercase and Letter, titlecase sy= ntax - ;; to word. - (let ((syn-tab (standard-syntax-table))) - (map-char-table - (lambda (ch cat) - (when (memq cat '(Lu Ll Lt)) - (modify-syntax-entry ch "w " syn-tab))) - (unicode-property-table-internal 'general-category)) - - ;; =E2=85=A0 through =E2=85=AB had word syntax in the past so set it h= ere as well. - ;; The general category of those characters is Number, Letter. - (modify-syntax-entry '(#x2160 . #x216b) "w " syn-tab) - - ;; =E2=93=90 through =E2=93=A9 are symbols, other according to Unicode= but Emacs set - ;; their syntax to word in the past so keep backwards compatibility. - (modify-syntax-entry '(#x24D0 . #x24E9) "w " syn-tab)) - - ;; Set downcase and upcase from Unicode properties - - ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I and - ;; U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so do U+0130 - ;; LATIN CAPITAL LETTER I WITH DOT ABOVE and U+0069 LATIN SMALL LETTER I. - - ;; We used to set up half of those correspondence unconditionally, but t= hat - ;; makes searches slow. So now we don't set up either half of these - ;; correspondences by default. - - ;; (set-downcase-syntax ?=C4=B0 ?i tbl) - ;; (set-upcase-syntax ?I ?=C4=B1 tbl) - - (let ((map-unicode-property - (lambda (property func) - (map-char-table - (lambda (ch cased) - ;; ASCII characters skipped due to reasons outlined above. = As of - ;; Unicode 9.0, this exception affects the following: - ;; lc(U+0130 =C4=B0) =3D i - ;; uc(U+0131 =C4=B1) =3D I - ;; uc(U+017F =C5=BF) =3D S - ;; uc(U+212A =E2=84=AA) =3D k - (when (> cased 127) - (let ((end (if (consp ch) (cdr ch) ch))) - (setq ch (max 128 (if (consp ch) (car ch) ch))) - (while (<=3D ch end) - (funcall func ch cased) - (setq ch (1+ ch)))))) - (unicode-property-table-internal property)))) - (down tbl) - (up (case-table-get-table tbl 'up))) - - ;; This works on an assumption that if toUpper(x) !=3D x then toLower(= x) =3D=3D - ;; x (and the opposite for toLower/toUpper). This doesn=E2=80=99t hol= d for title - ;; case characters but those incorrect mappings will be overwritten la= ter. - (funcall map-unicode-property 'uppercase - (lambda (lc uc) (aset down lc lc) (aset up uc uc))) - (funcall map-unicode-property 'lowercase - (lambda (uc lc) (aset down lc lc) (aset up uc uc))) - - ;; Now deal with the actual mapping. This will correctly assign casin= g for - ;; title-case characters. - (funcall map-unicode-property 'uppercase - (lambda (lc uc) (aset up lc uc) (aset up uc uc))) - (funcall map-unicode-property 'lowercase - (lambda (uc lc) (aset down uc lc) (aset down lc lc)))) + (let ((gc (unicode-property-table-internal 'general-category)) + (syn-table (standard-syntax-table))) + ;; In early bootstrapping Unicode tables are not available so we need = to + ;; skip this step in those cases. + (when gc + ;; Set all Letter, uppercase; Letter, lowercase and Letter, + ;; titlecase syntax to word. + (map-char-table + (lambda (ch cat) + (when (memq cat '(Lu Ll Lt)) + (modify-syntax-entry ch "w " syn-table))) + gc) + ;; =E2=85=A0 through =E2=85=AB had word syntax in the past so set it= here as well. + ;; The general category of those characters is Number, Letter. + (modify-syntax-entry '(#x2160 . #x216b) "w " syn-table) + + ;; =E2=93=90 through =E2=93=A9 are symbols, other according to Unico= de but Emacs set + ;; their syntax to word in the past so keep backwards compatibility. + (modify-syntax-entry '(#x24D0 . #x24E9) "w " syn-table) + + ;; Set downcase and upcase from Unicode properties + + ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I= and + ;; U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so do U= +0130 + ;; LATIN CAPITAL LETTER I WITH DOT ABOVE and U+0069 LATIN SMALL LETT= ER I. + + ;; We used to set up half of those correspondence unconditionally, b= ut + ;; that makes searches slow. So now we don't set up either half of = these + ;; correspondences by default. + + ;; (set-downcase-syntax ?=C4=B0 ?i tbl) + ;; (set-upcase-syntax ?I ?=C4=B1 tbl) + + (let ((map-unicode-property + (lambda (property func) + (map-char-table + (lambda (ch cased) + ;; ASCII characters skipped due to reasons outlined abov= e. As + ;; of Unicode 9.0, this exception affects the following: + ;; lc(U+0130 =C4=B0) =3D i + ;; uc(U+0131 =C4=B1) =3D I + ;; uc(U+017F =C5=BF) =3D S + ;; uc(U+212A =E2=84=AA) =3D k + (when (> cased 127) + (let ((end (if (consp ch) (cdr ch) ch))) + (setq ch (max 128 (if (consp ch) (car ch) ch))) + (while (<=3D ch end) + (funcall func ch cased) + (setq ch (1+ ch)))))) + (unicode-property-table-internal property)))) + (down tbl) + (up (case-table-get-table tbl 'up))) + + ;; This works on an assumption that if toUpper(x) !=3D x then toLo= wer(x) + ;; =3D=3D x (and the opposite for toLower/toUpper). This doesn=E2= =80=99t hold for + ;; title case characters but those incorrect mappings will be + ;; overwritten later. + (funcall map-unicode-property 'uppercase + (lambda (lc uc) (aset down lc lc) (aset up uc uc))) + (funcall map-unicode-property 'lowercase + (lambda (uc lc) (aset down lc lc) (aset up uc uc))) + + ;; Now deal with the actual mapping. This will correctly assign c= asing + ;; for title-case characters. + (funcall map-unicode-property 'uppercase + (lambda (lc uc) (aset up lc uc) (aset up uc uc))) + (funcall map-unicode-property 'lowercase + (lambda (uc lc) (aset down uc lc) (aset down lc lc)))))) =20 ;; Clear out the extra slots so that they will be recomputed from the ma= in ;; (downcase) table and upcase table. Since we=E2=80=99re side-stepping= the usual --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB