From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel 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 Message-ID: References: <20170719.121817.1770061592165445558.tkk@misasa.okayama-u.ac.jp> <20170720.091454.2073526586086847652.tkk@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1500510537 31919 195.159.176.226 (20 Jul 2017 00:28:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 00:28:57 +0000 (UTC) Cc: Stefan Monnier , Emacs developers To: Tak Kunihiro Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 20 02:28:51 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 1dXzKk-0007vT-E3 for ged-emacs-devel@m.gmane.org; Thu, 20 Jul 2017 02:28:50 +0200 Original-Received: from localhost ([::1]:35505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXzKp-0008AQ-Ia for ged-emacs-devel@m.gmane.org; Wed, 19 Jul 2017 20:28:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXzKg-00089d-UG for emacs-devel@gnu.org; Wed, 19 Jul 2017 20:28:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXzKf-0001no-L7 for emacs-devel@gnu.org; Wed, 19 Jul 2017 20:28:46 -0400 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:33534) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXzKf-0001nC-Fp for emacs-devel@gnu.org; Wed, 19 Jul 2017 20:28:45 -0400 Original-Received: by mail-oi0-x235.google.com with SMTP id p188so14948600oia.0 for ; Wed, 19 Jul 2017 17:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xNqH4nI98emmI+ipfK91PXJqpGNxODZRTMEV4ghtsZc=; b=l6Myh4cz9R9Av1qw6PGNbja4SKo79/cNYYiSrMAS3Gp9lHlzsJRfH2Z4mdm5fLdBSl tzvM+95laX6bDnAAr3dohod7/ZSQ3uVTqaxhVn7LlyE+0KHBymrt9DMnI8pLH1I0vTXR Yc4f+sL051V2fQOLbUZHK788FcoNDl5ZZGnf42ZaCBixg+rKFfim/+wJup0o04JQDGOB RKWFJqMVk9J6H0YBTe2jI0H710oKMS/c7LWJnF4Mpkrik52LER3YDt+/dPLkkofSqvFG +Ws6/SkqD/rUytV73J25RDC0tUbJodux6EowwT5p9tZRGaJdGfEV32jD7OuvPME1uRN+ qW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xNqH4nI98emmI+ipfK91PXJqpGNxODZRTMEV4ghtsZc=; b=LOY4CG8Kq3q1R1fdfo++gmUhSPFHeM6yqmeKYRwWlgfuUq8CpSlhVjjFYzAKovpgXm 7VhEbzWILLvq0Gz4pE4mw6mVl2ReDjH9kZ5K/oGoB2zN1iugZ38kJ4dLKNK88QSVi2aE rpcTybVcWMH9uVMYtr/xxpljI62ChyWOZmH+kgtAYkJyzDGCX/C6HFMT4M20AW/Fwwzy Am4hNURN/WVrFf1sc53iVhu3KsJJMAbsFbJ/6IkP8zcz8v9oVEqZwkpAN3r69zANKCua swMMrDlsPHdky8Agb/htJZqsvQgXahbzhbFFAyYzUOFMZ1Ikprome5YARls6khbEEfnI awMw== X-Gm-Message-State: AIVw110Ho9JoOjUVOS7XwJSN+h2Bu5NmxxG6NJb/4l4mpsm3C0T9p6l2 t7t7GZGRTcpI2HpLu3c/GFzdJ87gXmxn X-Received: by 10.202.230.212 with SMTP id d203mr3830670oih.143.1500510524788; Wed, 19 Jul 2017 17:28:44 -0700 (PDT) Original-Received: by 10.74.113.91 with HTTP; Wed, 19 Jul 2017 17:28:43 -0700 (PDT) In-Reply-To: <20170720.091454.2073526586086847652.tkk@misasa.okayama-u.ac.jp> X-Google-Sender-Auth: zoqVmbtktn-HI1yY_geWxRGW4kA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::235 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:216883 Archived-At: On Wed, Jul 19, 2017 at 8:14 PM, Tak Kunihiro 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))