unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Matching Parentheses
Date: Sat, 3 Oct 2020 15:11:33 +0200	[thread overview]
Message-ID: <trinity-9e72c431-3b51-418b-86e8-78a87b227dbd-1601730693734@3c-app-mailcom-bs06> (raw)
In-Reply-To: <83r1qffsy4.fsf@gnu.org>

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	other threads:[~2020-10-03 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03 10:39 Matching Parentheses Christopher Dimech
2020-10-03 10:53 ` Christopher Dimech
2020-10-03 11:25   ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-10-03 11:29 ` Eli Zaretskii
2020-10-03 13:11   ` Christopher Dimech [this message]
2020-10-03 18:39 ` Drew Adams
     [not found] <mailman.4991.1187599974.32220.help-gnu-emacs@gnu.org>
2007-08-20 14:01 ` matching parentheses Maarten Bergvelt
2007-08-20 16:50 ` Ralf Angeli
2007-08-20 16:56   ` Joel J. Adamson
2007-08-20 18:04     ` Maarten Bergvelt
2007-08-21  8:15       ` Tim X
  -- strict thread matches above, loose matches on Subject: below --
2007-08-20  7:46 Alain Muls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-9e72c431-3b51-418b-86e8-78a87b227dbd-1601730693734@3c-app-mailcom-bs06 \
    --to=dimech@gmx.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).