From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35480: insert-wide-parentheses Date: Mon, 06 May 2019 05:35:12 +0300 Message-ID: <83tve8jonz.fsf@gnu.org> References: <87pnp5euh9.8.fsf@jidanni.org> <87lfzswpi1.fsf@mail.linkov.net> <87muk8b6ci.8.fsf@jidanni.org> <87y33rw9n4.fsf@mail.linkov.net> <87ftpsbkqf.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259572"; mail-complaints-to="usenet@blaine.gmane.org" Cc: juri@linkov.net, 35480@debbugs.gnu.org, jidanni@jidanni.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 06 04:36:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNTUA-0015Pw-R5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 May 2019 04:36:10 +0200 Original-Received: from localhost ([127.0.0.1]:49129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNTU9-0005GN-Qi for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 May 2019 22:36:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNTU3-0005GE-Fb for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 22:36:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNTU2-0000Z4-Ff for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 22:36:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNTU2-0000Yu-CN for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 22:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNTU2-0004Eq-5N for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 22:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2019 02:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35480 X-GNU-PR-Package: emacs Original-Received: via spool by 35480-submit@debbugs.gnu.org id=B35480.155711013916261 (code B ref 35480); Mon, 06 May 2019 02:36:02 +0000 Original-Received: (at 35480) by debbugs.gnu.org; 6 May 2019 02:35:39 +0000 Original-Received: from localhost ([127.0.0.1]:55374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNTTe-0004ED-NX for submit@debbugs.gnu.org; Sun, 05 May 2019 22:35:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNTTc-0004E0-MR for 35480@debbugs.gnu.org; Sun, 05 May 2019 22:35:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNTTW-0000LG-1P; Sun, 05 May 2019 22:35:30 -0400 Original-Received: from [176.228.60.248] (port=2855 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNTTV-0000DD-Dz; Sun, 05 May 2019 22:35:29 -0400 In-reply-to: <87ftpsbkqf.fsf@igel.home> (message from Andreas Schwab on Mon, 06 May 2019 00:27:20 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158822 Archived-At: > From: Andreas Schwab > Date: Mon, 06 May 2019 00:27:20 +0200 > Cc: 積丹尼 Dan Jacobson , > 35480@debbugs.gnu.org > > > OK, this adds all Unicode pairs to the default: > > > > diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el > > index d10d5f0d10..f73dbb269d 100644 > > --- a/lisp/emacs-lisp/lisp.el > > +++ b/lisp/emacs-lisp/lisp.el > > @@ -646,7 +646,13 @@ narrow-to-defun > > (narrow-to-region beg end)))) > > > > (defvar insert-pair-alist > > - '((?\( ?\)) (?\[ ?\]) (?\{ ?\}) (?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\')) > > + (append '((?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\')) > > + (let (alist) > > + (map-char-table > > + (lambda (open close) > > + (when (< open close) (push (list open close) alist))) > > + (unicode-property-table-internal 'paired-bracket)) > > + (nreverse alist))) > > Loading /home/abuild/rpmbuild/BUILD/emacs-27.0.50/lisp/emacs-lisp/lisp.el (source)... > Wrong type argument: char-table-p, nil > make[2]: *** [Makefile:808: bootstrap-emacs.pdmp] Error 255 This change has another, IMO more serious, problem: it uses the bidi-bracket property of characters entirely out of its intended domain. The _only_ valid usage of that property is in the context of the UBA, the Unicode Bidirectional Algorithm, used for reordering bidirectional text for display. Pairing syntactical units in program text is something entirely different.