|
From: | Stefan Monnier |
Subject: | Re: [Emacs-diffs] master a2ee819: Let delete-selection-mode work with popup-menu commands (Bug#27569) |
Date: | Tue, 18 Jul 2017 13:28:18 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>>> + ;; 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½ done. What I suggest is to bring it back to a whole number (i.e. 2). Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |