summaryrefslogtreecommitdiff
path: root/src/inotify.c
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2012-12-11 17:29:13 +0100
committerMichael Albinus <michael.albinus@gmx.de>2012-12-11 17:29:13 +0100
commit38e791fdf78ef0f18e26c3866aa20e11c70cf6cb (patch)
tree0ddb5591a35b9b36c818bd874bc339089b1c8808 /src/inotify.c
parentf9d1448f46d3d645e68fdd449758b50a1402d729 (diff)
downloademacs-38e791fdf78ef0f18e26c3866aa20e11c70cf6cb.tar.gz
* inotify.c (inotify_callback): Generate an Emacs event for every
incoming inotify event.
Diffstat (limited to 'src/inotify.c')
-rw-r--r--src/inotify.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/inotify.c b/src/inotify.c
index 17104c89064..8a52c27985c 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -172,7 +172,6 @@ inotify_callback (int fd, void *_)
EVENT_INIT (event);
event.kind = FILE_NOTIFY_EVENT;
- event.arg = Qnil;
i = 0;
while (i < (size_t)n)
@@ -187,14 +186,14 @@ inotify_callback (int fd, void *_)
/* If event was removed automatically: Drop it from watch list. */
if (ev->mask & IN_IGNORED)
watch_list = Fdelete (watch_object, watch_list);
+
+ if (!NILP (event.arg))
+ kbd_buffer_store_event (&event);
}
i += sizeof (*ev) + ev->len;
}
- if (!NILP (event.arg))
- kbd_buffer_store_event (&event);
-
xfree (buffer);
}