help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Matching Parentheses


From: Christopher Dimech
Subject: Re: Matching Parentheses
Date: Sat, 3 Oct 2020 15:11:33 +0200

I have done it as follows. Is it good to first call
(require 'paren). I want to either highlight either
the parentheses only or the entire expression using
a keybinding, but unsure how to go about using setq.

For normal keybindings I use
(global-set-key (kbd "<f1> s") 'shell)


Here is thi code for highlighting parentheses


(require 'paren)

(show-paren-mode 1)
(setq show-paren-delay 0)
(set-face-background 'show-paren-match "#76e8f2")
(set-face-foreground 'show-paren-match "#3c0069")

; Highlight the Entire Expression
(setq show-paren-style 'parenthesis)
;(setq show-paren-style 'expression)




> Sent: Saturday, October 03, 2020 at 12:29 PM
> From: "Eli Zaretskii" <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Matching Parentheses
>
> > From: Christopher Dimech <dimech@gmx.com>
> > Date: Sat, 3 Oct 2020 12:39:33 +0200
> >
> > (set-face-background 'show-paren-match (face-background 'default))
> > (set-face-foreground 'show-paren-match "#def")
> > (set-face-attribute 'show-paren-match nil :weight 'extra-bold)
>
> This is wrong: show-paren-mode shows the parentheses with a different
> background color, and you here set the background to the default one,
> thus effectively disabling the feature.
>
> Find a background color that makes the parentheses look prominently,
> and change only the background of the show-paren-match face.  Leave
> all the other attributes of the show-paren-match face unspecified.
>
>



reply via email to

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