From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#19547: Patch for this bug Date: Sun, 27 Nov 2016 18:59:37 +0100 Message-ID: <87r35wx0qe.fsf@gmail.com> References: <874ms03qj1.fsf@web.de> <8360nxhfiw.fsf@gnu.org> <83k2ccfnh8.fsf@gnu.org> <83wpgbdy82.fsf@gnu.org> <87y4071o5k.fsf@gmail.com> <83h96u3d07.fsf@gnu.org> <87zikl8leb.fsf@gmail.com> <871sxxj9s8.fsf@users.sourceforge.net> <87twat6kjd.fsf@gmail.com> <834m2s2a0d.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1480269618 10964 195.159.176.226 (27 Nov 2016 18:00:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2016 18:00:18 +0000 (UTC) User-Agent: mu4e 0.9.17; emacs 24.5.1 Cc: npostavs@users.sourceforge.net, 19547@debbugs.gnu.org, rrt@sc3d.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 27 19:00:14 2016 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 1cB3kL-0001us-Dx for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Nov 2016 19:00:13 +0100 Original-Received: from localhost ([::1]:55066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cB3kP-0008VG-3h for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Nov 2016 13:00:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cB3kF-0008TU-Dh for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 13:00:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cB3kB-0006bW-D8 for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 13:00:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56637) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cB3kB-0006b8-9h for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 13:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cB3kB-0004N1-0N for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 13:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Nov 2016 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19547-submit@debbugs.gnu.org id=B19547.148026958816745 (code B ref 19547); Sun, 27 Nov 2016 18:00:02 +0000 Original-Received: (at 19547) by debbugs.gnu.org; 27 Nov 2016 17:59:48 +0000 Original-Received: from localhost ([127.0.0.1]:43803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cB3jw-0004M0-7p for submit@debbugs.gnu.org; Sun, 27 Nov 2016 12:59:48 -0500 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:35745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cB3jv-0004Lp-6q for 19547@debbugs.gnu.org; Sun, 27 Nov 2016 12:59:47 -0500 Original-Received: by mail-wm0-f48.google.com with SMTP id a197so185632320wmd.0 for <19547@debbugs.gnu.org>; Sun, 27 Nov 2016 09:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=yh20OE72HWOiGOTw9p8BBgneb5zb4N546NV5iMzrUBU=; b=fpg08NY5pJDWTvIe6eiAokq2lGPKq34etlRQ97DKAlTHy7oktkNpumPFY09+WO1lmP kudLd9NQ6LklukO0uiTihSN6YSpuNh74O27cB6aVEDp7uM1OrjOoyWVER9GfUlO9tIzd AeHDMGWT1NWF3OejMTAY1IKEMYuh7y8wq3TWkvNfAosINyQwgGKzXIrAllYPwZxc8CRj JHrVAeoHfHl4u46QwlZYqHCQKR7GS3owaDpK6Gun+guTXKiqRuQ34LYLPJ2exk8+F6Mh JqCvltmC9SL1RGeo1j4TFC8V2mrttB760e2PesjTR2QeaH8OCWbshz7UjOcdtuPeNCOY ia0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=yh20OE72HWOiGOTw9p8BBgneb5zb4N546NV5iMzrUBU=; b=j81UGiCGydWWc0jWlyYMAhYusAVdCF4QdrBEo+/Ivr6GD2dbvUvhkAm+BbBuVFH150 dej6iezCxD3SSxNd9COllyrosjKZu1uKQNXWLhblO24YNwO57LXP0ZaPEQJP0gVirQyd EOG/cfm5pkBV+7gCAVksU2rGoKxII9hHU8TgQKqHp2KbFJc/ZgF4I4saLkcVNIM7FTYk saVrgvSqnnPvd8V4FiyuJ8/9VPfjagfLql3SoYOk2vcJjdVA/cbANCIWkTRNFP/FRqyx WZ7pGZnEDpoW6LTV9gb8dIBlu1rBsj4sTqNIDFBqLi8HIylyWmAsLHmoVSbkf4l89iNY eM6Q== X-Gm-Message-State: AKaTC025KlXwGMgpybMkDPt2gOOWO5/qD75gnxb7QFH/ygDUSIBZZQdMB6RX0mL07QTjYw== X-Received: by 10.28.105.78 with SMTP id e75mr17309569wmc.55.1480269581288; Sun, 27 Nov 2016 09:59:41 -0800 (PST) Original-Received: from dell-14z ([37.167.8.218]) by smtp.gmail.com with ESMTPSA id pd2sm58153958wjb.31.2016.11.27.09.59.39 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 27 Nov 2016 09:59:40 -0800 (PST) In-reply-to: <834m2s2a0d.fsf@gnu.org> 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:126175 Archived-At: Eli Zaretskii writes: > In addition to using 'break', you need to initialize ignore_event with > some value, otherwise it will hold garbage, which could accidentally > be one of the values you want to filter. Alternatively, add a > 'default' case to the switch. Is Qnil ok as default value ? > I'd suggest to use Flist instead, it should be closer to Lisp (if you > want to do this from C). Didn't succeed with Flist: keyboard.c:11842:5: error: too many arguments to function ‘Flist’ = Flist (Qfocus_in, Qfocus_out, Qhelp, Qiconify, Qdeiconify, Qselection_request) ^ >> I wondered also if instead the variable could be feeded from lisp as >> suggested by Eli, but I don't know yet where is the good place for this >> and how. > > Something like simple.el should be fine. I would prefer setting the variable from lisp. ok for simple.el, but what is the recommended way for setting it (I don't think throwing a (setq while-no-input-ignore-events [...]) anywhere in simple.el is the way to do) ? Also on my laptop with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) I have no warnings, but on an other computer with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4), I have these warnings (but it compiled fine): keyboard.c: In function ‘kbd_buffer_store_buffered_event’: keyboard.c:3572:3: warning: enumeration value ‘NO_EVENT’ not handled in switch [-Wswitch] switch (event->kind) ^ keyboard.c:3572:3: warning: enumeration value ‘ASCII_KEYSTROKE_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘MULTIBYTE_CHAR_KEYSTROKE_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘NON_ASCII_KEYSTROKE_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘TIMER_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘MOUSE_CLICK_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘WHEEL_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘HORIZ_WHEEL_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘SCROLL_BAR_CLICK_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘HORIZONTAL_SCROLL_BAR_CLICK_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘SELECTION_CLEAR_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘BUFFER_SWITCH_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘DELETE_WINDOW_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘MENU_BAR_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘MENU_BAR_ACTIVATE_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘DRAG_N_DROP_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘USER_SIGNAL_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘TOOL_BAR_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘SELECT_WINDOW_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘SAVE_SESSION_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘GPM_CLICK_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘DBUS_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘CONFIG_CHANGED_EVENT’ not handled in switch [-Wswitch] keyboard.c:3572:3: warning: enumeration value ‘FILE_NOTIFY_EVENT’ not handled in switch [-Wswitch] keyboard.c:3585:11: warning: ‘ignore_event’ may be used uninitialized in this function [-Wmaybe-uninitialized] && !NILP (Fmemq (ignore_event, Vwhile_no_input_ignore_events))) ^ What can I do to avoid this ? Or should I just ignore this ? Thanks. -- Thierry