From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#41438: [PATCH] Allow windmove keys to be bound without prefix or modifiers Date: Sun, 28 Jun 2020 02:53:54 +0300 Message-ID: <87o8p4avy5.fsf@mail.linkov.net> References: <87imgpw7k3.fsf@warpmail.net> <87k0zttxti.fsf@warpmail.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78083"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 41438@debbugs.gnu.org, 41438@bugs.debian.org To: "Philip K." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 28 02:19:11 2020 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 1jpL2M-000KDu-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jun 2020 02:19:10 +0200 Original-Received: from localhost ([::1]:33428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpL2L-0001fg-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jun 2020 20:19:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpL2E-0001fN-15 for bug-gnu-emacs@gnu.org; Sat, 27 Jun 2020 20:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpL2D-0007v5-Nc for bug-gnu-emacs@gnu.org; Sat, 27 Jun 2020 20:19:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jpL2D-0004CQ-Iq for bug-gnu-emacs@gnu.org; Sat, 27 Jun 2020 20:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jun 2020 00:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41438 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41438-submit@debbugs.gnu.org id=B41438.159330352916121 (code B ref 41438); Sun, 28 Jun 2020 00:19:01 +0000 Original-Received: (at 41438) by debbugs.gnu.org; 28 Jun 2020 00:18:49 +0000 Original-Received: from localhost ([127.0.0.1]:44796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL21-0004Bx-8Z for submit@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:49 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:52979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1v-0004BH-8Z for 41438@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:43 -0400 Original-Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id BBB49200003; Sun, 28 Jun 2020 00:18:35 +0000 (UTC) In-Reply-To: <87k0zttxti.fsf@warpmail.net> (Philip K.'s message of "Fri, 26 Jun 2020 21:46:17 +0200") 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:182444 Archived-At: >> Recently we had a similar problem in char-fold.el that was solved >> using defconst for the default value and a :set function, this might >> help here. > > I've been trying to understand what was changed there (I presume you're > referring to 376f5df), but I don't think I can quite follow. What > difference does adding the defconst forms to the eval-and-compile block > do? Actually, I meant not so much the defconst form (that is an unimportant detail), but more the :set function, and also I forgot to mention :initialize. Their combination in char-fold.el looks like: :initialize #'custom-initialize-default :set (lambda (sym val) (custom-set-default sym val) (char-fold-update-table)) Then after loading char-fold.el, this function is executed at the top level: (char-fold-update-table) Maybe something like this could help to initialize default keybindings after loading windmove.el.