]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/inotify.c (add_watch): Add comment.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 31 Mar 2017 00:47:58 +0000 (17:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 31 Mar 2017 00:48:20 +0000 (17:48 -0700)
src/inotify.c

index a0a89aa0f417404ec4b82512c781fe3dd8247749..290701349ef1af4665eece8de4a1f689bdca4751 100644 (file)
@@ -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)));