From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35689: Customizable char-fold Date: Thu, 16 May 2019 23:13:17 +0300 Organization: LINKOV.NET Message-ID: <87zhnmgntu.fsf@mail.linkov.net> References: <87imug8z4i.fsf@mail.linkov.net> <8736lj3dgm.fsf@mail.linkov.net> <87mujrh0uv.fsf@gmail.com> <87o9466z1t.fsf@mail.linkov.net> <87d0kmgfrp.fsf@gmail.com> <406F1DF2-CB22-441F-B3E2-19770425322A@gnu.org> <87d0kkyesr.fsf@mail.linkov.net> <85v9ya1mng.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="21101"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 35689@debbugs.gnu.org To: npostavs@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 16 22:26:22 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 1hRMxJ-0005JT-2W for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 May 2019 22:26:21 +0200 Original-Received: from localhost ([127.0.0.1]:35656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRMxH-0007sJ-MW for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 May 2019 16:26:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRMx6-0007s3-2k for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 16:26:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRMx2-0005i4-9V for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 16:26:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRMx0-0005gb-IF for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 16:26:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hRMx0-000346-Dd for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 16:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2019 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35689 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35689-submit@debbugs.gnu.org id=B35689.155803834011740 (code B ref 35689); Thu, 16 May 2019 20:26:02 +0000 Original-Received: (at 35689) by debbugs.gnu.org; 16 May 2019 20:25:40 +0000 Original-Received: from localhost ([127.0.0.1]:56565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRMwd-00033I-Pt for submit@debbugs.gnu.org; Thu, 16 May 2019 16:25:40 -0400 Original-Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:3424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRMwR-000328-Hf for 35689@debbugs.gnu.org; Thu, 16 May 2019 16:25:38 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7E1631A3D79; Thu, 16 May 2019 20:17:35 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a63.g.dreamhost.com (100-96-14-60.trex.outbound.svc.cluster.local [100.96.14.60]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BABA61A3D74; Thu, 16 May 2019 20:17:34 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a63.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Thu, 16 May 2019 20:17:35 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Belong-Reaction: 76fd76f665ac8366_1558037855272_4168144332 X-MC-Loop-Signature: 1558037855272:1543746409 X-MC-Ingress-Time: 1558037855271 Original-Received: from pdx1-sub0-mail-a63.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a63.g.dreamhost.com (Postfix) with ESMTP id 1155C83569; Thu, 16 May 2019 13:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=NmSim9bCFdtAsnUN5gnnGbDUyiM=; b= J60cnqcnGX+CWDbj8wJhDoLjwU8FzJPTPJVtNsqDaFhb8p9lgnofoy8GCpDaLEdi TqI1A2cjutErmLntXgePhGE7TpC1QEgyKufNxoho4Oofh/u3Nxbn98UREvx9xvl1 wrDWWlX1npgsls9GnqpBaKRRSrlBNXZjgZeQXDj3ru8= Original-Received: from mail.jurta.org (m91-129-96-230.cust.tele2.ee [91.129.96.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a63.g.dreamhost.com (Postfix) with ESMTPSA id 3E7EA83564; Thu, 16 May 2019 13:17:29 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a63 In-Reply-To: <85v9ya1mng.fsf@gmail.com> (npostavs@gmail.com's message of "Thu, 16 May 2019 10:47:47 -0400") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddruddttddgudeghecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvfedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvfedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepnhhpohhsthgrvhhssehgmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgepvd 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:159412 Archived-At: >> I can't find a standard way of doing this. So instead of using eval-and-compile >> I'll try to recalculate the value explicitly when variables are customized: >> >> (when (or (get 'char-fold-include-base 'customized-value) >> (get 'char-fold-include-alist 'customized-value) >> (get 'char-fold-exclude-alist 'customized-value)) >> (setq char-fold-table (char-fold-make-table))) > > Instead of looking at symbol property values, which can make for a > confusing time when setting variables outside of customize, I think it > would be nicer to do something like this: > > (eval-and-compile (defconst char-fold--include-base-default ...)) > > (defcustom char-fold-include-base char-fold--include-base-default > :initialize #'custom-initialize-changed I tried different possible values of :initialize, but not custom-initialize-changed. I'll try this now. The problem I encountered with the previous solution it that calling `(setq char-fold-table (char-fold-make-table))' above while loading char-fold.el by autoload, garbled data returned from `(unicode-property-table-internal 'decomposition)', it just returned garbage, maybe due to a broken coding. I was busy debugging unidata-get-decomposition to understand where this data corruption occurs.