From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#60161: [PATCH] Allow customising windmove user options with an empty prefix Date: Sat, 17 Dec 2022 15:04:41 +0000 Message-ID: <87tu1ugjg6.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38843"; mail-complaints-to="usenet@ciao.gmane.io" To: 60161@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 17 16:05:25 2022 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 1p6Ykf-0009vp-8n for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Dec 2022 16:05:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6YkJ-0000oI-OM; Sat, 17 Dec 2022 10:05:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6YkI-0000o9-PI for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 10:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6YkI-0001hq-Gt for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 10:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6YkH-0001tT-W0 for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 10:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 15:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60161 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16712894867267 (code B ref -1); Sat, 17 Dec 2022 15:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 15:04:46 +0000 Original-Received: from localhost ([127.0.0.1]:56354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Yk2-0001t9-CM for submit@debbugs.gnu.org; Sat, 17 Dec 2022 10:04:46 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:59400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Yk0-0001t3-PC for submit@debbugs.gnu.org; Sat, 17 Dec 2022 10:04:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Yk0-0000Tn-Dj for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 10:04:44 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Yjy-0001d3-DC for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 10:04:44 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4FB78240026 for ; Sat, 17 Dec 2022 16:04:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671289479; bh=iiOoOBnd2aKyK8AVtGoKr7HDYNQs2QgVWTi+ud7d0gU=; h=From:To:Subject:Date:From; b=XDKEQjso/aZEPTz3NaXut+wgAdKbwAEthYOuKIDrNnWwKgvHihBM0/8OwKYIZe6G0 503goWzOSaSFmGdzc8l9cRA27jvOr4EkHoWNlFRZf60AX0CXdXknoIiqwRGHW292DY iXHEUluoc2bBPM25qZh48d6HBA+t+Kv22ekj8rwhIEMCZLdf22MGw7+sPxzszL+m2x QXPn6O6IywNfLl58997pg10+oe3uGoa7aSpSi6F1HQF8Ad0wkmtJwn07v1fXmwHBJJ C5tomd3LUkOoFfa2p7hTrKml0QR192LtXjSJ7q8hRv0zx8SmJgoMebtvUXTsMkvnHo 1J+i0EoZC4/qA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZ8QF6gyXz6tm9 for ; Sat, 17 Dec 2022 16:04:37 +0100 (CET) Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251283 Archived-At: --=-=-= Content-Type: text/plain Tags: patch I just switched to setopt, and noticed a few errors. Among these was `windmove-default-keybindings', which didn't want to set (setopt windmove-default-keybindings '(nil . nil)) while (setopt windmove-default-keybindings '("C-c" . nil)) is allowed. The mistake appears to be that the option type is misconfigured, and believes the car must be a keybinding, which hasn't been the case since Emacs 28. The patch below updates the type, resolving this issue. In GNU Emacs 29.0.60 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.16.0) of 2022-12-14 built on quetzal Repository revision: 622838b957e240d700585050e9ddbd036e690513 Repository branch: emacs-29 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --with-pgtk --with-imagemagick' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Allow-customising-windmove-user-options-with-an-empt.patch >From feca8985392c227ee7caaaa69ac8bdc990a0256b Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Dec 2022 15:54:40 +0100 Subject: [PATCH] Allow customising windmove user options with an empty prefix * lisp/windmove.el (windmove--default-keybindings-type): Handle nil as a prefix value. --- lisp/windmove.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/windmove.el b/lisp/windmove.el index 00e76df0a0..4311f082de 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -776,7 +776,8 @@ windmove-swap-states-default-keybindings (defconst windmove--default-keybindings-type `(choice (const :tag "Don't bind" nil) (cons :tag "Bind using" - (key-sequence :tag "Prefix") + (choice (key-sequence :tag "Prefix") + (const :tag "No Prefix" nil)) (set :tag "Modifier" :greedy t ;; See `(elisp) Keyboard Events' -- 2.35.1 --=-=-=--