emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug?


From: Shynur Xie
Subject: Re: Bug?
Date: Thu, 4 May 2023 20:57:36 +0000

>    From: Eli Zaretskii
> Subject: Re: Bug?
>    Date: Wed, 03 May 2023 14:24:49 +0300
>
>> I also noticed that when the closing bracket is comprised of
>> multiple characters, only the first character is high-lit using
>> that face. For example, in shell-script-mode, when `esac` matches
>> `case`, only the `c` in `case` is high-lit. Perhaps this new
>> feature isn't quite finished yet.
>
> Shynur, could you please fix this deficiency?

Patch is attached.  To highlight the entire matched opening delimiter:
    (show-paren-mode)
    (setq blink-matching-paren-offscreen t
          show-paren-context-when-offscreen t)

I also changed the function `blink-paren-open-paren-line-string':
Originally, say here's a shell script
    case case
         ... <- many lines
         esac* <- cursor here
both `blink-matching-open' and `show-paren-mode' emitted "case c";
Now `show-paren-mode' instead emits "case case" if
`show-paren-context-when-offscreen' is t.

>    From: Mattias Engdegård
> Subject: Re: Bug?
>    Date: Wed, 3 May 2023 14:27:37 +0200
>
>>> Don't we have an existing suitable face to inherit from?
>>
>> Do you mean to inherit from those faces that set colors separately
>> for light and dark backgrounds?
>
> Yes, and it's much easier for the user to customise a single
> "highlight" face than dozens of them. There is a face literally
> named "highlight"; would that do? If so, maybe we don't even need a
> new face at all.
>
> If you really want a new face that uses green text by default,
> something like
>
>  (defface blink-matching-paren-offscreen

Thanks.  I finally chose the new face that you defined, because
"highlight" is difficult to distinguish against my dark background.

--
shynur

Attachment: 0001-Show-paren-mode-highlights-entire-delimiter-in-the-e.patch
Description: 0001-Show-paren-mode-highlights-entire-delimiter-in-the-e.patch


reply via email to

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