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, 07 Oct 2017 17:31:36 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507390394 29785 195.159.176.226 (7 Oct 2017 15:33:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Oct 2017 15:33:14 +0000 (UTC) To: 28732@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 07 17:33:10 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 1e0r69-0006pO-TR for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Oct 2017 17:33:06 +0200 Original-Received: from localhost ([::1]:50118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0r6H-0008JZ-DY for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Oct 2017 11:33:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0r6B-0008JH-Rv for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0r67-0004W4-Qk for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:33:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0r67-0004W0-NN for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0r67-0003ct-Ed for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:33:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2017 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28732 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150739033213865 (code B ref -1); Sat, 07 Oct 2017 15:33:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2017 15:32:12 +0000 Original-Received: from localhost ([127.0.0.1]:54858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0r5I-0003bZ-5Y for submit@debbugs.gnu.org; Sat, 07 Oct 2017 11:32:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0r5H-0003bN-AU for submit@debbugs.gnu.org; Sat, 07 Oct 2017 11:32:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0r5B-00043L-9u for submit@debbugs.gnu.org; Sat, 07 Oct 2017 11:32:06 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e0r5B-00043H-6p for submit@debbugs.gnu.org; Sat, 07 Oct 2017 11:32:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0r5A-0008Ds-3n for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:32:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0r56-0003w6-31 for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:32:04 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:54603) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e0r55-0003rD-Qc for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 11:32:00 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id A960A22568 for ; Sat, 7 Oct 2017 15:25:16 +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= subject:subject:to:from:from:message-id:date:date; s=dkim; t= 1507389915; x=1508253916; bh=dU9SHwind3PBTIGizzREbc5pD4cPQQehFwb 55rxDmRE=; b=HhUZQYJHZul/W+Pxg38Zsd7cURalzxWtvX2kTKPWrzW79sOL+K/ XQ08MDD8QpVT5v6PbKRoCMOLW+cwcmNBodwK5FY9cX/YGMGYmKEwB4dPrj378rgr hAqe0Z4UtLzSHMYht2sx8OEXGdGVn9W6QS+p9+UxirB5QP2XCKb2SDjE= 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 c1sd86rCeFP2 for ; Sat, 7 Oct 2017 15:25:15 +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 43F892255D for ; Sat, 7 Oct 2017 15:25:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:138054 Archived-At: 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 "[")