aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Albinus2012-12-11 17:29:13 +0100
committerMichael Albinus2012-12-11 17:29:13 +0100
commit38e791fdf78ef0f18e26c3866aa20e11c70cf6cb (patch)
tree0ddb5591a35b9b36c818bd874bc339089b1c8808 /src
parentf9d1448f46d3d645e68fdd449758b50a1402d729 (diff)
downloademacs-38e791fdf78ef0f18e26c3866aa20e11c70cf6cb.tar.gz
emacs-38e791fdf78ef0f18e26c3866aa20e11c70cf6cb.zip
* inotify.c (inotify_callback): Generate an Emacs event for every
incoming inotify event.
Diffstat (limited to 'src')
-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 @@
12012-12-11 Michael Albinus <michael.albinus@gmx.de>
2
3 * inotify.c (inotify_callback): Generate an Emacs event for every
4 incoming inotify event.
5
12012-12-11 Eli Zaretskii <eliz@gnu.org> 62012-12-11 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xdisp.c (handle_face_prop): Fix logic of computing 8 * 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 *_)
172 172
173 EVENT_INIT (event); 173 EVENT_INIT (event);
174 event.kind = FILE_NOTIFY_EVENT; 174 event.kind = FILE_NOTIFY_EVENT;
175 event.arg = Qnil;
176 175
177 i = 0; 176 i = 0;
178 while (i < (size_t)n) 177 while (i < (size_t)n)
@@ -187,14 +186,14 @@ inotify_callback (int fd, void *_)
187 /* If event was removed automatically: Drop it from watch list. */ 186 /* If event was removed automatically: Drop it from watch list. */
188 if (ev->mask & IN_IGNORED) 187 if (ev->mask & IN_IGNORED)
189 watch_list = Fdelete (watch_object, watch_list); 188 watch_list = Fdelete (watch_object, watch_list);
189
190 if (!NILP (event.arg))
191 kbd_buffer_store_event (&event);
190 } 192 }
191 193
192 i += sizeof (*ev) + ev->len; 194 i += sizeof (*ev) + ev->len;
193 } 195 }
194 196
195 if (!NILP (event.arg))
196 kbd_buffer_store_event (&event);
197
198 xfree (buffer); 197 xfree (buffer);
199} 198}
200 199