From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier 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 09:41:42 -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 X-Trace: blaine.gmane.org 1500386071 15885 195.159.176.226 (18 Jul 2017 13:54:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Jul 2017 13:54:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Noam Postavsky To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 18 15:54:25 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 1dXSxB-0003gy-Lo for ged-emacs-devel@m.gmane.org; Tue, 18 Jul 2017 15:54:21 +0200 Original-Received: from localhost ([::1]:56644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXSxH-000336-A5 for ged-emacs-devel@m.gmane.org; Tue, 18 Jul 2017 09:54:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXSl5-0000NK-DS for emacs-devel@gnu.org; Tue, 18 Jul 2017 09:41:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXSl0-0007bO-Fk for emacs-devel@gnu.org; Tue, 18 Jul 2017 09:41:51 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:60345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXSl0-0007aq-88 for emacs-devel@gnu.org; Tue, 18 Jul 2017 09:41:46 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v6IDfhT4018030; Tue, 18 Jul 2017 09:41:43 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C6955661EE; Tue, 18 Jul 2017 09:41:42 -0400 (EDT) In-Reply-To: <20170718103952.4E6F720E35@vcs0.savannah.gnu.org> (Noam Postavsky's message of "Tue, 18 Jul 2017 06:39:51 -0400 (EDT)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6074=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6074> : inlines <5979> : streams <1754723> : uri <2465280> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:216828 Archived-At: > + ;; 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)? IOW, we should move the C code which runs the commands from the command loop and make it available to Elisp. Stefan