From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#50752: 28.0.50; easy-menu-define lowers the menu-bar key Date: Mon, 18 Oct 2021 20:22:18 -0700 Message-ID: References: <87bl4jvudm.fsf@gnus.org> <837dehp248.fsf@gnu.org> <87czo96shw.fsf@gnus.org> <87wnmh5bes.fsf@gnus.org> <87wnmh3p9k.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000042cf7405ceac2ba1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21293"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Shuguang Sun , 50752@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 19 05:23:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcfiY-0005LQ-QF for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Oct 2021 05:23:10 +0200 Original-Received: from localhost ([::1]:47204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcfiX-0003cn-JB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Oct 2021 23:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcfiQ-0003cf-Nd for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2021 23:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcfiQ-0000cC-Eg for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2021 23:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mcfiQ-0007Dg-63 for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2021 23:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Oct 2021 03:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50752 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50752-submit@debbugs.gnu.org id=B50752.163461374727699 (code B ref 50752); Tue, 19 Oct 2021 03:23:02 +0000 Original-Received: (at 50752) by debbugs.gnu.org; 19 Oct 2021 03:22:27 +0000 Original-Received: from localhost ([127.0.0.1]:49020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcfhq-0007Cg-Nf for submit@debbugs.gnu.org; Mon, 18 Oct 2021 23:22:27 -0400 Original-Received: from mail-ua1-f47.google.com ([209.85.222.47]:43839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcfho-0007CT-GU for 50752@debbugs.gnu.org; Mon, 18 Oct 2021 23:22:25 -0400 Original-Received: by mail-ua1-f47.google.com with SMTP id i22so1227818ual.10 for <50752@debbugs.gnu.org>; Mon, 18 Oct 2021 20:22:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=QcEiLrK+hhgzD8iWVyCnRR3eLi1LhQ7zJzPHTsBBLYE=; b=5FTGRWIBMinYywg6ijSdKWCDIJ2/dySOZuL0eCNGhWipg7wX0dS6WIFVOw2ptgSA4r oyHGfgsLal+RvFKEp2FZCWkuaUOK1qmWR7qGfYxibHsWQftk8uMNQ905KA084slASimg 4CI33/YijlexxxJQQMQCUiXMsirxkgQ7dunXp16NFDFCbRCxJsZ3NViS6P0tKVjXobUd e/oUnwrS9ZSOsvD7qSfMlBiludNgUgDFNRnIh5JMAxPVqwJOPEkR+7eKvl55VnCyp2At XU+TVzeBNgalaSbHNJIoN5er4RSDYQdLEf7loVuD4aSpi3IR75ginasyA3UophQRmTqQ xz/w== X-Gm-Message-State: AOAM533r6aeHax2QBFuCJHPilTiHZRiO/DHR63jWgQtMU1xMQ87/4uoP R5gfQcGyVGOsbuUfnXcIU+JzaLzuS1ddAOEXZ08= X-Google-Smtp-Source: ABdhPJxDed97PKtknrhG5HBUjBx1iZDkGEj0x+7EqkVmHNhqTbx7IsU/uFpjx+AR6MREiWYWaxL4G5s9XY+bfkmrzzE= X-Received: by 2002:ab0:7382:: with SMTP id l2mr30108411uap.107.1634613739027; Mon, 18 Oct 2021 20:22:19 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 18 Oct 2021 20:22:18 -0700 In-Reply-To: <87wnmh3p9k.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217537 Archived-At: --00000000000042cf7405ceac2ba1 Content-Type: text/plain; charset="UTF-8" Lars Ingebrigtsen writes: > Stefan Kangas writes: > >> Do we have an alternative to downcase, or should we just ensure that >> it uses a standard case-table? Could that lead to any other problems? > > But then non-ASCII characters wouldn't downcase correctly. :-) > > Since we're just trying to be backwards compatible, perhaps it would > make sense to try downcase twice -- once with the current case-table and > once with the standard one and see whether either matches? So I've tried this approach in the attached patch, but I couldn't get it to work. I'm probably doing something wrong, given that I've never so much as glanced at language environments and case tables before this. Eli Zaretskii writes: > We could use the equivalent of > > (get-char-code-property ?I 'lowercase) > > If the above returns nil, it means the lower-case variant is the > character itself. > > In C, this means to use uniprop_table, like bidi.c and casefiddle.c > do. This accesses the database generated from UnicodeData.txt. I didn't try this approach, mostly because it sounds more difficult to implement than what Lars said. I think? Wouldn't it amount to basically re-implementing Fdowncase? Sorry, I didn't look too closely at this. Perhaps this would be the better approach. If anyone has any preferences or further ideas here, that would be much appreciated, otherwise I'll keep investigating. The attached patch is what I have so far. It's obviously not yet finished, but all tests pass except for the one for "I->i" conversion in the Turkish language environment. --00000000000042cf7405ceac2ba1 Content-Type: text/x-diff; charset="utf-8"; name="0001-Be-more-allowing-when-looking-for-menu-bar-items.patch" Content-Disposition: attachment; filename="0001-Be-more-allowing-when-looking-for-menu-bar-items.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 1badc529665f641d_0.1 RnJvbSA3MDYwMTI4NjYzZWJiNzRjY2Y2NTliZDFlZTZkYzM4ZjdjNjZiYTllIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5AbWFyeGlzdC5zZT4KRGF0 ZTogV2VkLCAxMyBPY3QgMjAyMSAwMDowNDoyMyArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIEJlIG1v cmUgYWxsb3dpbmcgd2hlbiBsb29raW5nIGZvciBtZW51LWJhciBpdGVtcwoKKiBzcmMva2V5bWFw LmMgKGxvb2t1cF9rZXlfMSk6IEZhY3RvciBvdXQgZnVuY3Rpb24gZnJvbQpGbG9va3VwX2tleS4K KEZsb29rdXBfa2V5KTogQmUgY2FzZSBpbnNlbnNpdGl2ZSwgYW5kIHRyZWF0IHNwYWNlcyBhcy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ICBGc2V0X2Nhc2VfdGFibGUgKHRhYmxlc1tpXSk7CisKKwkgIC8qIEZp cnN0LCBsZXQncyB0cnkgY29udmVydGluZyBhbGwgc3ltYm9scyBsaWtlICJGb28tQmFyLUJheiIg dG8KKwkgICAgICJmb28tYmFyLWJheiIuICAqLworCSAgZm9yIChpbnQgaSA9IDA7IGkgPCBrZXlf bGVuOyBpKyspCisJICAgIHsKKwkgICAgICBMaXNwX09iamVjdCBsY19rZXkgPSBGZG93bmNhc2Ug KEZzeW1ib2xfbmFtZSAoQVJFRiAoa2V5LCBpKSkpOworCSAgICAgIEFTRVQgKG5ld19rZXksIGks IEZpbnRlcm4gKGxjX2tleSwgUW5pbCkpOworCSAgICB9CisJICBmb3VuZCA9IGxvb2t1cF9rZXlf MSAoa2V5bWFwLCBuZXdfa2V5LCBhY2NlcHRfZGVmYXVsdCk7CisKKwkgIGlmICghTklMUCAoZm91 bmQpICYmICFOVU1CRVJQIChmb3VuZCkpCisJICAgIGJyZWFrOworCisJICAvKiBJZiB3ZSBzdGls bCBkb24ndCBoYXZlIGEgbWF0Y2gsIGxldCdzIGNvbnZlcnQgYW55IHNwYWNlcyBpbgorCSAgICAg b3VyIGxvd2VyY2FzZWQgc3RyaW5nIGludG8gZGFzaGVzLCBlLmcuICJmb28gYmFyIGJheiIgdG8K KwkgICAgICJmb28tYmFyLWJheiIuICAqLworCSAgZm9yIChpbnQgaSA9IDA7IGkgPCBrZXlfbGVu OyBpKyspCisJICAgIHsKKwkgICAgICBMaXNwX09iamVjdCBsY19rZXkgPSBGc3ltYm9sX25hbWUg KEFSRUYgKG5ld19rZXksIGkpKTsKKworCSAgICAgIC8qIElmIHRoZXJlIGFyZSBubyBzcGFjZXMg aW4gdGhpcyBzeW1ib2wsIGp1c3Qgc2tpcCBpdC4gICovCisJICAgICAgaWYgKCFzdHJzdHIgKFNT REFUQSAobGNfa2V5KSwgIiAiKSkKKwkJY29udGludWU7CisKKwkgICAgICBVU0VfU0FGRV9BTExP Q0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