From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Date: Mon, 08 Oct 2012 18:25:00 -0400 Message-ID: References: <87ipdqx6e4.fsf@gnu.org> <87a9z19jgj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349735138 23639 80.91.229.3 (8 Oct 2012 22:25:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2012 22:25:38 +0000 (UTC) Cc: Chong Yidong , 11520@debbugs.gnu.org To: Simon Law Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 09 00:25:44 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TLLlf-00039q-D0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Oct 2012 00:25:43 +0200 Original-Received: from localhost ([::1]:55431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLLlY-0000v6-Pj for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2012 18:25:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLLlV-0000uV-U7 for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2012 18:25:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLLlU-0001KK-Rw for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2012 18:25:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLLlU-0001Jz-Lw for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2012 18:25:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TLLly-0006Du-2r for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2012 18:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Oct 2012 22:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11520 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11520-submit@debbugs.gnu.org id=B11520.134973513923894 (code B ref 11520); Mon, 08 Oct 2012 22:26:02 +0000 Original-Received: (at 11520) by debbugs.gnu.org; 8 Oct 2012 22:25:39 +0000 Original-Received: from localhost ([127.0.0.1]:34369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLLlb-0006DL-J4 for submit@debbugs.gnu.org; Mon, 08 Oct 2012 18:25:39 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:55717) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLLlZ-0006D8-1G for 11520@debbugs.gnu.org; Mon, 08 Oct 2012 18:25:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLQG/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCwsOJhIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="200881997" Original-Received: from 69-196-180-6.dsl.teksavvy.com (HELO ceviche.home) ([69.196.180.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Oct 2012 18:25:01 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B0B21660E0; Mon, 8 Oct 2012 18:25:00 -0400 (EDT) In-Reply-To: (Simon Law's message of "Sun, 15 Jul 2012 12:33:37 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65408 Archived-At: > I proposed making delete-selection-pre-hook understand a function as > one of the legitimate types. If it were a function, it gets called and > its results would be interpreted as type, either: 'yank, 'kill, > 'supersede, t, or nil. > That way, electric-pair-mode can override the (put > 'self-insert-command 'delete-selection ...) with its own function that That's going in the right direction, but I have two problems with that: - I don't want electric-pair-mode to decide of the whole self-insert-command behavior. I.e. self-insert-command should have a `delete-selection' property that is not specific to electric-pair-mode, so that if someone implements some other post-self-insert-hook that also interacts with selection-selection-mode, they should be able to cooperate. IOW, we need self-insert-command's delete-section property to be a new function that runs a new hook on which electric-foo-mode can add their respective function. - this new hook should be good enough for delete-selection-mode, obviously, but it should also be good enough for a replacement of delete-selection-mode that works differently. I guess the functions on that hook would mostly need to return a boolean indicating whether they're going to make use of the region. Stefan