Skip to content

Commit 72215eb

Browse files
committed
Customizable option to allow to quit on unregistered key
Update: - readme.md
1 parent 04d0b7d commit 72215eb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ There are a few things that you can do. There are customizable variables:
6161
- resize-window-coarse-argument (default: 5)
6262
- resize-window-fine-argument (default: 1)
6363
- resize-window-allow-backgrounds (default: t)
64+
- resize-window-unregistered-key-quit (default: nil)
6465
- resize-window-swap-capital-and-lowercase-behavior (default: nil)
6566
- resize-window-notify-with-messages (default: t)
6667

resize-window.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ This is also valuable to see that you are in resize mode."
8282
:type 'boolean
8383
:group 'resize-window)
8484

85+
(defcustom resize-window-unregistered-key-quit nil
86+
"Quit when an unregistered key is pressed.
87+
If nil do not quit and notify the unregistered key pressed."
88+
:type 'boolean
89+
:group 'resize-window)
90+
8591
(defcustom resize-window-swap-capital-and-lowercase-behavior nil
8692
"Reverse default behavior of lower case and uppercase arguments."
8793
:type 'boolean
@@ -261,7 +267,8 @@ to resize right."
261267
(resize-window--execute-action capital t))
262268
(;; NOTE: Don't use `=', if `char' is a symbol like
263269
;; 'insertchar it will fail. Use `equal' instead.
264-
(or (equal char ?q)
270+
(or resize-window-unregistered-key-quit
271+
(equal char ?q)
265272
(equal char ?Q)
266273
(equal char (string-to-char " ")))
267274
(setq reading-characters nil)

0 commit comments

Comments
 (0)