help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: info info; man info (documentation about info)


From: Arsen Arsenović
Subject: Re: info info; man info (documentation about info)
Date: Thu, 12 Jan 2023 00:55:50 +0100

Gavin Smith <gavinsmith0123@gmail.com> writes:

> I'm tempted to suggest emphasizing the message with the use of colour.
> A patch is at the end of this mail.
>
> This would be distracting for users who already know how to use Info,
> of course.
>
> You can also make the message blink by adding | BLINK_MASK after BOLD_MASK.
>
> diff --git a/info/display.c b/info/display.c
> index 5a30ca4747..b8e34e889c 100644
> --- a/info/display.c
> +++ b/info/display.c
> @@ -697,10 +697,17 @@ display_update_one_window (WINDOW *win)
>  
>    if (win->node)
>      {
> +      if (win->flags & W_Emphasize)
> +        {
> +          terminal_switch_rendition (COLOUR_YELLOW | BOLD_MASK);
> +        }
> +
>        if (!win->line_starts)
>          calculate_line_starts (win);
>        line_index = display_update_node_text (win);
>  
> +      terminal_switch_rendition (0);
> +
>        if (display_was_interrupted_p)
>         goto funexit;
>      }
> diff --git a/info/window.c b/info/window.c
> index bef2a3bcde..f6e3806d6b 100644
> --- a/info/window.c
> +++ b/info/window.c
> @@ -1009,10 +1009,12 @@ void
>  window_message_in_echo_area (const char *format, ...)
>  {
>    va_list ap;
> -  
> +
> +  the_echo_area->flags |= W_Emphasize;
>    va_start (ap, format);
>    vwindow_message_in_echo_area (format, ap);
>    va_end (ap);
> +  the_echo_area->flags &= ~W_Emphasize;
>  }
>  
>  /* Place a temporary message in the echo area built from FORMAT, ARG1
> diff --git a/info/window.h b/info/window.h
> index 1f38ca84a0..11467a37f6 100644
> --- a/info/window.h
> +++ b/info/window.h
> @@ -109,6 +109,7 @@ typedef struct window_struct
>  #define W_NoWrap        0x10    /* Lines do not wrap in this window. */
>  #define W_InputWindow   0x20    /* Window accepts input. */
>  #define W_TempWindow    0x40    /* Window is less important. */
> +#define W_Emphasize     0x80    /* Bright colours in window. */
>  
>  extern WINDOW *windows;         /* List of visible Info windows. */
>  extern WINDOW *active_window;   /* The currently active window. */

This looks nice, I think.  If there's no downside, that's a +1 from me.

Thanks, have a great night.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]