From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#18100: 24.4.50; Restore simplicity of (put 'self-insert-command 'delete-selection 'kill) Date: Wed, 11 May 2022 17:02:16 +0200 Message-ID: <87k0as6rk7.fsf@gnus.org> References: <4aea5d8d-c60c-4213-ad3d-1f701b50792a@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7621"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Juri Linkov , 18100@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 11 17:04:00 2022 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 1nonse-0001iq-5J for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 May 2022 17:04:00 +0200 Original-Received: from localhost ([::1]:38462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nonsc-0003OZ-O3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 May 2022 11:03:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nonrj-0002Fm-OC for bug-gnu-emacs@gnu.org; Wed, 11 May 2022 11:03:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nonrj-0003mT-Fm for bug-gnu-emacs@gnu.org; Wed, 11 May 2022 11:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nonrj-0007p5-DH for bug-gnu-emacs@gnu.org; Wed, 11 May 2022 11:03:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 May 2022 15:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18100 X-GNU-PR-Package: emacs Original-Received: via spool by 18100-submit@debbugs.gnu.org id=B18100.165228134929956 (code B ref 18100); Wed, 11 May 2022 15:03:03 +0000 Original-Received: (at 18100) by debbugs.gnu.org; 11 May 2022 15:02:29 +0000 Original-Received: from localhost ([127.0.0.1]:38109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonrA-0007n6-RZ for submit@debbugs.gnu.org; Wed, 11 May 2022 11:02:29 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:42630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nonr8-0007mp-DK for 18100@debbugs.gnu.org; Wed, 11 May 2022 11:02:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iWyqh8aAyOc2RVjJcQgPnb8eJadDlQeeam99aQXh3YU=; b=Ev9YEIf36IhWxCeB3Ba+5eiHEi 0tJxKGdDruL5ogE2Q6m8hnHApw8UnmUIUBs4fbuvHdR6tA07z3AGC/oiijuXOj35CHhzYvu12TCyX zzPJwxe7ckbXUhaOnDFBI/AETjsY5CUdsYZBILBEFjh52Fz+uuhEFRoioTLyS5DxGtsc=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nonqy-00013U-UD; Wed, 11 May 2022 17:02:19 +0200 X-Now-Playing: Joni Mitchell's _Travelogue (1)_: "Slouching Towards Bethlehem (based on a poem by W.B. Yeats)" In-Reply-To: <4aea5d8d-c60c-4213-ad3d-1f701b50792a@default> (Drew Adams's message of "Thu, 24 Jul 2014 10:22:23 -0700 (PDT)") 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" Xref: news.gmane.io gmane.emacs.bugs:231947 Archived-At: Drew Adams writes: > This new bug is about getting that fixed, IOW, restoring the ability to > use a simple `put' to configure `delete-selection-mode' behavior for a > given command, rather than having to jump through hoops with > incomprehensible lambda forms in the `put' value. IOW not make users do > things like this: > >> (put 'self-insert-command 'delete-selection >> (lambda () >> (and (not (run-hook-with-args-until-success >> 'self-insert-uses-region-functions)) >> 'kill))) This was somewhat rewritten in 2015, and there's now a delete-selection-uses-region-p. So this would be simpler to express now: (put 'self-insert-command 'delete-selection (lambda () (and (delete-selection-uses-region-p) 'kill))) And I think that's sufficient here, and I'm therefore closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no