From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Use deactivate-mark from cua-cancel Date: Sat, 20 Jun 2020 10:45:27 +0300 Message-ID: <83k102w57s.fsf@gnu.org> References: <20200607082019.255681-1-andrew.burgess@embecosm.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="111564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andrew Burgess Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 20 09:46:22 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jmYCj-000SwP-Nm for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 09:46:21 +0200 Original-Received: from localhost ([::1]:43088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmYCi-0001vt-Ot for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 03:46:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmYC3-0001NQ-Bi for emacs-devel@gnu.org; Sat, 20 Jun 2020 03:45:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36256) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmYC3-0001ll-0g; Sat, 20 Jun 2020 03:45:39 -0400 Original-Received: from [176.228.60.248] (port=2712 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmYC2-0000VO-G3; Sat, 20 Jun 2020 03:45:38 -0400 In-Reply-To: <20200607082019.255681-1-andrew.burgess@embecosm.com> (message from Andrew Burgess on Sun, 7 Jun 2020 09:20:19 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252424 Archived-At: > From: Andrew Burgess > Date: Sun, 7 Jun 2020 09:20:19 +0100 > Cc: Andrew Burgess > > The reason is that with `cua-selection-mode` enabled, C-g now calls > `cua-cancel` instead of `keyboard-quit`. Currently `cua-cancel` looks > like this: > > (defun cua-cancel () > "Cancel the active region, rectangle, or global mark." > (interactive) > (setq mark-active nil) > (if (fboundp 'cua--cancel-rectangle) > (cua--cancel-rectangle))) > > It is the line: > > (setq mark-active nil) > > that is problematic, setting `mark-active` directly avoids the > `deactivate-mark-hook`. I think that instead we should be calling > `deactivate-mark`, and this is what this patch does. Thanks, pushed to the master branch.