From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.bugs Subject: bug#73688: [PATCH] electric-pair-mode - preserve balance in conservative mode Date: Sun, 10 Nov 2024 17:28:44 +0300 Message-ID: References: <86v7wwn4lz.fsf@gnu.org> <6eb1f1cd-80dd-4fec-bebc-9d361321000d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36002"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , Marc Soda , 73688@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 10 15:30:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tA8xQ-0009Bi-Cn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Nov 2024 15:30:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA8x4-0007e7-Hz; Sun, 10 Nov 2024 09:30:06 -0500 Original-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 ) id 1tA8x1-0007bq-Kt for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 09:30:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tA8x1-0005Kd-Bg for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 09:30:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:MIME-Version:Date:From:To:Subject; bh=45FU6ZSse4569aGBegiclttjciFZ9XYufWYBajB2PAc=; b=m74pMjDN/EkVeQDKORMb5ZN9QXVW6nkhkgfaRf3z8LONU6jmDsVhsxkQmdjDg4nhvZxCeyiZHL4DtA0AgKjZm/oOCtRlyI3UT8FT4fQXbnRd6nrFTcPvKo3RwSQWGf8Mb40OYTDBXnHmVZVpbPh7SOyj03/MSAOzH/wStA9TZcdb2pzNoBz2m/uWUqEOK1X1Ec/uysHjxBb5PZTEpEK2NlD8bBFh0soBkocjBoRH26kBbL4QWCJmaGkMiHC2rGg59OBj53xbkomz7latSrNXeMdgGjjlpyoETBqWoZQNclBo8PdWkyriN+O9TZ5lmym0ldsGPKF75KAZiDnkAIVj5Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA8x0-0004gJ-QY for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 09:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nikolay Kudryavtsev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Nov 2024 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73688 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73688-submit@debbugs.gnu.org id=B73688.173124899317952 (code B ref 73688); Sun, 10 Nov 2024 14:30:02 +0000 Original-Received: (at 73688) by debbugs.gnu.org; 10 Nov 2024 14:29:53 +0000 Original-Received: from localhost ([127.0.0.1]:56241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA8wq-0004fU-Sq for submit@debbugs.gnu.org; Sun, 10 Nov 2024 09:29:53 -0500 Original-Received: from mail-lf1-f52.google.com ([209.85.167.52]:48377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA8wn-0004fI-NL for 73688@debbugs.gnu.org; Sun, 10 Nov 2024 09:29:50 -0500 Original-Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-53c73f01284so4463759e87.0 for <73688@debbugs.gnu.org>; Sun, 10 Nov 2024 06:29:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731248929; x=1731853729; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=45FU6ZSse4569aGBegiclttjciFZ9XYufWYBajB2PAc=; b=ZzxjOIG3bYBnYvKMyGKjx3UAOBa7scix4d6BSCkBtLuEN7R01IF0chSTR8B00Hzhq2 7X5k+7I+ILr9m8adm/YqiLbR72RwWH84yAQYUySHcynC8KX7OczMj8CGFt8Xl1GfhA5a kVWaL73PHrbBTSkzp8suA2kfkYkPJa89rglOC5HQ3QeS1BX5yg6Obb7/rqL/t7h9cHQL nF1oW5IzqCOJAKQSmBzkrwv0Sxip1zyzE5CbJ2eVAE9M3ZUP1Z7IgvWUn7KDpjzHxVBH 7WabUUcfXYPXHZ99AivYlhOApbNh7Qb3mZQP7kIqGvBgqOSI9g7lSpvfO4M6HhFMFUDs 95WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731248929; x=1731853729; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=45FU6ZSse4569aGBegiclttjciFZ9XYufWYBajB2PAc=; b=k/LtDvEGX7g6jxuKncN4f0/f9HbSiInukQytrWwbhH1xmB14+c1Mq+/jaM+h+vsEuB w9n+WnA4zywKv74r01oqXs14gHxefPkSsZzk2UPWagfNzyqUbmMcW/TN6s39KrJbrX/s WXIgB6b9nvsBDbpEZPJNnef6XF4gJw7XNsznkNm8tT41GPJf7Lt1GKOSt7ft/hw+rrls MfuKsZBzZBxI/qwVKeH+HBsK7ug+37j9mu7i3sf10ot/MCcQPPeBXuy3/B7fIKjghObD FsT3RFrWdKEcSCFG3fROXYIUlYF6jRwK6rQEJ8D/rCn89LgI4iIvUarKHp5mbg8vJo9a h/5A== X-Forwarded-Encrypted: i=1; AJvYcCVPUtBXtnfMoPnrBIdUj4EAmWdUbeCraSgw1Il7rjWyAFi2DgN+xqGySP96szsAjt6Rf+HdFA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxGP10O1zJYMIqVskrs4SOPcmbb0edypQk6SUeeZ0NL6Bv1dXWQ W68gD7E4kcIqg1SsZCNJCAPG9MaleXP7hnvDgngIrs5OGHvHgofO X-Google-Smtp-Source: AGHT+IGHE5o2TKtAhaDpkA8A6VywKoscFRJWmon/AyRtMPm71mBFiXleKQZMrFwnCLfe5uQWgdjRjg== X-Received: by 2002:a05:651c:211d:b0:2fb:5688:55c0 with SMTP id 38308e7fff4ca-2ff20309b0emr42349841fa.38.1731248928260; Sun, 10 Nov 2024 06:28:48 -0800 (PST) Original-Received: from ?IPV6:2a02:2168:b20b:5100:7d49:7b16:bc59:d504? ([2a02:2168:b20b:5100:7d49:7b16:bc59:d504]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ff17a039ecsm13751861fa.123.2024.11.10.06.28.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Nov 2024 06:28:46 -0800 (PST) X-Google-Original-From: Nikolay Kudryavtsev Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295187 Archived-At: OR seems like the natural solution for multiple predicates in this case. And if you need AND for a subset of predicates, you can easily roll out your own predicate implementing that. Obviously there's nothing really wrong with add-function hacks in practice, but, in my opinion, if we're relying on them in places for which a proper customization ability was already designed and implemented, it's a telling sign that it is inadequate.