all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: npostavs@users.sourceforge.net, 19547@debbugs.gnu.org, rrt@sc3d.org
Subject: bug#19547: Patch for this bug
Date: Sun, 27 Nov 2016 18:59:37 +0100	[thread overview]
Message-ID: <87r35wx0qe.fsf@gmail.com> (raw)
In-Reply-To: <834m2s2a0d.fsf@gnu.org>


Eli Zaretskii <eliz@gnu.org> 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





  reply	other threads:[~2016-11-27 17:59 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 15:46 bug#19547: 25.0.50; throw-on-input "fires" when switching workspace Michael Heerdegen
2015-01-09 19:59 ` Eli Zaretskii
2015-01-09 21:48   ` Michael Heerdegen
2015-01-10  9:14     ` Eli Zaretskii
2015-01-09 23:33 ` Stefan Monnier
2015-01-10  0:00   ` Michael Heerdegen
2015-01-10  1:26     ` Michael Heerdegen
2015-01-10  9:12       ` Eli Zaretskii
2015-01-10 22:24         ` Michael Heerdegen
2015-01-11  1:47           ` Stefan Monnier
2015-01-20  2:46             ` Michael Heerdegen
2015-01-20  3:43               ` Eli Zaretskii
2015-01-29 19:59                 ` Michael Heerdegen
2015-01-31  8:38                   ` Eli Zaretskii
2015-02-01 14:25                     ` Michael Heerdegen
2015-02-01 15:54                       ` Eli Zaretskii
2015-02-01 17:21                         ` Michael Heerdegen
2015-02-01 17:35                           ` Eli Zaretskii
2015-10-13 10:50                             ` Michael Heerdegen
2015-12-10 20:14                               ` John Wiegley
2015-12-10 22:05                                 ` Michael Heerdegen
2015-12-10 23:01                                   ` John Wiegley
     [not found]                                     ` <83fuz98gre.fsf@gnu.org>
2015-12-11 10:17                                       ` Thierry Volpiatto
     [not found]                                         ` <838u518d32.fsf@gnu.org>
2015-12-11 14:22                                           ` Michael Heerdegen
     [not found]                                             ` <83r3it6m5u.fsf@gnu.org>
2015-12-26  0:37                                               ` Michael Heerdegen
2015-12-26 10:01                                                 ` Eli Zaretskii
2015-01-10  9:18     ` Eli Zaretskii
2016-11-08 18:28 ` bug#19547: Patch for this bug Reuben Thomas
2016-11-08 20:40   ` Eli Zaretskii
2016-11-08 22:20     ` Reuben Thomas
2016-11-09 19:43       ` Eli Zaretskii
2016-11-09 22:03         ` Reuben Thomas
2016-11-10 17:46           ` Eli Zaretskii
2016-11-25 17:10             ` Thierry Volpiatto
2016-11-26  7:40               ` Eli Zaretskii
2016-11-26  8:39                 ` Andreas Schwab
2016-11-26  9:02                   ` Eli Zaretskii
2016-11-26 18:50                 ` Thierry Volpiatto
2016-11-27  6:52                 ` Thierry Volpiatto
2016-11-27 14:07                   ` npostavs
2016-11-27 14:53                     ` Thierry Volpiatto
2016-11-27 15:54                       ` Eli Zaretskii
2016-11-27 17:59                         ` Thierry Volpiatto [this message]
2016-11-27 18:40                           ` Eli Zaretskii
2016-11-27 19:03                             ` Thierry Volpiatto
2016-11-27 19:39                               ` Eli Zaretskii
2016-11-27 19:54                                 ` Thierry Volpiatto
2016-11-27 20:06                                   ` Eli Zaretskii
2016-11-27 20:53                                     ` Thierry Volpiatto
2016-11-30 20:27                                     ` Thierry Volpiatto
2016-12-01  3:28                                       ` Eli Zaretskii
2017-06-11 22:03                                         ` npostavs
2016-11-27 18:42                           ` npostavs
2016-11-27 19:08                             ` Thierry Volpiatto
2016-11-27  7:16                 ` Thierry Volpiatto
2016-11-27 18:05               ` Reuben Thomas
2016-11-27 18:29                 ` Thierry Volpiatto
2016-11-27 21:10                   ` Johan Bockgård
2016-11-28  6:00                     ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r35wx0qe.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=19547@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=npostavs@users.sourceforge.net \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.