From: Paul Eggert Date: Fri, 31 Mar 2017 00:47:58 +0000 (-0700) Subject: * src/inotify.c (add_watch): Add comment. X-Git-Tag: emacs-26.0.90~522^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a8ae233d1bdf538a99233e52f0d7dd0975df2d1;p=emacs.git * src/inotify.c (add_watch): Add comment. --- diff --git a/src/inotify.c b/src/inotify.c index a0a89aa0f41..290701349ef 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -227,6 +227,9 @@ add_watch (int wd, Lisp_Object filename, emacs_abort (); } + /* Insert the newly-assigned ID into the previously-discovered gap, + which is possibly at the end of the list. Inserting it there + keeps the list sorted. */ watch_id = make_number (id); watch = list4 (watch_id, filename, callback, mask); XSETCDR (tail, Fcons (watch, XCDR (tail)));