]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/keyboard.c (read_key_sequence): Remove MSVC compatibility hack
authorTim Ruffing <crypto@timruffing.de>
Sat, 9 Mar 2024 11:15:22 +0000 (12:15 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Mar 2024 09:27:06 +0000 (10:27 +0100)
(cherry picked from commit 2fdb281a276af57c104008d68ae95c7f4b1c3da8)

src/keyboard.c

index cadb376430e234bede17e6e22d24b9530f5c628a..1ba74a59537bde965e7d4b7a80f28fc5e9f93cf8 100644 (file)
@@ -10442,9 +10442,6 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
   Lisp_Object original_uppercase UNINIT;
   int original_uppercase_position = -1;
 
-  /* Gets around Microsoft compiler limitations.  */
-  bool dummyflag = false;
-
 #ifdef HAVE_TEXT_CONVERSION
   bool disabled_conversion;
 
@@ -10693,10 +10690,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
          && !requeued_events_pending_p ())
        {
          t = 0;
-         /* The Microsoft C compiler can't handle the goto that
-            would go here.  */
-         dummyflag = true;
-         break;
+         goto done;
        }
       /* Otherwise, we should actually read a character.  */
       else
@@ -11291,10 +11285,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
          && help_char_p (EVENT_HEAD (key)) && t > 1)
            {
              read_key_sequence_cmd = Vprefix_help_command;
-             /* The Microsoft C compiler can't handle the goto that
-                would go here.  */
-             dummyflag = true;
-             break;
+             goto done;
            }
 
       /* If KEY is not defined in any of the keymaps,
@@ -11343,8 +11334,9 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
            }
        }
     }
-  if (!dummyflag)
-    read_key_sequence_cmd = current_binding;
+  read_key_sequence_cmd = current_binding;
+
+  done:
   read_key_sequence_remapped
     /* Remap command through active keymaps.
        Do the remapping here, before the unbind_to so it uses the keymaps