emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master a2ee819: Let delete-selection-mode work with po


From: Noam Postavsky
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

On Tue, Jul 18, 2017 at 1:28 PM, Stefan Monnier
<address@hidden> 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½ 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]