From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#28732: flymake mouse-wheel portability fix Date: Sat, 21 Oct 2017 15:06:28 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1508591239 10217 195.159.176.226 (21 Oct 2017 13:07:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Oct 2017 13:07:19 +0000 (UTC) To: 28732-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 21 15:07:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1e5tUZ-0001Ow-Fx for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Oct 2017 15:07:07 +0200 Original-Received: from localhost ([::1]:57838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5tUg-0001jZ-Pf for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Oct 2017 09:07:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5tUX-0001i8-AB for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 09:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5tUU-0004WX-5b for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 09:07:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5tUU-0004WN-1M for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 09:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5tUT-0006Md-RX for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 09:07:01 -0400 Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Oct 2017 13:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 28732 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 28732@debbugs.gnu.org, charles@aurox.ch, charles@aurox.ch Original-Received: via spool by 28732-done@debbugs.gnu.org id=D28732.150859117624401 (code D ref 28732); Sat, 21 Oct 2017 13:07:01 +0000 Original-Received: (at 28732-done) by debbugs.gnu.org; 21 Oct 2017 13:06:16 +0000 Original-Received: from localhost ([127.0.0.1]:53157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5tTk-0006LV-CR for submit@debbugs.gnu.org; Sat, 21 Oct 2017 09:06:16 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:58055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5tTi-0006LE-Qc for 28732-done@debbugs.gnu.org; Sat, 21 Oct 2017 09:06:15 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 0A82922585 for <28732-done@debbugs.gnu.org>; Sat, 21 Oct 2017 12:59:21 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1508590759; x=1509454760; bh=au/DnvUIEqZm1 f5cmGTY4Ebnh35uaM+qTqi7D+m2Fl8=; b=XWYo59bl001ytNpgr2wQnbammV3mD XbGmzUtm9xxsZ9u3hIzW3VkbrhZn916BVia1FZFNh49e95nhOpJ+PPM3FklDoLSP uC5vzJlD5u9NnX3nnKztdkHVi3ealYXa7iuXD/UptZUWmBUd77XK6xigVntFKLK4 mHIlBR/xiU10zc= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QjuX5_CjTS6s for <28732-done@debbugs.gnu.org>; Sat, 21 Oct 2017 12:59:19 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 85DF222564 for <28732-done@debbugs.gnu.org>; Sat, 21 Oct 2017 12:59:17 +0000 (UTC) In-reply-to: (charles@aurox.ch) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138814 Archived-At: > Date: Sat, 07 Oct 2017 17:31:36 +0200 > From: charles@aurox.ch (Charles A. Roelli) > > The flymake mode line mouse-wheel scroll thing needs the following fix > to be more portable. > > This change also removes an extra newline at the end of the tooltip, > which doesn't have to be there as far as I can see. > > diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el > index 45f0adf..007de8f 100644 > --- a/lisp/progmodes/flymake.el > +++ b/lisp/progmodes/flymake.el > @@ -951,11 +951,13 @@ flymake--mode-line-format > keymap > ,(let ((map (make-sparse-keymap)) > (type type)) > - (define-key map [mode-line mouse-4] > + (define-key map (vector 'mode-line > + mouse-wheel-down-event) > (lambda (_event) > (interactive "e") > (flymake-goto-prev-error 1 (list type) t))) > - (define-key map [mode-line mouse-5] > + (define-key map (vector 'mode-line > + mouse-wheel-up-event) > (lambda (_event) > (interactive "e") > (flymake-goto-next-error 1 (list type) t))) > @@ -967,7 +969,9 @@ flymake--mode-line-format > 'face face) > (propertize (format "%s" type) > 'face face)) > - "mouse-4/mouse-5: previous/next of this type\n")) > + (format "%s/%s: previous/next of this type" > + mouse-wheel-down-event > + mouse-wheel-up-event))) > into forms > finally return > `((:propertize "[") It's pushed, closing. commit 75bb4827637111a210c79583f45dd1c5d59a745f Date: Sat Oct 21 14:56:59 2017 +0200 Make flymake's mouse-wheel interaction portable (Bug#28732) * lisp/progmodes/flymake.el (flymake--mode-line-format): Bind 'mouse-wheel-down-event' and 'mouse-wheel-up-event' instead of 'mouse-4' and 'mouse-5'. Update the tooltip text accordingly, and remove a stray newline in it.