bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27569: delete-selection on yank via popup-menu


From: Tak Kunihiro
Subject: bug#27569: delete-selection on yank via popup-menu
Date: Tue, 18 Jul 2017 13:35:07 +0900 (JST)

The patch works well in my computer.  Is it time to push?

> tags 27569 + patch
> quit
>
> Tak Kunihiro <address@hidden> writes:
>
>> Could you push to the master?
>
> Okay, I'll wait a couple more days and then push the following (I think
> doing setq on this-command makes more sense than let-binding after all).
>
> * lisp/menu-bar.el (popup-menu): Run `pre-command-hook' with
> `this-command' set to the selected command.
> ---
>  lisp/menu-bar.el | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
> index 9c7bcffbaa..107043b501 100644
> --- a/lisp/menu-bar.el
> +++ b/lisp/menu-bar.el
> @@ -2360,6 +2360,10 @@ (defun popup-menu (menu &optional position prefix 
> from-menu-bar)
>        ;; `setup-specified-language-environment', for instance,
>        ;; expects this to be set from a menu keymap.
>        (setq last-command-event (car (last event)))
> +      ;; Update `this-command' and run `pre-command-hook' so that
> +      ;; things like `delete-selection-pre-hook' will work correctly.
> +      (setq this-command cmd)
> +      (run-hook 'pre-command-hook)
>        ;; mouse-major-mode-menu was using `command-execute' instead.
>        (call-interactively cmd))))
>
> --
> 2.11.1





reply via email to

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