summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/inotify.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0a2af0472a9..c8bf63fe462 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-11 Michael Albinus <michael.albinus@gmx.de>
+
+ * inotify.c (inotify_callback): Generate an Emacs event for every
+ incoming inotify event.
+
2012-12-11 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (handle_face_prop): Fix logic of computing
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);
}