-#define RL_STATE_INITIALIZING 0x000001 /* initializing */
-#define RL_STATE_INITIALIZED 0x000002 /* initialization done */
-#define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */
-#define RL_STATE_READCMD 0x000008 /* reading a command key */
-#define RL_STATE_METANEXT 0x000010 /* reading input after ESC */
-#define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command */
-#define RL_STATE_MOREINPUT 0x000040 /* reading more input in a command function */
-#define RL_STATE_ISEARCH 0x000080 /* doing incremental search */
-#define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */
-#define RL_STATE_SEARCH 0x000200 /* doing a history search */
-#define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument */
-#define RL_STATE_MACROINPUT 0x000800 /* getting input from a macro */
-#define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro */
-#define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */
-#define RL_STATE_COMPLETING 0x004000 /* doing completion */
-#define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */
-#define RL_STATE_UNDOING 0x010000 /* doing an undo */
-#define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */
-#define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved */
-#define RL_STATE_CALLBACK 0x080000 /* using the callback interface */
-#define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */
-#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
-#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
-
-#define RL_STATE_DONE 0x800000 /* done; accepted line */
+#define RL_STATE_INITIALIZING 0x0000001 /* initializing */
+#define RL_STATE_INITIALIZED 0x0000002 /* initialization done */
+#define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */
+#define RL_STATE_READCMD 0x0000008 /* reading a command key */
+#define RL_STATE_METANEXT 0x0000010 /* reading input after ESC */
+#define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command */
+#define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a command function */
+#define RL_STATE_ISEARCH 0x0000080 /* doing incremental search */
+#define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */
+#define RL_STATE_SEARCH 0x0000200 /* doing a history search */
+#define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument */
+#define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macro */
+#define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro */
+#define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */
+#define RL_STATE_COMPLETING 0x0004000 /* doing completion */
+#define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */
+#define RL_STATE_UNDOING 0x0010000 /* doing an undo */
+#define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */
+#define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved */
+#define RL_STATE_CALLBACK 0x0080000 /* using the callback interface */
+#define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */
+#define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key command */
+#define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode at least once */
+#define RL_STATE_REDISPLAYING 0x0800000 /* updating terminal display */
+
+#define RL_STATE_DONE 0x1000000 /* done; accepted line */