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: Wed, 19 Jul 2017 20:28:43 -0400

On Wed, Jul 19, 2017 at 8:14 PM, Tak Kunihiro
<address@hidden> wrote:
>>
>> (define-key global-map [mouse-3]
>>   `(menu-item "Edit menu" my-edit-map
>>           :filter ,(lambda (_) (my-edit-map (aref (this-command-keys) 0)))))
>> ;; delete-selection now works correctly with yank invoked via the mouse-3 
>> menu
>> (delete-selection-mode +1)
>
> I want to call flyspell-correct-word when word under event is
> flyspell-incorrect (mouse-2 is too hard to access).  When not, then
> the dynamic edit menu.

I don't have flyspell working here to test this properly, but
shouldn't something like this work:

(defun my-edit-map (event)
  (if (get-text-property (posn-point (event-start event))
             'flyspell-incorrect)
      #'flyspell-correct-word
  menu-bar-edit-menu))



reply via email to

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