diff options
| author | Alan Mackenzie | 2017-02-12 10:59:03 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2017-02-12 10:59:03 +0000 |
| commit | f4d5b687150810129b7a1d5b006e31ccf82b691b (patch) | |
| tree | 4229b13800349032697daae3904dc3773e6b7a80 /src/gfilenotify.c | |
| parent | d5514332d4a6092673ce1f78fadcae0c57f7be64 (diff) | |
| parent | 148100d98319499f0ac6f57b8be08cbd14884a5c (diff) | |
| download | emacs-comment-cache.tar.gz emacs-comment-cache.zip | |
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'src/gfilenotify.c')
| -rw-r--r-- | src/gfilenotify.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 6ec5c642825..285a253733d 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c | |||
| @@ -178,20 +178,18 @@ will be reported only in case of the `moved' event. */) | |||
| 178 | if (NILP (Ffile_exists_p (file))) | 178 | if (NILP (Ffile_exists_p (file))) |
| 179 | report_file_error ("File does not exist", file); | 179 | report_file_error ("File does not exist", file); |
| 180 | 180 | ||
| 181 | CHECK_LIST (flags); | ||
| 182 | |||
| 183 | if (!FUNCTIONP (callback)) | 181 | if (!FUNCTIONP (callback)) |
| 184 | wrong_type_argument (Qinvalid_function, callback); | 182 | wrong_type_argument (Qinvalid_function, callback); |
| 185 | 183 | ||
| 186 | /* Create GFile name. */ | ||
| 187 | gfile = g_file_new_for_path (SSDATA (ENCODE_FILE (file))); | ||
| 188 | |||
| 189 | /* Assemble flags. */ | 184 | /* Assemble flags. */ |
| 190 | if (!NILP (Fmember (Qwatch_mounts, flags))) | 185 | if (!NILP (Fmember (Qwatch_mounts, flags))) |
| 191 | gflags |= G_FILE_MONITOR_WATCH_MOUNTS; | 186 | gflags |= G_FILE_MONITOR_WATCH_MOUNTS; |
| 192 | if (!NILP (Fmember (Qsend_moved, flags))) | 187 | if (!NILP (Fmember (Qsend_moved, flags))) |
| 193 | gflags |= G_FILE_MONITOR_SEND_MOVED; | 188 | gflags |= G_FILE_MONITOR_SEND_MOVED; |
| 194 | 189 | ||
| 190 | /* Create GFile name. */ | ||
| 191 | gfile = g_file_new_for_path (SSDATA (ENCODE_FILE (file))); | ||
| 192 | |||
| 195 | /* Enable watch. */ | 193 | /* Enable watch. */ |
| 196 | monitor = g_file_monitor (gfile, gflags, NULL, &gerror); | 194 | monitor = g_file_monitor (gfile, gflags, NULL, &gerror); |
| 197 | g_object_unref (gfile); | 195 | g_object_unref (gfile); |