diff options
| author | Michael Albinus | 2015-09-13 21:16:40 +0200 |
|---|---|---|
| committer | Michael Albinus | 2015-09-13 21:16:40 +0200 |
| commit | f6f92e87692c22840deee068408a418d6e04b7e3 (patch) | |
| tree | 7b0cf2b60232df1e72af3b153587cba340584c2e /src | |
| parent | a85472bbdcd16b0a695cd75f98b68ee39b86ae2f (diff) | |
| download | emacs-f6f92e87692c22840deee068408a418d6e04b7e3.tar.gz emacs-f6f92e87692c22840deee068408a418d6e04b7e3.zip | |
Introduce `file-notify-valid-p'
* lisp/filenotify.el (file-notify-valid-p): New defun.
(gfile-valid-p, w32notify-valid-p): Make them an alias to `identity'.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist)
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist)
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
<file-notify-valid-p>: Add handler.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-notify-valid-p'.
(tramp-handle-file-notify-valid-p): New defun.
* src/inotify.c (Finotify_valid_p): New defun.
(syms_of_inotify): Declare Sinotify_valid_p.
Diffstat (limited to 'src')
| -rw-r--r-- | src/inotify.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/inotify.c b/src/inotify.c index eddad73e8f7..b73e8733829 100644 --- a/src/inotify.c +++ b/src/inotify.c | |||
| @@ -367,6 +367,16 @@ See inotify_rm_watch(2) for more information. | |||
| 367 | return Qt; | 367 | return Qt; |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | DEFUN ("inotify-valid-p", Finotify_valid_p, Sinotify_valid_p, 1, 1, 0, | ||
| 371 | doc: /* "Check a watch specified by its WATCH-DESCRIPTOR. | ||
| 372 | |||
| 373 | WATCH-DESCRIPTOR should be an object returned by `inotify-add-watch'. */) | ||
| 374 | (Lisp_Object watch_descriptor) | ||
| 375 | { | ||
| 376 | Lisp_Object watch_object = Fassoc (watch_descriptor, watch_list); | ||
| 377 | return NILP (watch_object) ? Qnil : Qt; | ||
| 378 | } | ||
| 379 | |||
| 370 | void | 380 | void |
| 371 | syms_of_inotify (void) | 381 | syms_of_inotify (void) |
| 372 | { | 382 | { |
| @@ -401,6 +411,7 @@ syms_of_inotify (void) | |||
| 401 | 411 | ||
| 402 | defsubr (&Sinotify_add_watch); | 412 | defsubr (&Sinotify_add_watch); |
| 403 | defsubr (&Sinotify_rm_watch); | 413 | defsubr (&Sinotify_rm_watch); |
| 414 | defsubr (&Sinotify_valid_p); | ||
| 404 | 415 | ||
| 405 | staticpro (&watch_list); | 416 | staticpro (&watch_list); |
| 406 | 417 | ||