unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60161: [PATCH] Allow customising windmove user options with an empty prefix
@ 2022-12-17 15:04 Philip Kaludercic
  2022-12-18 11:23 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2022-12-17 15:04 UTC (permalink / raw)
  To: 60161

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Allow-customising-windmove-user-options-with-an-empt.patch --]
[-- Type: text/patch, Size: 1013 bytes --]

From feca8985392c227ee7caaaa69ac8bdc990a0256b Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#60161: [PATCH] Allow customising windmove user options with an empty prefix
  2022-12-17 15:04 bug#60161: [PATCH] Allow customising windmove user options with an empty prefix Philip Kaludercic
@ 2022-12-18 11:23 ` Eli Zaretskii
  2022-12-18 11:46   ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2022-12-18 11:23 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 60161

> From: Philip Kaludercic <philipk@posteo.net>
> Date: Sat, 17 Dec 2022 15:04:41 +0000
> 
> 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.

Thanks, please install on the release branch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#60161: [PATCH] Allow customising windmove user options with an empty prefix
  2022-12-18 11:23 ` Eli Zaretskii
@ 2022-12-18 11:46   ` Philip Kaludercic
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Kaludercic @ 2022-12-18 11:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 60161-done

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Sat, 17 Dec 2022 15:04:41 +0000
>> 
>> 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.
>
> Thanks, please install on the release branch.

Pushed





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-18 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-17 15:04 bug#60161: [PATCH] Allow customising windmove user options with an empty prefix Philip Kaludercic
2022-12-18 11:23 ` Eli Zaretskii
2022-12-18 11:46   ` Philip Kaludercic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).