From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: carlmarcos--- via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: show-paren-when-point-inside-paren Date: Mon, 20 Jun 2022 16:20:28 +0200 (CEST) Message-ID: References: <83ilovmwj1.fsf@gnu.org> <83zgi7lanh.fsf@gnu.org> Reply-To: carlmarcos@tutanota.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36789"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 20 16:22:37 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3IIX-0009PY-B3 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 20 Jun 2022 16:22:37 +0200 Original-Received: from localhost ([::1]:55324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3IIW-0007D2-Cu for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 20 Jun 2022 10:22:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3IGa-0007B6-Tt for help-gnu-emacs@gnu.org; Mon, 20 Jun 2022 10:20:37 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:45888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3IGV-0000cp-L2; Mon, 20 Jun 2022 10:20:33 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id BC1E1FA0D48; Mon, 20 Jun 2022 14:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1655734828; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=j/jpZLOEr228qCf43hhft6dSStakQISPqPesoNz6zlI=; b=M3U2f17iWLjQlplgOSCpf0V5EbLALSXA66NwcFXi2+OlMif5VQsj+R1HUVaIz7xK UDuV88Fe1G5k4adwp4fr7dB+h3RnQ/RCRU4RWhzPuC57ko060RG8IHJuiJxmV9X0Y1e xnMITbaTVXxA5fUjLeHyjIfetUg2Km8FlLMq38w4Vmw0O5u1egSywA7PdyTGdzCmQOa VIal7i1lnFFQ831vFdbWmV97WfzjEmGEhfA3QB4EB/dX3FB5oKtnsq0BsZVMyMJDEAo Q20x2tokUi+gohi83tI3ZeF+GGcsC+y65V/bM8og3/TGDU6GjjLEXxUP8UHnon/L263 cvZQfWCuIA== In-Reply-To: <83zgi7lanh.fsf@gnu.org> Received-SPF: pass client-ip=81.3.6.162; envelope-from=carlmarcos@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137943 Archived-At: Jun 20, 2022, 13:36 by eliz@gnu.org: >> Date: Mon, 20 Jun 2022 15:10:36 +0200 (CEST) >> From: carlmarcos@tutanota.com >> Cc: help-gnu-emacs@gnu.org >> >> Could this simply be included as a style for `show-paren-style`? Showin= g the parens >> wherever point you are in paren would also be useful. >> > > No, because this isn't a style, it's orthogonal to the style. > > Style says _how_ to highlight, whereas this variable says _when_ to > highlight. > Which means that one can have=C2=A0 `(setq 'show-paren-style 'parenthesis)`= and=20 `(setq 'show-paren-when-point-inside-paren t)` working concurrently. The following are just some thoughts. Emacs can do without variable `show-paren-when-point-inside-paren`.=C2=A0 B= ecause `(setq 'show-paren-style 'parenthesis)` highlights parentheses depen= ding on the position of point.=C2=A0 This holds also for=20 `(setq 'show-paren-style 'expression)` and `(setq 'show-paren-style 'mixed)= ` (the latter requiring matching parenthesis to be outside the window pane)= . Have also noticed that with `(setq 'show-paren-style 'parenthesis)` and `(s= etq 'show-paren-style 'mixed)`, the style overrides the `show-paren-when-po= int-inside-paren` setting.=C2=A0=20 An enhancement to =C2=A0 `(setq 'show-paren-style 'expression)` can also be= made such that the sexp at the current point can be highlighted.=C2=A0 Thu= s, if cursor is between two sexp's inside a structure (e.g. an `if` conditi= on) the entire structure can be highlighted.