]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tty underline capability check (bug#75024)
authorGerd Möllmann <gerd.moellmann@gmail.com>
Fri, 7 Mar 2025 08:35:20 +0000 (09:35 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Mar 2025 10:24:41 +0000 (11:24 +0100)
* src/dispextern.h (TTY_CAP_UNDERLINE_STYLED): Fix. Also make this an
enum.

(cherry picked from commit 9277b037938b79e13a26c30ec0d2be30cfafd32b)

src/dispextern.h

index 1b3831647521919ef58ebfaa3d47b113f24b6238..bd48005b83f8026c138b750975e24da05aa5f492 100644 (file)
@@ -3482,13 +3482,16 @@ enum tool_bar_item_image
    capabilities being queried for when calling `tty_capable_p' (which
    returns true if the terminal supports all of them).  */
 
-#define TTY_CAP_INVERSE                0x01
-#define TTY_CAP_UNDERLINE      0x02
-#define TTY_CAP_BOLD           0x04
-#define TTY_CAP_DIM            0x08
-#define TTY_CAP_ITALIC         0x10
-#define TTY_CAP_STRIKE_THROUGH 0x20
-#define TTY_CAP_UNDERLINE_STYLED       (0x32 & TTY_CAP_UNDERLINE)
+enum
+{
+  TTY_CAP_INVERSE = 1 << 1,
+  TTY_CAP_UNDERLINE = 1 << 2,
+  TTY_CAP_BOLD = 1 << 3,
+  TTY_CAP_DIM = 1 << 4,
+  TTY_CAP_ITALIC = 1 << 5,
+  TTY_CAP_STRIKE_THROUGH = 1 << 6,
+  TTY_CAP_UNDERLINE_STYLED = 1 << 7
+};
 
 \f
 /***********************************************************************