GNU logs - #79047, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 02:05:02 +0000
Resent-Message-ID: <handler.79047.B.17528906877723 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 79047 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17528906877723
          (code B ref -1); Sat, 19 Jul 2025 02:05:02 +0000
Received: (at submit) by debbugs.gnu.org; 19 Jul 2025 02:04:47 +0000
Received: from localhost ([127.0.0.1]:37572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ucwwR-00020U-DJ
	for submit <at> debbugs.gnu.org; Fri, 18 Jul 2025 22:04:47 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56262)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>)
 id 1ucwwO-0001yy-F5
 for submit <at> debbugs.gnu.org; Fri, 18 Jul 2025 22:04:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eg642616@HIDDEN>)
 id 1ucwvy-0000a9-Ff
 for bug-gnu-emacs@HIDDEN; Fri, 18 Jul 2025 22:04:19 -0400
Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <eg642616@HIDDEN>)
 id 1ucwvw-0000lJ-M6
 for bug-gnu-emacs@HIDDEN; Fri, 18 Jul 2025 22:04:17 -0400
Received: by mail-ot1-x342.google.com with SMTP id
 46e09a7af769-72c14138668so1090803a34.2
 for <bug-gnu-emacs@HIDDEN>; Fri, 18 Jul 2025 19:04:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1752890654; x=1753495454; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=PPU1rPbjDN2eV3vZJ49QzGliUzIAEVx6EY/YF9ijCps=;
 b=H2IzDYYyDjRj15W6blqlEcI3eF9LxlgXZYQFZt7FZ81Vtyqpb0GVgZYyoHjTSxQsxE
 8QhedHn1JPOgPbsBOS5z1+sz3c3hbZ0Msdso6Jci5ZCxBwDGHxuok1oqHS8VNTvIPlYl
 pi8R9yAoWW7S/9sbA8gsfV4aV/KXg/IpsVzI9ETSPqLggCBHb0WglTZBLnxcmL2iBRPC
 dHnDEFpydUcevSKOGWbPKrtcu9L0uQD6iJ2SQ1MGcpV3hI44ilCUSuyc9vgyjyO8m29i
 j9ZFPUEF+t6bbKjArFtTVePwdfcyZj8gcA2/pLwgvkFH2+Y5MUtR98yCbjqGogk7CaKV
 9PJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1752890654; x=1753495454;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=PPU1rPbjDN2eV3vZJ49QzGliUzIAEVx6EY/YF9ijCps=;
 b=MflUf3Sg3ePd2k98CYdm4G5Qo4SlSNnoLlOsyfKRFPqvOTeaG9DfhA8T/a53X3dTmg
 E6fXbtrYBVTtX6aLN1p9pIUnuy8FTslqIYREOyywE5fuB/Mkqv3wFDw3KiX4zhqxBDMA
 9qPOd3LaJGX/Ci96AFQqmkiuTZhx5UnpSbazCmUMup55dJbhPrn5URHJ1CV/JL7aMU4J
 6EGtQt/LNy4Za1pyOosQWbOcbU4wom1aQWKENEP4lhGrVGRVmnTWfQDt9vGwzstK0wu4
 RLz9bbcgA21JbH07oizzrZ1BHPdnOi6CEC4t0VfYz4dR8ID4EzCqp9a0J5C9Jo/IDluq
 8/xA==
X-Gm-Message-State: AOJu0YypgabW6KQO52q3UnyCEh1uwiD2cixoKoEpLDukBZHgsi1cwB3F
 5n/+ZWPN10uflNewJ5GByUJuizcBwfRC25u3qLDZU4627mTBfj3x1Fib11EZl3SK
X-Gm-Gg: ASbGncvv/p4bCtl8tflY4W2tNBz3s8LGm4+6s3oofQPoE0mxeWHjSTmpc72jDYBEsvJ
 4VlWhPErfXw/WFXyh84hWyHmdsvZp0eHkUWcGduOQpzmi0E6LmIAbP+UuXfZ/41R1sJgFBY6Rvq
 Zak48h6J/REvzGHFprF0LZeksRc1S/jSVHzet00P47+hhXHnIA7Z5IgFC+vopc9/Ocb1Gq0bLpJ
 QDt3gOk+rAEVyR+stZNvxiR/45q0N1NLvIz00IJ7/wKZ0NubPvtBFzWADb77Vl1kBubOg6uuJqk
 4JSYxSiCAubFZvnDTcwGZiowQw5PvV8I4aS/Ui+dNB9IeqOaMaSWhUMMT2usyl/+ZppNmijA9Cv
 8wXoZW1JhGgBI2iw=
X-Google-Smtp-Source: AGHT+IFVWUzbARSVSa/BXezPDOe2/eC5fdmRoiXIvF9yYb5mymY00eINPTMBq3jy4Y0xxetJFozVfw==
X-Received: by 2002:a05:6830:3483:b0:73e:655f:45de with SMTP id
 46e09a7af769-73e83359e0fmr4172445a34.5.1752890654396; 
 Fri, 18 Jul 2025 19:04:14 -0700 (PDT)
Received: from fedora ([189.215.162.117]) by smtp.gmail.com with ESMTPSA id
 46e09a7af769-73e83be07c4sm1089864a34.61.2025.07.18.19.04.13
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 18 Jul 2025 19:04:14 -0700 (PDT)
From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Date: Fri, 18 Jul 2025 20:04:12 -0600
Message-ID: <87ms91gcmb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::342;
 envelope-from=eg642616@HIDDEN; helo=mail-ot1-x342.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Since `electric-pair-mode` now supports multi-character pairs,
 it would be better if some major modes add some of these pairs. Before making
 the patch for this (and to avoid doing another regression like bug#77823),
 here is a list of the modes and their possible pairs: 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (eg642616[at]gmail.com)
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (eg642616[at]gmail.com)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

Since `electric-pair-mode` now supports multi-character pairs, it would
be better if some major modes add some of these pairs.

Before making the patch for this (and to avoid doing another regression
like bug#77823), here is a list of the modes and their possible pairs:

 - c-like modes
     "/*" "*/"
 - lua-ts-mode
     "--[" "--]"
 - texinfo-mode (idk which others one) (based in a Stefan Monnier idea)
     "``" "''"
 - lisp-mode (common-lisp-mode)
    "#|" "|#"

What do you think?

-- 
- E.G via GNU Emacs and Org.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Subject: bug#79047: Acknowledgement (Add some multi-character pairs to
 some major modes.)
Message-ID: <handler.79047.B.17528906877723.ack <at> debbugs.gnu.org>
References: <87ms91gcmb.fsf@HIDDEN>
X-Gnu-PR-Message: ack 79047
X-Gnu-PR-Package: emacs
Reply-To: 79047 <at> debbugs.gnu.org
Date: Sat, 19 Jul 2025 02:05:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 79047 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
79047: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79047
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 06:44:01 +0000
Resent-Message-ID: <handler.79047.B79047.175290739228998 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>, Alan Mackenzie <acm@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175290739228998
          (code B ref 79047); Sat, 19 Jul 2025 06:44:01 +0000
Received: (at 79047) by debbugs.gnu.org; 19 Jul 2025 06:43:12 +0000
Received: from localhost ([127.0.0.1]:38994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ud1Hr-0007Xc-GI
	for submit <at> debbugs.gnu.org; Sat, 19 Jul 2025 02:43:11 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45950)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ud1Hp-0007XG-JL
 for 79047 <at> debbugs.gnu.org; Sat, 19 Jul 2025 02:43:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ud1Hh-0003YH-AV; Sat, 19 Jul 2025 02:43:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=pbhE0IZ8rkoVC87aoUKGhRWx2FHSd+/aGt5a+hq+wz8=; b=MeMgQABtHKUMxH5qFNsf
 RJiR/pMztFOVy3/R7Smbp/aIsEJjjN3ub67QKPxrdrNPghl35hteTFBsWJ0fapkJ/1DRO0m85JTHa
 +WYf+jTs9gResjb/H54Fp+T/9penuOvFwmORNzbEpVzvcMCidxltt5opeLFS90JERh6H5Q2LbgRVb
 v35KUwYCg8OuZXTKnSCe/gUMnQ4MfmdlosTn0n8zhKtjMBlArqUMXm0covV32Grkk/P0LzjwIeUf7
 FhPzDgDaq9FsDXdCqwWOXueRjU5SJ8XVjlXGP1hosrN+HDAQt5BjS6tKW5zAok02D5C1hdzL+RaDd
 jaWG7FOOtq+2Cw==;
Date: Sat, 19 Jul 2025 09:42:52 +0300
Message-Id: <867c04fzpv.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87ms91gcmb.fsf@HIDDEN> (message from Elijah Gabe
 =?UTF-8?Q?P=C3=A9rez?= on Fri, 18 Jul 2025 20:04:12 -0600)
References: <87ms91gcmb.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Elijah Gabe Pérez <eg642616@HIDDEN>
> Date: Fri, 18 Jul 2025 20:04:12 -0600
> 
> Since `electric-pair-mode` now supports multi-character pairs, it would
> be better if some major modes add some of these pairs.
> 
> Before making the patch for this (and to avoid doing another regression
> like bug#77823), here is a list of the modes and their possible pairs:
> 
>  - c-like modes
>      "/*" "*/"
>  - lua-ts-mode
>      "--[" "--]"
>  - texinfo-mode (idk which others one) (based in a Stefan Monnier idea)
>      "``" "''"
>  - lisp-mode (common-lisp-mode)
>     "#|" "|#"
> 
> What do you think?

When discussing in a bug report issues related to some specific
packages, it is usually a good idea to CC the authors/developers of
those packages, because we cannot be sure they track the bug-gnu-emacs
list all the time.

I've now added people who I think are relevant to your proposal.

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 11:01:02 +0000
Resent-Message-ID: <handler.79047.B79047.17529228328784 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>, Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17529228328784
          (code B ref 79047); Sat, 19 Jul 2025 11:01:02 +0000
Received: (at 79047) by debbugs.gnu.org; 19 Jul 2025 11:00:32 +0000
Received: from localhost ([127.0.0.1]:40457 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ud5Iu-0002Hc-7F
	for submit <at> debbugs.gnu.org; Sat, 19 Jul 2025 07:00:32 -0400
Received: from mail.muc.de ([193.149.48.3]:61336)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1ud5Iq-0002HC-Qg
 for 79047 <at> debbugs.gnu.org; Sat, 19 Jul 2025 07:00:30 -0400
Received: (qmail 32634 invoked by uid 3782); 19 Jul 2025 13:00:22 +0200
Received: from muc.de (pd953aea6.dip0.t-ipconnect.de [217.83.174.166]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 19 Jul 2025 13:00:21 +0200
Received: (qmail 8504 invoked by uid 1000); 19 Jul 2025 11:00:21 -0000
Date: Sat, 19 Jul 2025 11:00:21 +0000
Message-ID: <aHt6xYh6h4cbLnz_@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN>
 <867c04fzpv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <867c04fzpv.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

Thanks for the heads up!

On Sat, Jul 19, 2025 at 09:42:52 +0300, Eli Zaretskii wrote:
> > From: Elijah Gabe Pérez <eg642616@HIDDEN>
> > Date: Fri, 18 Jul 2025 20:04:12 -0600

> > Since `electric-pair-mode` now supports multi-character pairs, it would
> > be better if some major modes add some of these pairs.

> > Before making the patch for this (and to avoid doing another regression
> > like bug#77823), here is a list of the modes and their possible pairs:

> >  - c-like modes
> >      "/*" "*/"

Elijah, I'm speaking here from the point of view of CC Mode.

What exactly do you mean by "adding" these multi-character pairs?  What
would the user see that she doesn't already see?

Or are you talking about doing something we already do, but in a
different way?

> >  - lua-ts-mode
> >      "--[" "--]"
> >  - texinfo-mode (idk which others one) (based in a Stefan Monnier idea)
> >      "``" "''"
> >  - lisp-mode (common-lisp-mode)
> >     "#|" "|#"

> > What do you think?

> When discussing in a bug report issues related to some specific
> packages, it is usually a good idea to CC the authors/developers of
> those packages, because we cannot be sure they track the bug-gnu-emacs
> list all the time.

> I've now added people who I think are relevant to your proposal.

> Thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 16:40:01 +0000
Resent-Message-ID: <handler.79047.B79047.175294315521971 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175294315521971
          (code B ref 79047); Sat, 19 Jul 2025 16:40:01 +0000
Received: (at 79047) by debbugs.gnu.org; 19 Jul 2025 16:39:15 +0000
Received: from localhost ([127.0.0.1]:43886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1udAah-0005iH-30
	for submit <at> debbugs.gnu.org; Sat, 19 Jul 2025 12:39:15 -0400
Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:55700)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>)
 id 1udAae-0005hj-Pe
 for 79047 <at> debbugs.gnu.org; Sat, 19 Jul 2025 12:39:13 -0400
Received: by mail-ot1-x342.google.com with SMTP id
 46e09a7af769-73e810dc03bso392216a34.3
 for <79047 <at> debbugs.gnu.org>; Sat, 19 Jul 2025 09:39:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1752943147; x=1753547947; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=dyWNHLYAKR9nBnOfeU1NAhp7p3R+xw87od28A4xMSnE=;
 b=aoRLl4Yeqmdaz0H4DVMPxf4CZMpkGR0o1xCoFAnwLLGvZ8KZFCq8vhwvPXR9uix90o
 qZQSBZcvxz/FJDWFzDFB9YLoVWj41YawETZtNB508IBmu1cHldDE3aeESDA72IK7pgNt
 y67oBc61aXD075NnbNl2WYQZFODDtmWG46JSahevuYYuvwG/IeMPuhLavFov+pqqQ9cr
 L7GnbqQo20SZZng6j7Rd+PdWMgAjiAyrO7+p9dB+WklKcbCFFPLnbf+xwLplC7dxZd4L
 oJkmAZZIUaCJPxrmiJZZRk4t6tdJ71vubBslaId/WFn3/yge32Ba9yA6dtKdsZp8iUfl
 S20w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1752943147; x=1753547947;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=dyWNHLYAKR9nBnOfeU1NAhp7p3R+xw87od28A4xMSnE=;
 b=GfyBm+71XTYKKAlF/tDu1khDai9iIc3SvBgJzBeRWR5MY2IagNnpnrTTOiY8oq7jeW
 VyeqIr7Zv64USS9+hdhlraPB4He+SN4cj+YriRI+BYWjLfOf/ixeHiP8KBk3OUfitccQ
 GI7MJwtPUgr29eaRshvj4Epz3dAA6mje376Xt4x+CduzNLv4x2cD3lTA85TkXlXkiS84
 vReT1KYSwyFS+9nZYH9gvWaGgW+o1sdFXUz/4j2J4rTI2eSs3lPwXAqx2fhbZ1hdxYd4
 fjgLlW5j4ORf8cJ8MLhDKQ1FGCpjvzMnJa91er2gfL7KEmLDLrBxiJCyvbL8BcYXDc9M
 MeSA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUN3jecPhR1ahpIiIzQ3s5BvIZCYIBN9BWW6NjKBd+xPZVswtcaNbCOsfKPcB57650yqizb8A==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwJI1Cc9eqVHEPABcu9ZCd6etqQbw0PVwBO2AovUhnlJ+iSd/v8
 YTlRZZW4WVLBGf3cgL2TEexGE7bcp6jug/+AJpTGguvY7+UskeYRGcPD
X-Gm-Gg: ASbGncvf8rNjL/oYI/dTxUpd8Z/Dx3lEMzkqH4FMnyyf/JDInK9xzxcRTm0JC99faU5
 7HD1zAWxZaEWIICmHOGUWHL5yawhV9VEehbb/RAkLopPoBi78R6+T2fAlfqhsdyZk0vGxZHTBz7
 S5y6XsghtGMIl6BjHU9u3tzUkxxEjV/+yAq3U/7GfWAtW5CitOYwxLBqjd5V2ArrAmTUJ4Jp7qW
 x7+h8ErOaKpud4xJty3/wkK92b8oQzp/1hZsAzt36KzUqwLlc0ZrgCnXzS+FfYYMtnVkG8usNzs
 RwbciUF0s/GaQbkbyoMZ6htXF4mxjQxN4q9epxgIz4cY1wLTqIQHvedvIVTtRcADdjsWAHW4ALh
 Voj1oYL2/QqYPmxM=
X-Google-Smtp-Source: AGHT+IE1p4omr2bbxHA/JpOZAxkYgw4z76fW6n7fclmTCffPlfovcSO6JCkxNJ2g7cKBE7F4DYutkw==
X-Received: by 2002:a05:6830:6f48:b0:73e:6313:3fdf with SMTP id
 46e09a7af769-73e662c8423mr13136634a34.16.1752943146901; 
 Sat, 19 Jul 2025 09:39:06 -0700 (PDT)
Received: from fedora ([189.215.162.117]) by smtp.gmail.com with ESMTPSA id
 006d021491bc7-615bcda4dc6sm839945eaf.27.2025.07.19.09.39.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 19 Jul 2025 09:39:06 -0700 (PDT)
From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
In-Reply-To: <aHt6xYh6h4cbLnz_@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHt6xYh6h4cbLnz_@HIDDEN>
Date: Sat, 19 Jul 2025 10:39:03 -0600
Message-ID: <87seisdtjs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Alan Mackenzie <acm@HIDDEN> writes:

>> > From: Elijah Gabe P=C3=A9rez <eg642616@HIDDEN>
>> > Date: Fri, 18 Jul 2025 20:04:12 -0600
>
>> > Since `electric-pair-mode` now supports multi-character pairs, it would
>> > be better if some major modes add some of these pairs.
>
>> > Before making the patch for this (and to avoid doing another regression
>> > like bug#77823), here is a list of the modes and their possible pairs:
>
>> >  - c-like modes
>> >      "/*" "*/"
>
> Elijah, I'm speaking here from the point of view of CC Mode.
>
> What exactly do you mean by "adding" these multi-character pairs?  What
> would the user see that she doesn't already see?

These pairs are meant to be used in for auto-close block comments, after
the user types "/*", the corresponding "*/" will be inserted, packages
such as smartparens provide this behavior to most C-like modes.

> Or are you talking about doing something we already do, but in a
> different way?

I don't know if CC Mode have something similar.

--=20
- E.G via GNU Emacs and Org.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 16:53:02 +0000
Resent-Message-ID: <handler.79047.B79047.175294397625611 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175294397625611
          (code B ref 79047); Sat, 19 Jul 2025 16:53:02 +0000
Received: (at 79047) by debbugs.gnu.org; 19 Jul 2025 16:52:56 +0000
Received: from localhost ([127.0.0.1]:43958 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1udAnw-0006f0-8S
	for submit <at> debbugs.gnu.org; Sat, 19 Jul 2025 12:52:56 -0400
Received: from mail.muc.de ([193.149.48.3]:34163)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1udAnt-0006eX-8G
 for 79047 <at> debbugs.gnu.org; Sat, 19 Jul 2025 12:52:54 -0400
Received: (qmail 59894 invoked by uid 3782); 19 Jul 2025 18:52:46 +0200
Received: from muc.de (pd953aea6.dip0.t-ipconnect.de [217.83.174.166]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 19 Jul 2025 18:52:46 +0200
Received: (qmail 18057 invoked by uid 1000); 19 Jul 2025 16:52:45 -0000
Date: Sat, 19 Jul 2025 16:52:45 +0000
Message-ID: <aHvNXbZE6Jsueh1_@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHt6xYh6h4cbLnz_@HIDDEN> <87seisdtjs.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87seisdtjs.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Elijah.

On Sat, Jul 19, 2025 at 10:39:03 -0600, Elijah Gabe Pérez wrote:
> Alan Mackenzie <acm@HIDDEN> writes:

> >> > From: Elijah Gabe Pérez <eg642616@HIDDEN>
> >> > Date: Fri, 18 Jul 2025 20:04:12 -0600

> >> > Since `electric-pair-mode` now supports multi-character pairs, it would
> >> > be better if some major modes add some of these pairs.

> >> > Before making the patch for this (and to avoid doing another regression
> >> > like bug#77823), here is a list of the modes and their possible pairs:

> >> >  - c-like modes
> >> >      "/*" "*/"

> > Elijah, I'm speaking here from the point of view of CC Mode.

> > What exactly do you mean by "adding" these multi-character pairs?  What
> > would the user see that she doesn't already see?

> These pairs are meant to be used in for auto-close block comments, after
> the user types "/*", the corresponding "*/" will be inserted, packages
> such as smartparens provide this behavior to most C-like modes.

OK, thanks.

But who's going to want to do this when there's M-; `comment-dwim' which
inserts both the comment opener and comment closer in a single key
stroke?  Surely anybody typing /* explicitly will being doing so on a
rare occasion when she _doesn't_ want the closing */ also inserted.

> > Or are you talking about doing something we already do, but in a
> > different way?

> I don't know if CC Mode have something similar.

M-; is common to most (?all) programming and text modes.

> -- 
> - E.G via GNU Emacs and Org.

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 18:28:02 +0000
Resent-Message-ID: <handler.79047.B79047.175294963126691 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175294963126691
          (code B ref 79047); Sat, 19 Jul 2025 18:28:02 +0000
Received: (at 79047) by debbugs.gnu.org; 19 Jul 2025 18:27:11 +0000
Received: from localhost ([127.0.0.1]:44478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1udCH8-0006wR-NO
	for submit <at> debbugs.gnu.org; Sat, 19 Jul 2025 14:27:11 -0400
Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:60695)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>)
 id 1udCH5-0006w1-Ni
 for 79047 <at> debbugs.gnu.org; Sat, 19 Jul 2025 14:27:08 -0400
Received: by mail-ot1-x344.google.com with SMTP id
 46e09a7af769-73e7e4432f5so1598959a34.1
 for <79047 <at> debbugs.gnu.org>; Sat, 19 Jul 2025 11:27:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1752949622; x=1753554422; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=xXg+oo7KWv0aWVxvtkmNEkA3jOBvQ9e8j5b8Acgz7tA=;
 b=OWtfEFJ20szQsAheWMDBqSAOo0YG4BkrDa6wBj7N50ixtzMD3x+7QQfOkOgU91maFa
 NATCzS8obksKVPoO4v3Vy+PzN9WIWxhHfdjpj9YzSwCtU5mSca59LK7D7p2Hc8tympSS
 AOshdQzujnFnmWYUGm0zDbkQNlTcoMp1JSaQlkTm25JPfdpL13PHpc5Eb+V/eBO5fPxW
 cI4xxBqMWB2t+cg1eGMDvEC4Hl6mxOLCnDQJgVr++qCxcMHgse0m3IOJIMfDSN0Wbm/h
 0p37N28UweSyhpHfGjg0VdslEzeX95v9qAK2Db54WaYheQKU/6SMYZoGUnOoCQcZcYZ9
 ApoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1752949622; x=1753554422;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=xXg+oo7KWv0aWVxvtkmNEkA3jOBvQ9e8j5b8Acgz7tA=;
 b=f/JXah5IWwFz+usF3+RiADe8C2WjbDDr10P6YyEHQu7K89Jl3KVMWeklMbUSl1MUPO
 wNrAM3kSkTq+T6Igh82Uvp+M+6OjmkZ8Ks1FZfku8+IrKVPlUDNma7q6twUpiU6uSl8g
 SCzgNLZsg5bdQfsSEIYvCWSNGP5O3RSH/eNeE5yIW0b/tM02CLYuflEDRGikWMoXpngG
 pzhubI+JLInrIn2p1CmK75TfmDOrwLzOAIMhA2+oWnksj72mWWFGTIsOv4OFxDMo9WDb
 zdMF3fw5UiVMZHgHRKuyih+QoLqZSGY5auXtkMySkVp2y/X4vPk+veWiORPNsXMJzDbQ
 oSvg==
X-Gm-Message-State: AOJu0Yysd5rjWhLR3g8ET8yVOhABkgbj4/V6lFQkBiz5Rn2yl8cpMVNu
 T8XLNuHbDA82AbNATSEPtY+wNvnHnEbcWn+xDH5DPoFbljGvn3DXdCHA9UoU2XXz
X-Gm-Gg: ASbGnctQF3EpKRqcEcir/gX64CURVUm/tcKCmT+fudGMy2g3jp4nQsnBIMjjxhp7+K3
 gIn4UP43vSjVzzo5IQVHKWxgjFQr4Vh30dYbcUXfgEdavGeN9+i4v4mmf2nq10oe6N2oKwMra4g
 VzSCxcMNv/lCkOCFR54HaJGsf5L4KET6xxbEXc2+ZwBurN8iSIpDenfJI8HhYEzE70XzeQB9pix
 goGzaREf9V++KLBTvO6hPyBex9tHuJiH3zid8M6NXfc0QTbnsqxBTAQIbI2kRZg644h2z0JqOjW
 gHb5Aye92CuG96t++uYaAMDqW/E92DBgUOGZ1BtHAlFZpxOt9b+fniYWR7+BXUUV30ai5biWXVQ
 mdaHnwGGuHB7q9qE=
X-Google-Smtp-Source: AGHT+IFbbPg6BH48d+sabVwZhbJntJDfcpqYuVf5OU6cyBUhb9H9lOAanU3kg0WYZX3RYhUiJS9KNw==
X-Received: by 2002:a05:6830:4110:b0:73b:2617:87f1 with SMTP id
 46e09a7af769-73e665e0854mr11950117a34.28.1752949621708; 
 Sat, 19 Jul 2025 11:27:01 -0700 (PDT)
Received: from fedora ([189.215.162.117]) by smtp.gmail.com with ESMTPSA id
 46e09a7af769-73e8366da85sm1501187a34.22.2025.07.19.11.27.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 19 Jul 2025 11:27:01 -0700 (PDT)
From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
In-Reply-To: <aHvNXbZE6Jsueh1_@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHt6xYh6h4cbLnz_@HIDDEN> <87seisdtjs.fsf@HIDDEN>
 <aHvNXbZE6Jsueh1_@HIDDEN>
Date: Sat, 19 Jul 2025 12:26:59 -0600
Message-ID: <87ldokdojw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Alan Mackenzie <acm@HIDDEN> writes:

>> > Elijah, I'm speaking here from the point of view of CC Mode.
>
>> > What exactly do you mean by "adding" these multi-character pairs?  What
>> > would the user see that she doesn't already see?
>
>> These pairs are meant to be used in for auto-close block comments, after
>> the user types "/*", the corresponding "*/" will be inserted, packages
>> such as smartparens provide this behavior to most C-like modes.
>
> OK, thanks.
>
> But who's going to want to do this when there's M-; `comment-dwim' which
> inserts both the comment opener and comment closer in a single key
> stroke?

comment-dwim sometimes doesn't insert the comments where i want, it
mostly insert the comments at the end of the line, or indent them
according to `comment-column` (which ofc can be configured, but in most
the cases, it will not work as expected).

> Surely anybody typing /* explicitly will being doing so on a
> rare occasion when she _doesn't_ want the closing */ also inserted.

The feature can be optional, enabled via an user option or command,
similar to `c-toggle-auto-newline`.

>> > Or are you talking about doing something we already do, but in a
>> > different way?
>
>> I don't know if CC Mode have something similar.
>
> M-; is common to most (?all) programming and text modes.

Right, but calling comment-dwim in some modes doesn't insert a block
comment, even if those modes supports block comments, (e.g. js-mode)

-- 
- E.G via GNU Emacs and Org.





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: john muhl <jm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 19 Jul 2025 18:53:01 +0000
Resent-Message-ID: <handler.79047.B79047.17529511223384 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Alan Mackenzie <acm@HIDDEN>, Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17529511223384
          (code B ref 79047); Sat, 19 Jul 2025 18:53:01 +0000
Received: (at 79047) by debbugs.gnu.org; 19 Jul 2025 18:52:02 +0000
Received: from localhost ([127.0.0.1]:44660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1udCfB-0000sQ-Jg
	for submit <at> debbugs.gnu.org; Sat, 19 Jul 2025 14:52:02 -0400
Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]:57923)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jm@HIDDEN>) id 1udCf7-0000re-BB
 for 79047 <at> debbugs.gnu.org; Sat, 19 Jul 2025 14:51:59 -0400
Received: from phl-compute-10.internal (phl-compute-10.phl.internal
 [10.202.2.50])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 77DFD7A0062;
 Sat, 19 Jul 2025 14:51:51 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-10.internal (MEProxy); Sat, 19 Jul 2025 14:51:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1752951111;
 x=1753037511; bh=vKH4WjvkrWMuR7JHnDt0j9vCSxN2RhJwBa6FXqtywTo=; b=
 1lf8QUb9rLesRMkhXt+w1G8XVqFmth0G+axHLVu9aBLOtoxVKGMFb53vbxe2OUz4
 Wf7vFIV0o54hezt/78QNp7788NEmA0e/86Dg360lbrYGg3EdARMEmYasGaXM3aMT
 cQpLJTmzviiAoYleaWfCFHG4n+9mwmSrGERHTGsH7XkBy3zv/2tO3+4jx5M9c6HX
 Eg3NE/+GbExbJnBjVVolMmBOHQn7fwRXyO4GhBPEV8+FqWJ9owLMYBtZz5NLyl+p
 kgxM9Fd/DqdCFG5CDTuWzhbPXYvUQ6Qqrbol2Ufq9Hc8QdS2am8fQKxwTTWVAL72
 +OMp8p3/DbAAlAjgAIR7Rw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1752951111; x=
 1753037511; bh=vKH4WjvkrWMuR7JHnDt0j9vCSxN2RhJwBa6FXqtywTo=; b=I
 nwCqm7AM2oUbPTeXDERECbESSYJ9n1IvFzVKFGrrh02IFyaRGeA09XBedwtIyGEq
 GIkqlDdmO6IoSojud38/NHaH9AsfciCJxtzhV/PgKg8fJ6UMB4Qv+MCiV5w+Ld6s
 o1vT1YDl31lPvqdIdaiFISonM6fGOY5oX9uXygxK7yoIpd+o+N3MjE82Dn4AGW2h
 zmsH45b2CobtPPnAUxUKouiJ1J8giykqaSELmwO/uMYvVysjgKIxo9hAcPvhF01/
 0uzTz7MuUjWg3Vw1WJagn67MxstHc/HvNsahl0iwSfl02n59nHCgSgkiOh3MetnN
 7QY9psvm4DzjcLOo033AQ==
X-ME-Sender: <xms:Rul7aHKgqVDE_a2HrX8auxYzzZ7nQVjY5_IOO60h4A9fGHUvEZqyeQ>
 <xme:Rul7aIR5jbhEhuk4Q3uzqaVg9U1Oyh4YxEd_4aRT6Zsvjhe5py9x94mX2vJPwZ-9h
 bqY4PJJnndunfq-InE>
X-ME-Received: <xmr:Rul7aOuuFTFN2VvSptwdF0ZGMrBWQyrUOxkTXAVkPq_9sD8l0JHHrQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeijedutdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
 ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
 hrpefhvfevufgjfhffkfgfgggtgfesthhqredttderjeenucfhrhhomhepjhhohhhnuchm
 uhhhlhcuoehjmhesphhusgdrphhinhhkqeenucggtffrrghtthgvrhhnpedtjeethfefve
 evgfevheehtddvteejveejieffteehheehfffgffeuleeiueejffenucevlhhushhtvghr
 ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjmhesphhusgdrphhinhhkpd
 hnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejledt
 geejseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepmhhonhhnihgvrhesih
 hrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpthhtoheprggtmhesmhhutgdruggvpdhr
 tghpthhtohepvghgieegvdeiudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlih
 iisehgnhhurdhorhhg
X-ME-Proxy: <xmx:Rul7aBbkP8KnjgTEqok7Pz1dHKYdwS28jTgcgD62K0aoEb5mXiCFLQ>
 <xmx:Rul7aMEi2Wspgh43pFvPAZ0NqbsLfB1pedfo59ymlUviZFxk3VRBeg>
 <xmx:Rul7aNyMXLEodMfQSOUxAav-wnAJKFgf-1WxzUI5DCXrAUQo219WTA>
 <xmx:Rul7aGkRszErlOOHy8eQGjZ9Li1Sgl9HDoom9HDOQHXnu_yQMPhN9g>
 <xmx:R-l7aFhk7D-iS4cjcu0uNA2YWkFRschnh7iskA1LwcMWIMvp8iQ1ih77>
Feedback-ID: i74194916:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 19 Jul 2025 14:51:49 -0400 (EDT)
From: john muhl <jm@HIDDEN>
In-Reply-To: <867c04fzpv.fsf@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
Date: Sat, 19 Jul 2025 13:51:39 -0500
Message-ID: <87o6tgko90.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Elijah Gabe P=C3=A9rez <eg642616@HIDDEN>
>> Date: Fri, 18 Jul 2025 20:04:12 -0600
>>=20
>> Since `electric-pair-mode` now supports multi-character pairs, it would
>> be better if some major modes add some of these pairs.
>>=20
>> Before making the patch for this (and to avoid doing another regression
>> like bug#77823), here is a list of the modes and their possible pairs:
>>=20
>>  - c-like modes
>>      "/*" "*/"
>>  - lua-ts-mode
>>      "--[" "--]"
>>  - texinfo-mode (idk which others one) (based in a Stefan Monnier idea)
>>      "``" "''"
>>  - lisp-mode (common-lisp-mode)
>>     "#|" "|#"
>>=20
>> What do you think?
>
> When discussing in a bug report issues related to some specific
> packages, it is usually a good idea to CC the authors/developers of
> those packages, because we cannot be sure they track the bug-gnu-emacs
> list all the time.
>
> I've now added people who I think are relevant to your proposal.
>
> Thanks.

I=E2=80=99m not sure what the question is here but in general if someone fi=
nds
something useful to add to lua-ts-mode I=E2=80=99m fine with it; especially=
 if
it comes with tests for the change.

Just reading the above I=E2=80=99d point out that Lua multi-line comments a=
ren=E2=80=99t
symmetrical:

  --[[
  Here is a very
  long comment.
  ]]

and electric-pair-mode already works in that case.

Some people like to add a second pair of dashes before the closing
brackets but they are stylistic, not a requirement.

Elijah, if I missed the point then maybe you could show the proposed
patch to lua-ts-mode.

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 20 Jul 2025 11:31:01 +0000
Resent-Message-ID: <handler.79047.B79047.175301101626257 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175301101626257
          (code B ref 79047); Sun, 20 Jul 2025 11:31:01 +0000
Received: (at 79047) by debbugs.gnu.org; 20 Jul 2025 11:30:16 +0000
Received: from localhost ([127.0.0.1]:49250 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1udSFD-0006oE-RQ
	for submit <at> debbugs.gnu.org; Sun, 20 Jul 2025 07:30:16 -0400
Received: from mail.muc.de ([193.149.48.3]:23093)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1udSFB-0006Kt-Bz
 for 79047 <at> debbugs.gnu.org; Sun, 20 Jul 2025 07:30:13 -0400
Received: (qmail 9955 invoked by uid 3782); 20 Jul 2025 13:30:05 +0200
Received: from muc.de (p4fe152fa.dip0.t-ipconnect.de [79.225.82.250]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 20 Jul 2025 13:30:05 +0200
Received: (qmail 8388 invoked by uid 1000); 20 Jul 2025 11:30:04 -0000
Date: Sun, 20 Jul 2025 11:30:04 +0000
Message-ID: <aHzTPJJl8ijm3tdn@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN>
 <867c04fzpv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <867c04fzpv.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Elijah.

One important point.

On Sat, Jul 19, 2025 at 09:42:52 +0300, Eli Zaretskii wrote:
> > From: Elijah Gabe Pérez <eg642616@HIDDEN>
> > Date: Fri, 18 Jul 2025 20:04:12 -0600

> > Since `electric-pair-mode` now supports multi-character pairs, it would
> > be better if some major modes add some of these pairs.

Are you sure about this?  In NEWS, there is the rather sloppily worded
entry:

    ** Electric Pair mode can now pair multiple delimiters at once.
    You can now insert or wrap text with multiple sets of parentheses and
    other matching delimiters at once with Electric Pair mode, by providing
    a prefix argument when inserting one of the delimiters.

It uses the sloppy American English ambiguity where "multiple" can mean
either "several", or "composed of several parts".  In correct British
English "multiple" has only the latter meaning.

I think in this NEWS entry the meaning "several" was intended, and you
may have misread it.  I don't think electric-pair-mode has any facilities
for pairing a multiple delimiter; only for pairing several of the same
delimiter at once, e.g. (((....))).

Please check if I am correct or mistaken on this point.  If I'm correct,
then the prerequisites for implementing this change are absent, and there
is nothing more to discuss.

> > Before making the patch for this (and to avoid doing another regression
> > like bug#77823), here is a list of the modes and their possible pairs:

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 22 Jul 2025 23:04:02 +0000
Resent-Message-ID: <handler.79047.B79047.17532254337311 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17532254337311
          (code B ref 79047); Tue, 22 Jul 2025 23:04:02 +0000
Received: (at 79047) by debbugs.gnu.org; 22 Jul 2025 23:03:53 +0000
Received: from localhost ([127.0.0.1]:46202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ueM1U-0001tY-Iq
	for submit <at> debbugs.gnu.org; Tue, 22 Jul 2025 19:03:51 -0400
Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:49447)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>)
 id 1ueM1P-0001sr-Nv
 for 79047 <at> debbugs.gnu.org; Tue, 22 Jul 2025 19:03:45 -0400
Received: by mail-oi1-x241.google.com with SMTP id
 5614622812f47-41b4ebb15e2so2861004b6e.3
 for <79047 <at> debbugs.gnu.org>; Tue, 22 Jul 2025 16:03:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1753225418; x=1753830218; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=FM6XaN1NgxtrBSovM5cjiKMKSRyLPa3n7tz+mobMlfI=;
 b=mxtnm5D9W/RxZM29sdFb3ZgRmaHnpLQkwV3U/FdGKRdnp+S4A1nin/hJ1dJtcL0+HY
 xAamZX+vWbSG7/QvYFJU8vQLh9PA+wTE2X06z0w9LeJ4yyq3r40EJergp+UBiRzQCQlg
 yF71Prx90lmtvtYYQCgzUtd2Yxoo65AAgAeuQ1eX4CG889pQC2fgMVQKpxAJvL89N/X7
 qTvlYmfvZDWgY0qicPcXji042lj0oKfV9SYhkwpPpJnl6oPE3ZjzD5ffvsWPRGpanHm/
 +aRWe+XIUZr1P1TjnAE0agu/CEKbxiROaj7B+7WOlAGp9HZ2Ty6iMtM38Ns3BDe+j4k5
 KAdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1753225418; x=1753830218;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=FM6XaN1NgxtrBSovM5cjiKMKSRyLPa3n7tz+mobMlfI=;
 b=RQkFuYlnjMgGvts7NaHSVcj0U/SLRi/2DfUuMNlUtsu9o0vCEmRZWb0mjaXVVdyVF/
 Vp+aEOqJDz/zprgI2J5xM4b8u+NHHrdPViQvDH1AFwTe83f6plrRnR01RtFQ+8dmvsdh
 eovXpRTmgR54FESH3+ExxEKzSv7hP9k88wzdIvstcnrmn9nnipHaV+HhEbXu9fcwQPNX
 WgLJaGK8+aiVD6YW3skKtG1iyQBQIT/Vq9b56wFICunri610iGd3wSne4Lr/rf+Vj1N9
 3wO/wuJbUjwjk69n4Oi9pq1z+Y9FrZOvRtz9zoAIGDQdHV1QoaqDBZUuoJCysxS3s3Ta
 tRiA==
X-Gm-Message-State: AOJu0YxP4XZL2voxl9bWU6gVRpaGSHRLdysvuUwfQWv9q4s2nsdqMN7O
 lcQYM3PJTsCo7vEecRM6m0az+qjdonYon/C1602oZFMM/f+nwl8plHhU
X-Gm-Gg: ASbGncvQBTbnJpn41XVO69i0z592E26K97Qz21QcnT635IKl2PEMedpJEoNubb2RTPW
 JRvxlG4OjEuH4CEmOzdau0W2PmF4IZcH4U/rPc0JbeQuacWtb+rviUVbAS6T1ZSaHKzKk8KVpR1
 BjoCF/Rv2nKnN1Mtrhj8Wra9YjE6VIC+bWNbIL+u1VBrKpulfatfnUGrML48UkmY+TG33ArRyDr
 34Wv1XUJgu1Sf2TO8U6ruUi65+reBqYoHpTsmGlAvj/x9bbnm11qxu0HrICpzJL2N+7Zgbrxp4a
 Vog49H/iniSfrlTolmvU5Jev9ZVt/B8XN5KF4QgO5Qt6Fvr9EGhHoFQYy8u390hWDjwweU6V8zK
 oFzLWBf1DV8HB0Ms=
X-Google-Smtp-Source: AGHT+IHZE4HLekC194T+bmi/n/sxAlxrA9z5F5wJ2scyneuBI7LFQn5ytVuBBhnA0kfwqz4gRnjqGA==
X-Received: by 2002:a05:6808:4f51:b0:426:9d0c:2d81 with SMTP id
 5614622812f47-426c6438abdmr686240b6e.27.1753225417835; 
 Tue, 22 Jul 2025 16:03:37 -0700 (PDT)
Received: from fedora ([189.215.162.117]) by smtp.gmail.com with ESMTPSA id
 006d021491bc7-615bcc8e42fsm2123882eaf.22.2025.07.22.16.03.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Jul 2025 16:03:37 -0700 (PDT)
From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
In-Reply-To: <aHzTPJJl8ijm3tdn@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN>
Date: Tue, 22 Jul 2025 17:03:34 -0600
Message-ID: <87ecu7vneh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Alan Mackenzie <acm@HIDDEN> writes:

> Hello, Elijah.
>
> One important point.
>
> Are you sure about this?  In NEWS, there is the rather sloppily worded
> entry:
>
>     ** Electric Pair mode can now pair multiple delimiters at once.
>     You can now insert or wrap text with multiple sets of parentheses and
>     other matching delimiters at once with Electric Pair mode, by providing
>     a prefix argument when inserting one of the delimiters.
>
> It uses the sloppy American English ambiguity where "multiple" can mean
> either "several", or "composed of several parts".  In correct British
> English "multiple" has only the latter meaning.
>
> I think in this NEWS entry the meaning "several" was intended, and you
> may have misread it.  I don't think electric-pair-mode has any facilities
> for pairing a multiple delimiter; only for pairing several of the same
> delimiter at once, e.g. (((....))).

That is the wrong NEWS entry of the feature.
The real one is this:

  *** Electric Pair mode now supports multi-character paired delimiters.
  'electric-pair-pairs' and 'electric-pair-text-pairs' now allow using
  strings for multi-character paired delimiters.

  To use this, add a list to both electric pair user options: '("/*" . "*/")'.

  You can also specify to insert an extra space after the first string
  pair: '("/*" " */" t)'.

> Please check if I am correct or mistaken on this point.  If I'm correct,
> then the prerequisites for implementing this change are absent, and there
> is nothing more to discuss.

I've tested the feature, it's possible to achieve it:

  (setq electric-pair-pairs `((,(regexp-quote "/*") " */" t)))

  /* | */
       ^^ After inserting the * character.
          (the extra whitespace is optionally included)

-- 
- E.G via GNU Emacs and Org.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Jul 2025 13:40:01 +0000
Resent-Message-ID: <handler.79047.B79047.17533643688971 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17533643688971
          (code B ref 79047); Thu, 24 Jul 2025 13:40:01 +0000
Received: (at 79047) by debbugs.gnu.org; 24 Jul 2025 13:39:28 +0000
Received: from localhost ([127.0.0.1]:55725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uewAR-0002Kc-Nu
	for submit <at> debbugs.gnu.org; Thu, 24 Jul 2025 09:39:28 -0400
Received: from mail.muc.de ([193.149.48.3]:47954)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1uewAN-0002K8-EJ
 for 79047 <at> debbugs.gnu.org; Thu, 24 Jul 2025 09:39:25 -0400
Received: (qmail 21926 invoked by uid 3782); 24 Jul 2025 15:39:17 +0200
Received: from muc.de (p4fe15d15.dip0.t-ipconnect.de [79.225.93.21]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 24 Jul 2025 15:39:16 +0200
Received: (qmail 11089 invoked by uid 1000); 24 Jul 2025 13:39:16 -0000
Date: Thu, 24 Jul 2025 13:39:16 +0000
Message-ID: <aII3hL7g2rTRnvs-@MAC.fritz.box>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87ecu7vneh.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Elijah.

On Tue, Jul 22, 2025 at 17:03:34 -0600, Elijah Gabe Pérez wrote:
> Alan Mackenzie <acm@HIDDEN> writes:

[ .... ]

> > Are you sure about this?  ....

[ .... ]

> That is the wrong NEWS entry of the feature.
> The real one is this:

>   *** Electric Pair mode now supports multi-character paired delimiters.
>   'electric-pair-pairs' and 'electric-pair-text-pairs' now allow using
>   strings for multi-character paired delimiters.

Apologies.  I missed this one, somehow.  This NEWS entry is part of 

commit 60fbeda771639ded68ffd0666df340c7a06cafcf
Author: Elías Gabriel Pérez <eg642616@HIDDEN>
Date:   Thu Apr 24 17:34:58 2025 -0600

    Support strings for electric pairs (bug#78053)

..  This commit appears to me to be incomplete.  In particular:

(i) The doc string of electric-pair-syntax-info hasn't been modified to
  reflect the result component SYNTAX possibly being the symbol `str'.

(ii) The insertion of string pairs at ~L692 in
  electric-pair-post-self-insert-function neglects to check
  electric-pair-inhibit-predicate.  It's unclear why this isn't done, but
  if there's a good reason it should be documented somewhere (if it isn't
  already; I haven't actually checked).  e-p-inhibit-predicate gets used,
  and not handling it makes the insertion of string pairs inconsistent
  with the rest of electric-pair mode and less useful.

(iii) I don't think you've documented anywhere that the first string in
  an entry in electric-pair-pairs is actually a regular expression.
  (Again, I haven't rigorously searched for such documentation.)

>   To use this, add a list to both electric pair user options: '("/*" . "*/")'.

>   You can also specify to insert an extra space after the first string
>   pair: '("/*" " */" t)'.

[ .... ]

> I've tested the feature, it's possible to achieve it:

[ .... ]

Yes, sort of.  But electric pair mode's implementation violates an
(unwritten) Emacs convention about hooks, i.e. that a hook function
doesn't mess with the functionality that invoked it.  For example, a
function in window-scroll-functions may not change the scrolling state of
a window, and an after-change-functions function never changes the text
of a buffer.

By contrast, electric-pair-post-self-insert-function does mess with the
invoking functionality, namely self-insert-command; it inserts further
characters.  From the point of view of a Lisp program, this makes
self-insert-function an undefined function - what it does varies from
time to time and from buffer to buffer.

CC Mode has had to implement a workaround for this, namely binding
post-self-insert-function to nil (to get defined functionality for
self-insert-command), then later calling
electric-pair-post-self-insert-function by hand, to get the electric pair
functionality.  It's ugly and anything but robust.

So, yes, it is possible to get the functionality in CC Mode with ("/\\*"
" */" t), but it is not entirely trivial.

> -- 
> - E.G via GNU Emacs and Org.

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Jul 2025 14:55:02 +0000
Resent-Message-ID: <handler.79047.B79047.175336884830730 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175336884830730
          (code B ref 79047); Thu, 24 Jul 2025 14:55:02 +0000
Received: (at 79047) by debbugs.gnu.org; 24 Jul 2025 14:54:08 +0000
Received: from localhost ([127.0.0.1]:57446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uexKh-0007zY-H8
	for submit <at> debbugs.gnu.org; Thu, 24 Jul 2025 10:54:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58704)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uexKf-0007yC-CU
 for 79047 <at> debbugs.gnu.org; Thu, 24 Jul 2025 10:54:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uexKY-0004sX-NU; Thu, 24 Jul 2025 10:53:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=7jw0LCDRGp3No6ur9RCEaStj60tmhi7XVvQKj2F1uxY=; b=Cp/qYR7wlHmW
 qGPQ1RrUuVG7s9PemCLdxveXYTlhyn95wo/nPd2TVoXR9qEq+E4demZ2SQ/IK0v2b46fH0Dvri6dQ
 zWmGAV8hgFzMxFJRZIvpMtM24gntHSwj1Fox5OFze1aqEEnfzKF9OttlyKmTscr8l8xvCwIqSQKUB
 Y/2wumu/wZ39UfeNJhkHa5ZRnq2E1cOY+EKfDqc2n352QSeJMsNrjNJdy+3w9Bd6sVtBg8f9CO9eJ
 Hpi61qZvBK3ktfvoRVMY2YcxU6svAFBVMBsyz2b1gRh71dj36sJ6AojkX4nImak9ChTFbuLED2djH
 NRXQ8XoDBkxXEkDixPvgNA==;
Date: Thu, 24 Jul 2025 17:53:55 +0300
Message-Id: <86ecu563ng.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <aII3hL7g2rTRnvs-@MAC.fritz.box> (message from Alan Mackenzie on
 Thu, 24 Jul 2025 13:39:16 +0000)
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN>
 <87ecu7vneh.fsf@HIDDEN> <aII3hL7g2rTRnvs-@MAC.fritz.box>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 24 Jul 2025 13:39:16 +0000
> Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
>   John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
> From: Alan Mackenzie <acm@HIDDEN>
> 
> Yes, sort of.  But electric pair mode's implementation violates an
> (unwritten) Emacs convention about hooks, i.e. that a hook function
> doesn't mess with the functionality that invoked it.  For example, a
> function in window-scroll-functions may not change the scrolling state of
> a window, and an after-change-functions function never changes the text
> of a buffer.
> 
> By contrast, electric-pair-post-self-insert-function does mess with the
> invoking functionality, namely self-insert-command; it inserts further
> characters.  From the point of view of a Lisp program, this makes
> self-insert-function an undefined function - what it does varies from
> time to time and from buffer to buffer.

?? post-self-insert-hook is specifically mean for features that insert
additional characters, or even replace characters by others.
Otherwise, what would that hook be good for?

The ELisp manual says about this: "You could use this to automatically
reindent text as it is typed, for example."  And what is reindentation
if not removal of some characters and insertion of others?

So I don't understand the nature of your dislike in this case.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Jul 2025 15:55:02 +0000
Resent-Message-ID: <handler.79047.B79047.175337246727032 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175337246727032
          (code B ref 79047); Thu, 24 Jul 2025 15:55:02 +0000
Received: (at 79047) by debbugs.gnu.org; 24 Jul 2025 15:54:27 +0000
Received: from localhost ([127.0.0.1]:57773 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ueyH4-00071v-Qo
	for submit <at> debbugs.gnu.org; Thu, 24 Jul 2025 11:54:27 -0400
Received: from mail.muc.de ([193.149.48.3]:41153)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1ueyH0-00071L-VT
 for 79047 <at> debbugs.gnu.org; Thu, 24 Jul 2025 11:54:25 -0400
Received: (qmail 85483 invoked by uid 3782); 24 Jul 2025 17:54:15 +0200
Received: from muc.de (p4fe15d15.dip0.t-ipconnect.de [79.225.93.21]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 24 Jul 2025 17:54:15 +0200
Received: (qmail 14175 invoked by uid 1000); 24 Jul 2025 15:54:14 -0000
Date: Thu, 24 Jul 2025 15:54:14 +0000
Message-ID: <aIJXJvlU2JX2tElf@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86ecu563ng.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Thu, Jul 24, 2025 at 17:53:55 +0300, Eli Zaretskii wrote:
> > Date: Thu, 24 Jul 2025 13:39:16 +0000
> > Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
> >   John Muhl <jm@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
> > From: Alan Mackenzie <acm@HIDDEN>

> > Yes, sort of.  But electric pair mode's implementation violates an
> > (unwritten) Emacs convention about hooks, i.e. that a hook function
> > doesn't mess with the functionality that invoked it.  For example, a
> > function in window-scroll-functions may not change the scrolling state of
> > a window, and an after-change-functions function never changes the text
> > of a buffer.

> > By contrast, electric-pair-post-self-insert-function does mess with the
> > invoking functionality, namely self-insert-command; it inserts further
> > characters.  From the point of view of a Lisp program, this makes
> > self-insert-function an undefined function - what it does varies from
> > time to time and from buffer to buffer.

> ?? post-self-insert-hook is specifically mean for features that insert
> additional characters, or even replace characters by others.
> Otherwise, what would that hook be good for?

Nothing, as far as I can see.  I see no legitimate need for that hook.

> The ELisp manual says about this: "You could use this to automatically
> reindent text as it is typed, for example."  And what is reindentation
> if not removal of some characters and insertion of others?



> So I don't understand the nature of your dislike in this case.

I'll start off with the abstract:

It breaks the abstraction mentioned in my first paragraph above that
hook functions do things ancillary to the main function, and do not
constitute part of it.  So that, for example, in an
after-change-functions function, you know that no deletion by a previous
a-c-f will have made the START, END, and OLD-LEN arguments invalid.

This principle holds for all hook uses I'm aware of except for
post-self-insert-function.  It enables Lisp coding to be done sensibly
without having to program around all the "what if"s which would arise by
people programming buffer changes into a-c-f's, or amending the
scrolling inside a window-scroll-functions function for example.

Now the concrete:

c-electric-paren, for example, does EOL cleanups after inserting the ?\(
the user typed using self-insert-command - this involves detecting that
the newly inserted ?\( is at EOL (modulo whitespace).  This breaks when
electric-pair-post-self-insert-function (or anything else on that hook)
inserts further characters after the one the user has typed.

As a workaround, I bind post-self-insert-hook to nil around the call to
self-insert-command, this being the only way I know to get predictable
functionality from self-insert-command.  Later I have to call
electric-pair-post-self-insert-function explicitly from
c-electric-paren.  This is neither robust nor future proof.

The error here is that post-self-insert-hook is invoked from the middle
of the command using self-insert-function, rather than after its end.
One way of fixing this would be to put
electric-pair-post-self-insert-function on post-command-hook instead.

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Jul 2025 17:03:02 +0000
Resent-Message-ID: <handler.79047.B79047.175337654513212 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, jm@HIDDEN, eg642616@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175337654513212
          (code B ref 79047); Thu, 24 Jul 2025 17:03:02 +0000
Received: (at 79047) by debbugs.gnu.org; 24 Jul 2025 17:02:25 +0000
Received: from localhost ([127.0.0.1]:58055 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uezKr-0003R2-4u
	for submit <at> debbugs.gnu.org; Thu, 24 Jul 2025 13:02:25 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46238)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1uezKn-0003Qg-Lx
 for 79047 <at> debbugs.gnu.org; Thu, 24 Jul 2025 13:02:22 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 42DF810013E;
 Thu, 24 Jul 2025 13:02:16 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1753376534;
 bh=lm14olRn/nuJPayZ6zZbxvRJr9Xd0yVHWoa773ljhiU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=NmfotPmFMfT27v8+VabhfunQRYy6YOp108gYLMoV34Wep4omZ4SYXNSZtpq2xX19U
 9/sEYOZIwUtLpRG1xaeQT5CVGIWtbbeZk7n++2XsswgpIqhbM/vZ3hYmNjd2V1CDmP
 rhbK79Q1baqHUX195lUvPUlZRC6C1UshdK+1AIyg1S/LDTvYZKNK754GNDgP9NQsp6
 4341tAMjH80+8yfUDDG8AhzCs6lxWhOh7hA+nUex0QgsexAfgiOYIFrJXyzpN8F4Ff
 UArKcfV3p4M8z7FMhrAezFpBFbjxDZguXnYk6IzbP62ETqei0PXgc2ySxt0WEvasGg
 jGGcEgX1m0AyA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8656A10002E;
 Thu, 24 Jul 2025 13:02:14 -0400 (EDT)
Received: from pastel (unknown [104.247.225.139])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4E412120346;
 Thu, 24 Jul 2025 13:02:14 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <aIJXJvlU2JX2tElf@HIDDEN>
Message-ID: <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
Date: Thu, 24 Jul 2025 13:02:13 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.263 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> As a workaround, I bind post-self-insert-hook to nil around the call to
> self-insert-command, this being the only way I know to get predictable
> functionality from self-insert-command.

"predictable functionality" and `self-insert-command` don't get along
very well, I'm afraid (e.g. because of `auto-fill-chars` and abbrev
expansion).

Part of the problem is fundamental, I think: when several forms of
electricity want to affect the same key, there is inevitably some
delicate issues that require them to cooperate to some extent.
It's hard to make them work together peacefully *and* modularily at the
same time.

> The error here is that post-self-insert-hook is invoked from the middle
> of the command using self-insert-function, rather than after its end.
> One way of fixing this would be to put
> electric-pair-post-self-insert-function on post-command-hook instead.

That tends to move the problem: it would be your code which risks
breaking the others, rather than other way around.

I don't have a solution which I would call "good", but the best we have
so far is to get rid of the `c-electric-paren` command and turn it into
a hook added to `post-self-insert-hook` instead.  This will let you use
the DEPTH argument of `add-hook` to control when it is run w.r.t to the
other hooks.

That's what the other `electric-FOO-mode` do to cohabit.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Jul 2025 18:48:02 +0000
Resent-Message-ID: <handler.79047.B79047.17533828558185 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, jm@HIDDEN, eg642616@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17533828558185
          (code B ref 79047); Thu, 24 Jul 2025 18:48:02 +0000
Received: (at 79047) by debbugs.gnu.org; 24 Jul 2025 18:47:35 +0000
Received: from localhost ([127.0.0.1]:58427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uf0yc-00027w-L4
	for submit <at> debbugs.gnu.org; Thu, 24 Jul 2025 14:47:34 -0400
Received: from mail.muc.de ([193.149.48.3]:46254)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1uf0ya-00027X-H0
 for 79047 <at> debbugs.gnu.org; Thu, 24 Jul 2025 14:47:33 -0400
Received: (qmail 95098 invoked by uid 3782); 24 Jul 2025 20:47:25 +0200
Received: from muc.de (p4fe15d15.dip0.t-ipconnect.de [79.225.93.21]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 24 Jul 2025 20:47:25 +0200
Received: (qmail 11379 invoked by uid 1000); 24 Jul 2025 18:47:25 -0000
Date: Thu, 24 Jul 2025 18:47:24 +0000
Message-ID: <aIJ_vMuz0oIO1k4e@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Stefan.

Thanks for your reply.

Sadly you snipped the key section of my last post.  Here it is again:

> > But electric pair mode's implementation violates an (unwritten) Emacs
> > convention about hooks, i.e. that a hook function doesn't mess with
> > the functionality that invoked it.  For example, a function in
> > window-scroll-functions may not change the scrolling state of a
> > window, and an after-change-functions function never changes the text
> > of a buffer.

> > By contrast, electric-pair-post-self-insert-function does mess with
> > the invoking functionality, namely self-insert-command; it inserts
> > further characters.  From the point of view of a Lisp program, this
> > makes self-insert-function an undefined function - what it does
> > varies from time to time and from buffer to buffer.

As you're aware, when faced with a problem, I tend to analyse the cause
at the appropriately abstract level, and then fix that cause, rather than
just paper over the problem with some unsatisfactory workaround.

The fundamental cause of this problem with electric pair mode is, I
believe, in my two quoted paragraphs above.  I ask you to answer the
points made in these two paragraphs.

Thanks!

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Jul 2025 20:46:01 +0000
Resent-Message-ID: <handler.79047.B79047.17533899376618 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, jm@HIDDEN, eg642616@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17533899376618
          (code B ref 79047); Thu, 24 Jul 2025 20:46:01 +0000
Received: (at 79047) by debbugs.gnu.org; 24 Jul 2025 20:45:37 +0000
Received: from localhost ([127.0.0.1]:58808 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uf2or-0001ie-JG
	for submit <at> debbugs.gnu.org; Thu, 24 Jul 2025 16:45:37 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55863)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1uf2op-0001hv-Jj
 for 79047 <at> debbugs.gnu.org; Thu, 24 Jul 2025 16:45:36 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id F02B810013E;
 Thu, 24 Jul 2025 16:45:29 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1753389929;
 bh=Nh1ecUyCyLV4y0yKM/2CB1la48+w+84NeE2VFudlUqs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=FXGTorzJm/GJhhJulKvyvjqimI5274NN3+UdxNh/2Y7CCXK3X0yn3uCDP+kliRu4h
 pSA9+vdNswyG5gS2wstxrDGuvKcY7ghdeD5SDBn/z1QAbZ8mSo6jbF8P92FQIqlU2v
 0bIOh0k1Tv1x9KzY92IdScdhdD2N1TyTPtOzbSmZCWRNpZCvl90T33K1z09HBQw7LY
 g8cWlBHqmAK8jASdvq7/hv1ZUyKSMT5cq0/j5HcShtIJc9SQEJCf54knlaNjKoNlF1
 ecE8OVjmMoz10A9JFg1ir/ynJlipLFc5FBY5ETPbZe07I7hSdDRFLVvrEXias+Qvz3
 mK+EH+vEn6/5w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 049D910002E;
 Thu, 24 Jul 2025 16:45:29 -0400 (EDT)
Received: from alfajor (unknown [204.48.90.96])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 87E7A120342;
 Thu, 24 Jul 2025 16:45:28 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <aIJ_vMuz0oIO1k4e@HIDDEN>
Message-ID: <jwv8qkdnwwb.fsf-monnier+emacs@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN>
Date: Thu, 24 Jul 2025 16:45:27 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> The fundamental cause of this problem with electric pair mode is, I
> believe, in my two quoted paragraphs above.  I ask you to answer the
> points made in these two paragraphs.

I understand it to mean that the problem is philosophical.
That's fine, but I don't see how it helps us address the concrete issue.
For that reason I did not have anything to say about those two paragraphs.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 06:54:02 +0000
Resent-Message-ID: <handler.79047.B79047.17534264013077 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17534264013077
          (code B ref 79047); Fri, 25 Jul 2025 06:54:02 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 06:53:21 +0000
Received: from localhost ([127.0.0.1]:60707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufCIy-0000nW-Tc
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 02:53:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39484)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ufCIs-0000n0-Tu
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 02:53:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ufCIl-0007en-Fb; Fri, 25 Jul 2025 02:53:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=2JydeN0kxRWfEx47+hqEK6IALbatCWlXAwU0dILPhAM=; b=quzyNKxZ5WWE
 hJtTtkezWLyjybqHTJHbenB4VeG+KFoiTPsOP12q8j0nfBs3SaLYk2RMS5nyuDu9Zc2pGcXgJhuYU
 z0qyhwyBQcSv4wrl457O3SkgXTpKn5cEbTAUYyZN1/xhSXsspwzwKvKJCdMX6khtkBIJNRJCyfKNp
 uF/ylnp4oZilIqunt1Fj/KNu/tj99KfOO8kx81DF90Yzh+FkJT/gwlfgRmp1BUI3OdcRhrK3Vr8Hx
 zF+sRfOsXx/7ypCXJA0iTzyqyc3uJU53DAXp9UtFMaez2Ybv68zd+TfCLc9vqG5yERm0cUmD7RfKr
 FYv6c2yXk7Bawc2aOy61eQ==;
Date: Fri, 25 Jul 2025 09:53:03 +0300
Message-Id: <8634ak69tc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <aIJ_vMuz0oIO1k4e@HIDDEN> (message from Alan Mackenzie on
 Thu, 24 Jul 2025 18:47:24 +0000)
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN> <aIJ_vMuz0oIO1k4e@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 24 Jul 2025 18:47:24 +0000
> Cc: Eli Zaretskii <eliz@HIDDEN>, eg642616@HIDDEN, 79047 <at> debbugs.gnu.org,
>   jm@HIDDEN, acm@HIDDEN
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > > But electric pair mode's implementation violates an (unwritten) Emacs
> > > convention about hooks, i.e. that a hook function doesn't mess with
> > > the functionality that invoked it.  For example, a function in
> > > window-scroll-functions may not change the scrolling state of a
> > > window, and an after-change-functions function never changes the text
> > > of a buffer.
> 
> > > By contrast, electric-pair-post-self-insert-function does mess with
> > > the invoking functionality, namely self-insert-command; it inserts
> > > further characters.  From the point of view of a Lisp program, this
> > > makes self-insert-function an undefined function - what it does
> > > varies from time to time and from buffer to buffer.
> 
> As you're aware, when faced with a problem, I tend to analyse the cause
> at the appropriately abstract level, and then fix that cause, rather than
> just paper over the problem with some unsatisfactory workaround.
> 
> The fundamental cause of this problem with electric pair mode is, I
> believe, in my two quoted paragraphs above.  I ask you to answer the
> points made in these two paragraphs.

And as I already mention, you perceive a convention where there is
none.  Thus electric-pair-mode doesn't violate any conventions.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 10:33:02 +0000
Resent-Message-ID: <handler.79047.B79047.175343954627430 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175343954627430
          (code B ref 79047); Fri, 25 Jul 2025 10:33:02 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 10:32:26 +0000
Received: from localhost ([127.0.0.1]:33182 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufFiz-00078M-MT
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 06:32:26 -0400
Received: from mail.muc.de ([193.149.48.3]:41591)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1ufFix-00077o-B5
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 06:32:24 -0400
Received: (qmail 61909 invoked by uid 3782); 25 Jul 2025 12:32:16 +0200
Received: from muc.de (pd953aea1.dip0.t-ipconnect.de [217.83.174.161]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 25 Jul 2025 12:32:16 +0200
Received: (qmail 4275 invoked by uid 1000); 25 Jul 2025 10:32:15 -0000
Date: Fri, 25 Jul 2025 10:32:15 +0000
Message-ID: <aINdL26oYUc3Nx6g@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN> <8634ak69tc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8634ak69tc.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Fri, Jul 25, 2025 at 09:53:03 +0300, Eli Zaretskii wrote:
> > Date: Thu, 24 Jul 2025 18:47:24 +0000
> > Cc: Eli Zaretskii <eliz@HIDDEN>, eg642616@HIDDEN, 79047 <at> debbugs.gnu.org,
> >   jm@HIDDEN, acm@HIDDEN
> > From: Alan Mackenzie <acm@HIDDEN>

> > > > But electric pair mode's implementation violates an (unwritten) Emacs
> > > > convention about hooks, i.e. that a hook function doesn't mess with
> > > > the functionality that invoked it.  For example, a function in
> > > > window-scroll-functions may not change the scrolling state of a
> > > > window, and an after-change-functions function never changes the text
> > > > of a buffer.

> > > > By contrast, electric-pair-post-self-insert-function does mess with
> > > > the invoking functionality, namely self-insert-command; it inserts
> > > > further characters.  From the point of view of a Lisp program, this
> > > > makes self-insert-function an undefined function - what it does
> > > > varies from time to time and from buffer to buffer.

> > As you're aware, when faced with a problem, I tend to analyse the cause
> > at the appropriately abstract level, and then fix that cause, rather than
> > just paper over the problem with some unsatisfactory workaround.

> > The fundamental cause of this problem with electric pair mode is, I
> > believe, in my two quoted paragraphs above.  I ask you to answer the
> > points made in these two paragraphs.

> And as I already mention, you perceive a convention where there is
> none.

OK, then, Emacs hackers have abided by this non-convention nevertheless,
out of instinctive good sense and good taste.  Up until
post-self-insert-hook.

> Thus electric-pair-mode doesn't violate any conventions.

self-insert-command, called from Lisp, is broken.  There is no usable
definition of its functionality.  So far, there is no competing analysis
to mine as to how it's broken.  Stefan's "solution" is not to use
self-insert-command.  This is impractical for c-electric-paren and
friends.  Incidentally there are around 122 uses of self-insert-command
in Emacs.

So it's looking like the ugly workarounds in c-electric-paren to use
self-insert-command will have to remain.  I'm disappointed about this.

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 11:09:03 +0000
Resent-Message-ID: <handler.79047.B79047.17534417374440 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.17534417374440
          (code B ref 79047); Fri, 25 Jul 2025 11:09:03 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 11:08:57 +0000
Received: from localhost ([127.0.0.1]:33322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufGIK-00019W-VE
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 07:08:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40994)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ufGIH-00018x-Os
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 07:08:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ufGIA-00075m-Us; Fri, 25 Jul 2025 07:08:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=B8x5V1/5Wj/16f4qmviVvQiYZ4QK8TTEyAvebBxMxgw=; b=Q2y0S0yDnu+Z
 cmRO1ETpB1m2ebb50PrgOOxWj9unKnRuNS8dJNSwvU2J21b/LjApUHHIt/uFf9XHCnBMs4sjNnMxx
 HGjA5jhrUiBAyhyk+m7OkoT3EgHpVG0zaVcDX/Dz0QAOscCfwXChqTNNzSkWMebBwOR+LPBhDxSwC
 7Ghl6PAJI2RoPwgQcxLwiH8+erTIDISqkMz/7r7t8Lq+CYGoV2Yu3gp7xFeH7JeibFtMG2+2h7Nc5
 CdB1UjCrFJ5qB1uz6yuEYoBx4WeXzcrU244Z77W4f7OVXs2aVk2lszJfRmTIIV3wTmxGPZthYy8HL
 3jzL93lXN7+4/k0TUGGIgg==;
Date: Fri, 25 Jul 2025 14:08:43 +0300
Message-Id: <86v7ng4jes.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <aINdL26oYUc3Nx6g@HIDDEN> (message from Alan Mackenzie on
 Fri, 25 Jul 2025 10:32:15 +0000)
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN>
 <8634ak69tc.fsf@HIDDEN> <aINdL26oYUc3Nx6g@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 25 Jul 2025 10:32:15 +0000
> Cc: monnier@HIDDEN, eg642616@HIDDEN, 79047 <at> debbugs.gnu.org,
>   jm@HIDDEN, acm@HIDDEN
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > And as I already mention, you perceive a convention where there is
> > none.
> 
> OK, then, Emacs hackers have abided by this non-convention nevertheless,
> out of instinctive good sense and good taste.  Up until
> post-self-insert-hook.

Which might mean there was no non-convention to begin with.

> > Thus electric-pair-mode doesn't violate any conventions.
> 
> self-insert-command, called from Lisp, is broken.  There is no usable
> definition of its functionality.

What's wrong with its doc string as that definition?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 11:43:02 +0000
Resent-Message-ID: <handler.79047.B79047.175344376923918 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175344376923918
          (code B ref 79047); Fri, 25 Jul 2025 11:43:02 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 11:42:49 +0000
Received: from localhost ([127.0.0.1]:33433 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufGp6-0006Dh-SW
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 07:42:49 -0400
Received: from mail.muc.de ([193.149.48.3]:38875)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1ufGp3-0006DD-H0
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 07:42:47 -0400
Received: (qmail 46643 invoked by uid 3782); 25 Jul 2025 13:42:38 +0200
Received: from muc.de (pd953aea1.dip0.t-ipconnect.de [217.83.174.161]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 25 Jul 2025 13:42:37 +0200
Received: (qmail 8689 invoked by uid 1000); 25 Jul 2025 11:42:37 -0000
Date: Fri, 25 Jul 2025 11:42:37 +0000
Message-ID: <aINtrQF-RTRI-4xy@HIDDEN>
References: <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN> <8634ak69tc.fsf@HIDDEN>
 <aINdL26oYUc3Nx6g@HIDDEN> <86v7ng4jes.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86v7ng4jes.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Fri, Jul 25, 2025 at 14:08:43 +0300, Eli Zaretskii wrote:
> > Date: Fri, 25 Jul 2025 10:32:15 +0000
> > Cc: monnier@HIDDEN, eg642616@HIDDEN, 79047 <at> debbugs.gnu.org,
> >   jm@HIDDEN, acm@HIDDEN
> > From: Alan Mackenzie <acm@HIDDEN>

> > > And as I already mention, you perceive a convention where there is
> > > none.

> > OK, then, Emacs hackers have abided by this non-convention nevertheless,
> > out of instinctive good sense and good taste.  Up until
> > post-self-insert-hook.

> Which might mean there was no non-convention to begin with.

> > > Thus electric-pair-mode doesn't violate any conventions.

> > self-insert-command, called from Lisp, is broken.  There is no usable
> > definition of its functionality.

> What's wrong with its doc string as that definition?

It's inaccurate and misleading.

We have:

    Insert the character you type.
    Whichever character C you type to run this command is inserted.
    [Plus all the bits about the numeric prefix, abbreviations, etc.]

More accurate would be:

    Maybe insert the character you type (depending on
    post-self-insert-hook).
    Insert or delete further characters as specified by
    post-self-insert-hook.
    Leave point at the position determined by post-self-insert-hook or
    after the inserted character.

..  This makes it unusable in a Lisp program.  For example, in
c-electric-paren, which handles the user entering "(" or ")", the code
needs to determine whether the "(" was entered at the end of a line.
The current self-insert-command, which inserts arbitrary further
characters, makes this difficult.

With the current self-insert-command, there is no satisfactory way of
coding c-electric-paren - only workarounds with varying degrees of
ugliness.

I am suggesting that self-insert-command should be made usable from Lisp
again, as it once was, and have suggested a means for achieving this.

-- 
Alan Mackenzie (Nuremberg, Germany).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 12:03:02 +0000
Resent-Message-ID: <handler.79047.B79047.175344495228968 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175344495228968
          (code B ref 79047); Fri, 25 Jul 2025 12:03:02 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 12:02:32 +0000
Received: from localhost ([127.0.0.1]:33517 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufH8B-0007X9-Hc
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 08:02:32 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42662)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ufH86-0007WI-4Y
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 08:02:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ufH7w-0004ex-JC; Fri, 25 Jul 2025 08:02:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=afNZS/2AwNMWBuf2APLHnxSK0pX9+qAHwg39DzqCYhE=; b=GVSDHBycRhmUBIXqzPZI
 +gDHcCNKxEB8J9v2YKW9oP3tOyW/kVIpLj5R9io6DmBoJmtZ3NbNkVNEdhC9gTsQiT9lp7MASNxJd
 P9fK5WfF1zC63waAVvLAhoKZFzw94v6xR/8kXgK1O6OlCN9qVnK2IgOO9EPKYeasEz9yPw3VZKhz3
 Q1DsYzZwaX3RK39r3DugA95UpBS34m2YtM/2D3Z2FulZa5rSu9qIQbNLoonLV2yqCbkx3i8XOUuTt
 2c4H7cIWbnje3wWLoDQrFE3pL230fwY3AF/kRRQLthSrYY05uZ+XxlxzcwrGMOPUEu/g/omWwwVEV
 dna3443xC2AH+w==;
Date: Fri, 25 Jul 2025 15:02:12 +0300
Message-Id: <86o6t84gxn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <aINtrQF-RTRI-4xy@HIDDEN> (message from Alan Mackenzie on
 Fri, 25 Jul 2025 11:42:37 +0000)
References: <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN> <8634ak69tc.fsf@HIDDEN>
 <aINdL26oYUc3Nx6g@HIDDEN>
 <86v7ng4jes.fsf@HIDDEN> <aINtrQF-RTRI-4xy@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 25 Jul 2025 11:42:37 +0000
> Cc: monnier@HIDDEN, eg642616@HIDDEN, 79047 <at> debbugs.gnu.org,
>   jm@HIDDEN, acm@HIDDEN
> From: Alan Mackenzie <acm@HIDDEN>
> 
> > > self-insert-command, called from Lisp, is broken.  There is no usable
> > > definition of its functionality.
> 
> > What's wrong with its doc string as that definition?
> 
> It's inaccurate and misleading.
> 
> We have:
> 
>     Insert the character you type.
>     Whichever character C you type to run this command is inserted.
>     [Plus all the bits about the numeric prefix, abbreviations, etc.]
> 
> More accurate would be:
> 
>     Maybe insert the character you type (depending on
>     post-self-insert-hook).
>     Insert or delete further characters as specified by
>     post-self-insert-hook.
>     Leave point at the position determined by post-self-insert-hook or
>     after the inserted character.

Of course, if you truncate the doc string at some arbitrary point, you
can claim anything about its low quality.  The full doc string is
this:

  Insert the character you type.
  Whichever character C you type to run this command is inserted.
  The numeric prefix argument N says how many times to repeat the insertion.
  Before insertion, ‘expand-abbrev’ is executed if the inserted character does
  not have word syntax and the previous character in the buffer does.
  After insertion, ‘internal-auto-fill’ is called if
  ‘auto-fill-function’ is non-nil and if the ‘auto-fill-chars’ table has
  a non-nil value for the inserted character.  At the end, it runs
  ‘post-self-insert-hook’.

Which does mention post-self-insert-hook.  (And the ELisp manual
expands on the possible uses of that hook.)

What kind of argument is it when you elide arbitrary parts of the
documentation, just to make your point?  In what book does that
qualify as a serious discussion?

> ..  This makes it unusable in a Lisp program.

That's debatable, and is not the issue when the doc string and the
definition of functionality are being discussed.

> For example, in
> c-electric-paren, which handles the user entering "(" or ")", the code
> needs to determine whether the "(" was entered at the end of a line.
> The current self-insert-command, which inserts arbitrary further
> characters, makes this difficult.

So we have two electric behaviors that could conflict.  That's not
anything new, and we have ways of handling these situations, as Stefan
pointed out, and as you can see in the source code.  What does this
have to do with the issue at hand?

> I am suggesting that self-insert-command should be made usable from Lisp
> again, as it once was, and have suggested a means for achieving this.

Your request is noted.  I find it hard to believe that we will take
that direction, since post-self-insert-hook is used in so many useful
features nowadays.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 13:29:02 +0000
Resent-Message-ID: <handler.79047.B79047.175345010719225 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alan Mackenzie <acm@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, jm@HIDDEN, eg642616@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175345010719225
          (code B ref 79047); Fri, 25 Jul 2025 13:29:02 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 13:28:27 +0000
Received: from localhost ([127.0.0.1]:33814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufITL-000500-3L
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 09:28:27 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5099)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1ufITI-0004zS-AX
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 09:28:25 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 16353441104;
 Fri, 25 Jul 2025 09:28:18 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1753450096;
 bh=WHlIBDorGI4CFfqL8sAePBPyXvmSVNYZ9P5eL72a/AI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ofgT9iGQaxtpaKS7U26D3w5V6X3Swk0bJ7rzwpa/E6OkZNkhFosL//rZElhRhUNcg
 DsRFm5kdQ0gPYiZNEoUfROuKH92/0qJbDDT3/K+WNGrV0/kE2ZD7zZl5f9Kt8qYGCK
 QB22KgcpkZ5opg/NbFNmzKe1cXW9vkLXsGF68mV2c3PEdXnw7HIU6Lyzw9iLJCBtxG
 eXsMjGm1qVZeRqj8CmSQ3DRBcFIU8fsciVc8evEXpy5mZsVD5ewFO+OB1YZ0frtguz
 0TQz2f+8ItRag2skrzoo/QsnnC7zhWCpphC/FWwFcj8b/T8oGNfwPkL7RxA41Ksams
 t4BufdBe3RYRg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E7496440AA7;
 Fri, 25 Jul 2025 09:28:16 -0400 (EDT)
Received: from pastel (unknown [104.247.225.139])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ABCB612021A;
 Fri, 25 Jul 2025 09:28:16 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <aINdL26oYUc3Nx6g@HIDDEN>
Message-ID: <jwvh5z0pfkx.fsf-monnier+emacs@HIDDEN>
References: <87ms91gcmb.fsf@HIDDEN> <867c04fzpv.fsf@HIDDEN>
 <aHzTPJJl8ijm3tdn@HIDDEN> <87ecu7vneh.fsf@HIDDEN>
 <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN> <8634ak69tc.fsf@HIDDEN>
 <aINdL26oYUc3Nx6g@HIDDEN>
Date: Fri, 25 Jul 2025 09:28:15 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.272 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Thus electric-pair-mode doesn't violate any conventions.
> self-insert-command, called from Lisp, is broken.  There is no usable
> definition of its functionality.  So far, there is no competing analysis
> to mine as to how it's broken.  Stefan's "solution" is not to use
> self-insert-command.

Your code doesn't want to use `self-insert-command`, instead it wants to
do mimic `self-insert-command` but with some changes.
That's exactly what `post-self-insert-hook` is for.

> So it's looking like the ugly workarounds in c-electric-paren to use
> self-insert-command will have to remain.  I'm disappointed about this.

Not for lack of an alternative, tho.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79047: Add some multi-character pairs to some major modes.
Resent-From: Alan Mackenzie <acm@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 25 Jul 2025 13:40:02 +0000
Resent-Message-ID: <handler.79047.B79047.175345077122015 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79047
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 79047 <at> debbugs.gnu.org, acm@HIDDEN, eg642616@HIDDEN, jm@HIDDEN, monnier@HIDDEN
Received: via spool by 79047-submit <at> debbugs.gnu.org id=B79047.175345077122015
          (code B ref 79047); Fri, 25 Jul 2025 13:40:02 +0000
Received: (at 79047) by debbugs.gnu.org; 25 Jul 2025 13:39:31 +0000
Received: from localhost ([127.0.0.1]:33855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ufIe1-0005iz-CC
	for submit <at> debbugs.gnu.org; Fri, 25 Jul 2025 09:39:30 -0400
Received: from mail.muc.de ([193.149.48.3]:13675)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1ufIdn-0005i2-AZ
 for 79047 <at> debbugs.gnu.org; Fri, 25 Jul 2025 09:39:24 -0400
Received: (qmail 87853 invoked by uid 3782); 25 Jul 2025 15:39:08 +0200
Received: from muc.de (pd953aea1.dip0.t-ipconnect.de [217.83.174.161]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 25 Jul 2025 15:39:07 +0200
Received: (qmail 10420 invoked by uid 1000); 25 Jul 2025 13:39:07 -0000
Date: Fri, 25 Jul 2025 13:39:07 +0000
Message-ID: <aIOI-6bk2XQXfM9e@HIDDEN>
References: <aII3hL7g2rTRnvs-@MAC.fritz.box> <86ecu563ng.fsf@HIDDEN>
 <aIJXJvlU2JX2tElf@HIDDEN>
 <jwvecu5sfhv.fsf-monnier+emacs@HIDDEN>
 <aIJ_vMuz0oIO1k4e@HIDDEN> <8634ak69tc.fsf@HIDDEN>
 <aINdL26oYUc3Nx6g@HIDDEN> <86v7ng4jes.fsf@HIDDEN>
 <aINtrQF-RTRI-4xy@HIDDEN> <86o6t84gxn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <86o6t84gxn.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli.

On Fri, Jul 25, 2025 at 15:02:12 +0300, Eli Zaretskii wrote:
> > Date: Fri, 25 Jul 2025 11:42:37 +0000
> > Cc: monnier@HIDDEN, eg642616@HIDDEN, 79047 <at> debbugs.gnu.org,
> >   jm@HIDDEN, acm@HIDDEN
> > From: Alan Mackenzie <acm@HIDDEN>

> > > > self-insert-command, called from Lisp, is broken.  There is no usable
> > > > definition of its functionality.

> > > What's wrong with its doc string as that definition?

> > It's inaccurate and misleading.

> > We have:

> >     Insert the character you type.
> >     Whichever character C you type to run this command is inserted.
> >     [Plus all the bits about the numeric prefix, abbreviations, etc.]

> > More accurate would be:

> >     Maybe insert the character you type (depending on
> >     post-self-insert-hook).
> >     Insert or delete further characters as specified by
> >     post-self-insert-hook.
> >     Leave point at the position determined by post-self-insert-hook or
> >     after the inserted character.

> Of course, if you truncate the doc string at some arbitrary point, you
> can claim anything about its low quality.

I abstracted the relevant bit.  I'm complaining not about the doc string,
which can't be made adequate, rather about the function, whose
functionality has become indeterminate due to the violation of the
non-convention which you deny doesn't exist.

> The full doc string is this:

>   Insert the character you type.
>   Whichever character C you type to run this command is inserted.
>   The numeric prefix argument N says how many times to repeat the insertion.
>   Before insertion, ‘expand-abbrev’ is executed if the inserted character does
>   not have word syntax and the previous character in the buffer does.
>   After insertion, ‘internal-auto-fill’ is called if
>   ‘auto-fill-function’ is non-nil and if the ‘auto-fill-chars’ table has
>   a non-nil value for the inserted character.  At the end, it runs
>   ‘post-self-insert-hook’.

> Which does mention post-self-insert-hook.  (And the ELisp manual
> expands on the possible uses of that hook.)

Yes.  But that doesn't make the function usable.  Before this mechanism
came into existence, one could depend on self-insert-command inserting
exactly one character and point being after the point of insertion.  Now
an arbitrary collection of characters is inserted and deleted, and point
ends up in an arbitrary position.  This makes self-insert-command
virtually unusable from Lisp.

> What kind of argument is it when you elide arbitrary parts of the
> documentation, just to make your point?  In what book does that
> qualify as a serious discussion?

As I said in my last paragraph, the bit I left out didn't really seem
relevant.  self-insert-command is just as unusable if one considers that
part of the doc string too.

> > ..  This makes it unusable in a Lisp program.

> That's debatable, ....

Then debate it with me, please.

> .... and is not the issue when the doc string and the definition of
> functionality are being discussed.

On the contrary, being able to use a function is the entire point of
documenting it.

> > For example, in c-electric-paren, which handles the user entering "("
> > or ")", the code needs to determine whether the "(" was entered at
> > the end of a line.  The current self-insert-command, which inserts
> > arbitrary further characters, makes this difficult.

> So we have two electric behaviors that could conflict.

That's a most superficial way of regarding the problem, and if one looks
no further, one will end up with a superficial workaround which fails to
solve the underlying problem.

> That's not anything new, and we have ways of handling these situations,
> as Stefan pointed out, and as you can see in the source code.

What Stefan suggested was no longer using self-insert-command.  That is
hardly practical in CC Mode.

> What does this have to do with the issue at hand?

I'm not sure what you see as the issue.  I see the issue as the
unusability of self-insert-command, and I've analysed the cause of this.

Forgive me for pointing out that this was another instance of a big
feature being introduced into Emacs without prior discussion
on emacs-devel, what I was complaining about last November.  I spotted
its flaw instantly on becoming aware of the new feature, but that was too
late actually to get anything done about it.

> > I am suggesting that self-insert-command should be made usable from Lisp
> > again, as it once was, and have suggested a means for achieving this.

> Your request is noted.  I find it hard to believe that we will take
> that direction, since post-self-insert-hook is used in so many useful
> features nowadays.

I can't say I'm all that surprised, sadly.

Note that my changes wouldn't remove any functionality.  They would
merely make self-insert-command work again predictably.

I've tried putting electric-pair-post-self-insert-function and its friend
onto post-command-hook instead of post-self-insert-hook.  It works, sort
of, but would naturaly need some debugging and testing.

Or we just leave the ugly workarounds in c-electric-paren and friends and
fix them whenever they break.  Or replace them with other ugly
workarounds of some nature, perhaps.

I'm not happy about the state of c-electric-paren.

-- 
Alan Mackenzie (Nuremberg, Germany).





Last modified: Fri, 25 Jul 2025 13:45:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.