From: Pasi Kallinen Date: Fri, 4 Jun 2021 06:13:27 +0000 (+0300) Subject: Don't bind quit to any key by default X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8849f66dae6de2d234780ca597755588f314824c;p=nethack Don't bind quit to any key by default Quit is not a commmand you usually need very often, and generally don't want to use by accident. Apparently, on Spanish keyboard layout, n-with-tilde is interpreted by the Windows NetHack as M-q, and the key is next to l. Loot also asks for confirmation, just like quit. Prevent stuff like this by not binding the quit command to any key. --- diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index bdf881f6c..83ecc57c8 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -870,9 +870,6 @@ Quaff (drink) something (potion, water, etc). Select an object for your quiver, quiver sack, or just generally at the ready (only one of these is available at a time). You can then throw this (or one of these) using the \(oqf\(cq command. -.lp "" -(In versions prior to 3.3 this was the command to quit -the game, which has been moved to \(lq#quit\(rq.) .lp r Read a scroll or spellbook. .lp R @@ -1407,7 +1404,6 @@ Default key is \(oqq\(cq. .lp "#quit " Quit the program without saving your game. Autocompletes. -Default key is \(oqM-q\(cq. .lp "" Since using this command by accident would throw away the current game, you are asked to confirm your intent before quitting. @@ -1759,8 +1755,6 @@ option is enabled) #overview .lp M-p #pray -.lp M-q -#quit .lp M-r #rub .lp M-R diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 2a4ee2cce..ed0e0329b 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -953,11 +953,7 @@ Quaff (drink) something (potion, water, etc). \item[\tb{Q}] Select an object for your quiver, quiver sack, or just generally at the ready (only one of these is available at a time). You can then throw -this (or one of these) using -the `f' command.\\ -%.lp "" -(In versions prior to 3.3 this was the command to quit -the game, which has been moved to ``{\tt \#quit}''.) +this (or one of these) using the `f' command. %.lp \item[\tb{r}] Read a scroll or spellbook. @@ -1500,8 +1496,7 @@ Put on an accessory (ring, amulet, etc). Default key is `{\tt P}'. Quaff (drink) something. Default key is `{\tt q}'. %.lp \item[\tb{\#quit}] -Quit the program without saving your game. Autocompletes. -Default key is `{\tt M-q}'.\\ +Quit the program without saving your game. Autocompletes.\\ %.lp "" Since using this command by accident would throw away the current game, you are asked to confirm your intent before quitting. @@ -1893,9 +1888,6 @@ another command, so the three key combination meta+shift+letter is needed. \item[\tb{M-p}] {\tt\#pray} %.Ip -\item[\tb{M-q}] -{\tt\#quit} -%.lp \item[\tb{M-r}] {\tt\#rub} %.lp diff --git a/doc/fixes37.0 b/doc/fixes37.0 index eb60b59df..11fc1d29b 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -539,6 +539,7 @@ when moving the cursor to examine the map, have '^' move to next trap even if that trap is displayed with some other symbol (web, vibrating square) change valkyrie and warrior (valk quest) monsters from chaotic to lawful change attendant (healer quest) monster from lawful to neutral +quit is not longer bound to M-q Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/cmd.c b/src/cmd.c index 35079f1a5..33ab42e1f 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1908,7 +1908,7 @@ struct ext_func_tab extcmdlist[] = { doputon, 0, NULL }, { 'q', "quaff", "quaff (drink) something", dodrink, 0, NULL }, - { M('q'), "quit", "exit without saving current game", + { '\0', "quit", "exit without saving current game", done2, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL }, { 'Q', "quiver", "select ammunition for quiver", dowieldquiver, 0, NULL },