From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master a2ee819: Let delete-selection-mode work with popup-menu commands (Bug#27569) Date: Tue, 18 Jul 2017 13:50:45 -0400 Message-ID: References: <20170718103950.22436.83344@vcs0.savannah.gnu.org> <20170718103952.4E6F720E35@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500400287 16570 195.159.176.226 (18 Jul 2017 17:51:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Jul 2017 17:51:27 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 18 19:51:24 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXWeX-0003wE-IQ for ged-emacs-devel@m.gmane.org; Tue, 18 Jul 2017 19:51:21 +0200 Original-Received: from localhost ([::1]:58012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXWec-0006af-Vj for ged-emacs-devel@m.gmane.org; Tue, 18 Jul 2017 13:51:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXWe1-0006Vz-Hv for emacs-devel@gnu.org; Tue, 18 Jul 2017 13:50:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXWe0-0002Q0-Gq for emacs-devel@gnu.org; Tue, 18 Jul 2017 13:50:49 -0400 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:33216) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXWe0-0002PE-Bl for emacs-devel@gnu.org; Tue, 18 Jul 2017 13:50:48 -0400 Original-Received: by mail-oi0-x235.google.com with SMTP id p188so23759916oia.0 for ; Tue, 18 Jul 2017 10:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=MKFzWIGSTwJLKyUfJi0fJFw0BBzccFJivrxzmQy+W0s=; b=PZzNMyGuTua8cXI3xnmmKMPUuWZ+UnbKBwBHtlbe0p8exwlzrd5ls67RMNfuBLrXix FkZsetHXRB+SJKP2VVqRnVH7tBBuL5qI2D1iDz9aBwUFubDyLdrFDESuEcWMX1nW+N5S zINvZhSZ6YmqYYtv96hjM4pI60CA+m21CmdK6HwRo/Cqx5P2Vj6swFRPJ5MngNCNydwM tgVxUK0JoMe/qn0i6jmykF2jvyijAGwDoPMaN/Xan8ls6KGgL3+9nalpY2kmC1/43ZQb +zR+GDtWNNCtjwWC7aPEygNcoIiZWsQ0dAVy5J4ztczlh1+9yU046u+pAEGtq+jvSAUt jw0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=MKFzWIGSTwJLKyUfJi0fJFw0BBzccFJivrxzmQy+W0s=; b=kvqaIQ8T1YcxNyvW5gcuIxtjPBH39f7bWryyVYdC9xLuHCzw2tpEfR12Q4fymDZfOD b4tRTuzISskO3CXlWmfjPRapfMUWbNGhKcIU38E5eJxLgVRhZBplnY3EK/mcBk3/95XJ e0T8dcIQhWCFLG31p9kjQR8MHSw2EyrqdSOCwMVBwUBvJy51mLhwsvqxtiMPvelXFEIZ N01TzVcXKiskGq0mXtj8sNBm7zBnbVyLV0jtXeWY6093PJ9dUgfFVhS2IfvizHwGZj5h LKHxqwNnqzTDeWF4zi8mrOQdJhvWXTgOJ5XZJuGHMGoikeDdStRWtD6XPL2YeYSujEWb +O8g== X-Gm-Message-State: AIVw113ok64ReBBXeGeQ+ua65yABI34zijvT3nPeHDJCw4X7MI+j0sQx YGVZ2PMWYrgwNSOK6TLYYbh8V0Myhg== X-Received: by 10.202.194.139 with SMTP id s133mr431033oif.222.1500400245920; Tue, 18 Jul 2017 10:50:45 -0700 (PDT) Original-Received: by 10.74.113.91 with HTTP; Tue, 18 Jul 2017 10:50:45 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: ntQmwI5wtBsS0wAQPxAbGWcuFMI X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216854 Archived-At: On Tue, Jul 18, 2017 at 1:28 PM, Stefan Monnier wrote: >>>> + ;; Update `this-command' and run `pre-command-hook' so that >>>> + ;; things like `delete-selection-pre-hook' will work correctly. >>>> + (setq this-command cmd) >>>> + (run-hooks 'pre-command-hook) >>>> ;; mouse-major-mode-menu was using `command-execute' instead. >>>> (call-interactively cmd)))) >>> >>> Hmm... shouldn't it then also run post-command-hook, and set >>> last-command (and probably a few more of the things done in the usual >>> command loop, such as handling undo-boundaries)? > >> I'm not sure, won't we end up with 1 1/2 of the command stuff done in >> that case? (the half being the popup-menu we began executing to get >> here). > > AFAICT the current case is the one that ends up with 1=C2=BD done. > What I suggest is to bring it back to a whole number (i.e. 2). Right, I got mixed up. Actually, now that I think more on this, could `popup-menu' behave more like `universal-argument' (apart from actually setting any prefix arg)? It feels kind of prefixy.