1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00
Commit Graph

65 Commits

Author SHA1 Message Date
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Michael Albinus
6da19c5244 Distinguish different file notification events
* lisp/filenotify.el (file-notify--watch): Add docstring.
(file-notify-descriptors, file-notify--rm-descriptor)
(file-notify--pending-rename): Adapt docstring.
(file-notify): New defstruct.
(file-notify-handle-event): Rename argument to OBJECT.  Use
accessor functions of the defstruct.
2019-07-31 21:22:05 +02:00
Mattias Engdegård
084e8381a7 Use destructuring in filenotify backend handlers
* lisp/filenotify.el (file-notify--callback-inotify)
(file-notify--callback-kqueue, file-notify--callback-w32notify)
(file-notify--callback-gfilenotify, file-notify--callback): Use cl-defun.
2019-07-24 11:54:10 +02:00
Mattias Engdegård
27f25d737c Use defstruct instead of list for filenotify pending-rename
* lisp/filenotify.el (file-notify--rename): New defstruct.
(file-notify--pending-rename): Changed type.
(file-notify--handle-event): Adapt to new type.
2019-07-24 11:53:58 +02:00
Mattias Engdegård
5a80a9ded1 Refactor the callback half of filenotify.el
Split callback code into backend-specific and general parts.  Refactor
pending event, which is always a rename, to include relevant
information only.  General clean-up.

* lisp/filenotify.el (file-notify--pending-event): Rename.
(file-notify--event-watched-file, file-notify--event-file-name)
(file-notify--event-file1-name, file-notify--event-cookie): Remove.
(file-notify--rename, file-notify--expand-file-name)
(file-notify--callback-inotify, file-notify--callback-kqueue)
(file-notify--callback-w32notify, file-notify--callback-gfilenotify)
(file-notify--call-handler, file-notify--handle-event): New.
(file-notify-callback): Split general parts into
file-notify--call-handler and file-notify--handle-event.
(file-notify--add-watch-inotify, file-notify--add-watch-kqueue)
(file-notify--add-watch-w32notify)
(file-notify--add-watch-gfilenotify): Use new callbacks.
2019-07-24 11:53:47 +02:00
Mattias Engdegård
6d5a8175b3 Comment out inexplicable condition in filenotify
* lisp/filenotify.el (file-notify-callback):
Comment out condition that does not seem to make any sense. All it
seems to do is allowing notifications for files on the form DIR/X/X
when we really just are watching DIR/X/Y.
2019-05-19 22:47:31 +02:00
Mattias Engdegård
3dcacb09a9 Fix broken logic in file-notify
* lisp/filenotify.el (file-notify-callback):
Repair warped condition that didn't match rename-to/from events correctly.
2019-05-18 20:48:01 +02:00
Michael Albinus
d0fe28cb1d Add tests for remote files in auto-revert-tests
* lisp/autorevert.el (auto-revert-debug): New defvar.
(auto-revert-notify-handler): Write traces.

* lisp/filenotify.el (file-notify-debug): New defvar.
(file-notify-handle-event, file-notify-callback): Write traces.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
Handle nil `vc-handled-backends'.

* test/lisp/autorevert-tests.el
(auto-revert-test-remote-temporary-file-directory): New defconst.
Handle also $REMOTE_FILE_NOTIFY_LIBRARY.
(auto-revert--test-enabled-remote-checked): New defvar.
(auto-revert--test-enabled-remote): New defun.
(auto-revert--wait-for-revert): Rewrite without timeout.
(auto-revert--deftest-remote): New defmacro.
(auto-revert-test01-auto-revert-several-files):
(auto-revert-test02-auto-revert-deleted-file): Adapt for remote files.
(auto-revert-test02-auto-revert-deleted-file):
Use `auto-revert-debug' for debug messages.
(auto-revert-test00-auto-revert-mode-remote)
(auto-revert-test01-auto-revert-several-files-mode-remote)
(auto-revert-test02-auto-revert-deleted-file-mode-remote)
(auto-revert-test03-auto-revert-tail-mode-mode-remote)
(auto-revert-test04-auto-revert-mode-dired-mode-remote): New tests.

* test/lisp/filenotify-tests.el (file-notify--test-event-handler):
Use `file-notify-debug' for debug messages.
2019-05-03 17:18:13 +02:00
Mattias Engdegård
e13b8c0e40 Small code clean-up of file-notify-add-watch
* lisp/filenotify.el (file-notify-add-watch):
Clearly separate backend-specific code from the rest, and simplify.
(file-notify--add-watch-inotify, file-notify--add-watch-kqueue)
(file-notify--add-watch-w32notify, file-notify--add-watch-gfilenotify):
New functions.
2019-05-02 15:45:04 +02:00
Mattias Engdegård
c243aabfa8 Make file-notify-rm-watch robust against reentry
Allow file-notify callbacks to call `file-notify-rm-watch', harmlessly,
after receiving a `stopped' event without triggering recursion.

* lisp/filenotify.el (file-notify--watch): Note that `callback' can be nil.
(file-notify--rm-descriptor): Set the `callback' field to nil before
sending `stopped'.
(file-notify-rm-watch): Don't do anything if the `callback' field is nil.
2019-04-22 17:54:32 +02:00
Michael Albinus
cfa54ab7d8 Adapt filenotify-tests for emba
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test06-dir-validity)
(file-notify-test07-many-events)
(file-notify-test09-watched-file-in-watched-dir): Adapt tests for emba.
2019-01-06 15:42:57 +01:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Michael Albinus
d10036d737 Fix Bug#33194
* lisp/autorevert.el (auto-revert-notify-add-watch):
Handle buffers with same descriptor properly.
(auto-revert-notify-handler): Handle all buffers with same
descriptor.  (Bug#33194)

* lisp/filenotify.el (file-notify-callback): Simplify.
2018-11-04 12:51:39 +01:00
Paul Eggert
bd6c1976fb Merge from origin/emacs-26
f2caf08ca6 ; Spelling fixes
f0e5f220b6 * lisp/progmodes/grep.el (zrgrep):
a0f71260f8 Minor copyedits in doc/emacs/text.texi
adfe2f580f Remove outdated comment in syntax.el
b80e15b6a6 Prevent Flyspell from changing unrelated words
e385599457 Avoid errors in flymake in builds --without-x
d691e30cb0 More improvements of the Emacs manual
2018-03-04 17:16:39 -08:00
Paul Eggert
f2caf08ca6 ; Spelling fixes 2018-03-04 17:10:34 -08:00
Glenn Morris
4fa90ff8f5 Merge from origin/emacs-26
e5a2933 (origin/emacs-26) lisp/vc/: documentation fixes
f21f8e6 Document 'desktop-files-not-to-save'
d8917eb Improve documentation of Profiling features
b228839 Improve indexing of "performance" in ELisp manual
ab67b3e Minor change in Emacs manual's VC chapter
c352434 Avoid memory corruption with specpdl overflow + edebug (Bug#3...
593bbda Document comment-fill-column in the manual (Bug#11636)
bd4cc8d * doc/emacs/dired.texi (Marks vs Flags): Copyedits.
69107f3 ; Fix doc typos related to indefinite articles
aaad1e6 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
5906418 More fixes for the Emacs manual
9ab3df1 ; Fix doc typos related to indefinite articles
66a4e65 ; Fix doc typos related to indefinite articles
35e5c57 ; Fix doc typos related to indefinite articles
2018-02-17 07:50:28 -08:00
Glenn Morris
66a4e651f3 ; Fix doc typos related to indefinite articles 2018-02-16 15:16:15 -05:00
Michael Albinus
344750aef4 Handle quoted remote file names for file notifications
* lisp/filenotify.el (file-notify-add-watch): Do not suppress
other file name handlers when FILE is quoted.

* test/lisp/filenotify-tests.el
(file-notify-test-remote-temporary-file-directory):
Beware quoted `temporary-file-directory'.

* test/lisp/files-tests.el
(files-tests-file-name-non-special-quote-unquote): Improve test.
2018-02-02 18:51:25 +01:00
Michael Albinus
e08de2bae2 Handle quoted file names in filenotify.el
* lisp/filenotify.el (file-notify-add-watch): Do not save
quoted file names in `file-notify-descriptors'.

* test/lisp/files-tests.el
(files-file-name-non-special-notify-handlers): Do not expect
to fail.
2018-02-01 20:15:12 -05:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Mark Oteiza
370d0e7aa7 Update uses of if-let and when-let
* lisp/dom.el (dom-previous-sibling):
* lisp/emacs-lisp/package.el (package--with-work-buffer):
(package--sort-deps-in-alist, package--sort-by-dependence):
(package-install-from-archive, package-install):
(package-menu-execute, package-menu--populate-new-package-list):
* lisp/filenotify.el (file-notify--rm-descriptor):
(file-notify--event-watched-file, file-notify--event-file-name):
(file-notify--event-file1-name, file-notify-rm-watch):
(file-notify-valid-p):
* lisp/gnus/message.el (message-toggle-image-thumbnails):
* lisp/gnus/nnimap.el (nnimap-request-move-article):
* lisp/ibuf-ext.el (ibuffer-repair-saved-filters):
* lisp/mpc.el (mpc-format):
* lisp/net/eww.el (eww-tag-meta, eww-process-text-input):
(eww-save-history):
* lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1):
* lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
* lisp/svg.el (svg-remove):
* lisp/textmodes/css-mode.el (css--named-color):
(css--colon-inside-funcall):
* lisp/textmodes/sgml-mode.el (html-current-buffer-classes):
(html-current-buffer-ids): Use if-let* and when-let* instead.
2017-09-12 13:18:10 -04:00
Michael Albinus
ebff4177e2 Fix filenotify-tests.el for cygwin
* test/lisp/filenotify-tests.el (file-notify--test-read-event):
Add an additional `sit-for'.
(file-notify-test02-rm-watch): Add an additional
`file-notify--test-read-event' call.
2017-05-01 12:16:15 +02:00
Glenn Morris
0f83433946 Avoid unnecessary loading of subr-x at run-time
* lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el:
* lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el:
* lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el:
No need to load subr-x at run-time.
* lisp/gnus/nnheader.el: No need to load subr-x.
; * lisp/emacs-lisp/subr-x.el, lisp/gnus/message.el, lisp/net/nsm.el:
; Comments.
2017-04-18 19:07:28 -04:00
Paul Eggert
1a55cc6094 ; Spelling fixes 2017-04-01 10:47:11 -07:00
Andreas Politz
43203708d4 Minor filenotify.el fixes
* lisp/filenotify.el: Require subr-x.
(file-notify-callback): Use equal, not eq.
2017-03-30 17:48:20 -07:00
Andreas Politz
082e2cb3f4 Minor fixes for inotify.c and filenotify.el
* lisp/filenotify.el (file-notify--watch-absolute-filename):
Add docstring.
(file-notify-callback): Simplify.

* src/inotify.c (Finotify_add_watch): Adapt docstring.
2017-03-26 11:41:12 +02:00
Michael Albinus
74129db63d ; Format files from last commit 2017-03-26 09:42:40 +02:00
Andreas Politz
158bb8555d Fix issues regarding inotify file-notification
Remove special code handling the inotify back-end.
* lisp/filenotify.el (file-notify--watch): New struct
representing a file-watch.
(file-notify-descriptors): Use the new struct as hash-value.
(file-notify-handle-event): Check that event is a cons.
(file-notify--rm-descriptor, file-notify--event-watched-file)
(file-notify--event-file-name, file-notify--event-file1-name)
(file-notify-callback, file-notify-add-watch)
(file-notify-rm-watch, file-notify-valid-p): Use new struct.
Remove special code handling inotify descriptors.  Remove code
handling multiple clients per descriptor.
(file-notify--descriptor): Remove unused function.

Let inotify-add-watch return a unique descriptor on every
call, like every other back-end does (Bug#26126).  Prevent
multiple clients from interfering with each other, when
watching a shared descriptor.
* src/inotify.c (watch_list): Extend the format by including a
id and the provided mask.
(INOTIFY_DEFAULT_MASK): Default mask used for all clients.
(make_watch_descriptor): Removed.
(make_lispy_mask, lispy_mask_match_p): New functions.
(inotifyevent_to_event): Match event against the mask provided
by the client.
(add_watch, remove_descriptor, remove_watch): New functions
for managing the watch_list.
(inotify_callback): Use the new functions.
(Finotify_add_watch, Finotify_rm_watch): Remove deprecated
flags from documentation.  Add check for validity of provided
descriptor.  Use the new functions.  Use the default mask.
(INOTIFY_DEBUG): Add new debug conditional.
(inotify-watch-list, inotify-allocated-p): New debug functions.
(symbol_to_inotifymask, syms_of_inotify): Remove deprecated symbols.

* test/lisp/filenotify-tests.el:
(file-notify-test02-rm-watch): Remove expected failure for inotify.
2017-03-26 09:21:56 +02:00
Michael Albinus
560d6f9124 Fix filenotify.el issue for kqueue
* lisp/filenotify.el (file-notify-add-watch): Use directory
for remote file name handlers.

* test/lisp/filenotify-tests.el (file-notify-test01-add-watch):
Create/delete temporary file only for "kqueue".
(file-notify-test02-rm-watch): Create/delete temporary files.
2017-03-22 19:33:03 +00:00
Michael Albinus
6b2f3ba02a Fix Bug#26127
* lisp/filenotify.el (file-notify--rm-descriptor): Check, that
there is a function which could be called.  (Bug#26127)

* test/lisp/filenotify-tests.el (file-notify--test-cleanup):
Clear also `file-notify-descriptors'.
(file-notify--test-make-temp-name): Move up.
(file-notify-test02-rm-watch): New test.
(file-notify-test03-events, file-notify-test04-autorevert)
(file-notify-test05-file-validity)
(file-notify-test06-dir-validity)
(file-notify-test07-many-events, file-notify-test08-backup)
(file-notify-test09-watched-file-in-watched-dir)
(file-notify-test10-sufficient-resources): Rename.
2017-03-17 10:25:46 +01:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Michael Albinus
06da00c6cf Fix Bug#22859
* lisp/filenotify.el (file-notify-callback): Return a `deleted'
event in case of kqueue and file1 is nil.  (Bug#22859)
2016-03-02 10:24:55 +00:00
Michael Albinus
1bc0e0a5b7 Minor fixes in filenotify.el
* lisp/filenotify.el (top): Require 'cl-lib.
(file-notify--rm-descriptor)
(file-notify--event-watched-file): Use cl-caadr.
(file-notify-callback): Handle also `ignore' events from inotify.
2016-02-22 22:05:00 +01:00
Michael Albinus
a9c48d5c9e Additional fixes for file notification
* lisp/filenotify.el (top): Require 'cl when compiling.
(file-notify--event-watched-file): New defun.
(file-notify--rm-descriptor, file-notify-callback):
Handle case of several monitors running in parallel.

* test/automated/file-notify-tests.el
(file-notify--test-event-test): Simplify test.
(file-notify--test-with-events): Get rid of outer definition.
Check also results of tests performed in callbacks.
(file-notify-test02-events): No wrapping when calling
`file-notify-rm-watch'.  No special checking for callback tests.
(file-notify-test07-backup): Adapt expected events for gfilenotify.
(file-notify-test08-watched-file-in-watched-dir): Improve.
2016-02-22 18:52:37 +01:00
Michael Albinus
5baa001cec Fix Bug#22736
* lisp/filenotify.el (file-notify-callback): Use the proper
descriptor when calling the callback.  (Bug#22736)

* test/automated/file-notify-tests.el
(file-notify--test-event-handler): Deactivate trace.
(file-notify-test08-watched-file-in-watched-dir): Bind
`file-notify--test-tmpfile' temporarily in `dir-callback'.
2016-02-21 09:58:55 +01:00
Michael Albinus
d5a10aefee Fix Bug#22557
* lisp/filenotify.el (file-notify-callback): Do not send a
`stopped' event in case of backup by renaming.  (Bug#22557)

* test/automated/Makefile.in: Use $(SELECTOR_EXPENSIVE) for
all targets but check and check-maybe.

* test/automated/file-notify-tests.el
(file-notify--test-read-event-timeout): New defconst.
(file-notify--deftest-remote, file-notify--wait-for-events)
(file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test06-many-events): Use it.
(file-notify--test-cleanup): Make it more robust.  Delete also
backup file.
(file-notify-test07-backup): New test.
2016-02-07 19:30:01 +01:00
Michael Albinus
7bf54d0115 Backport kqueue integration from master
* configure.ac (--with-file-notification): Add kqueue.
(top): Remove special test for "${HAVE_NS}" and
${with_file_notification}, this is handled inside gfilenotify
tests.  Add kqueue tests.  Use NOTIFY_CFLAGS and NOTIFY_LIBS
instead of library specific variables.  Add error message for
gfile on Nextstep.

* doc/lispref/os.texi (File Notifications): Add kqueue as backend.
Fix some glitches in the example.

* etc/NEWS: Mention kqueue.

* lisp/filenotify.el (file-notify--library)
(file-notify-descriptors, file-notify-callback)
(file-notify-add-watch, file-notify-rm-watch)
(file-notify-valid-p): Add kqueue support.
(file-notify--rm-descriptor): Remove WHAT arg.

* src/Makefile.in: Use NOTIFY_CFLAGS and NOTIFY_LIBS.

* src/emacs.c (main): Call globals_of_kqueue and syms_of_kqueue.

* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.

* src/keyboard.c (make_lispy_event): Check also for HAVE_KQUEUE.

* src/kqueue.c: New file.

* src/lisp.h: Declare extern globals_of_kqueue and syms_of_kqueue.

* test/automated/file-notify-tests.el
(file-notify--test-expected-events): Remove.
(file-notify--test-cleanup): Do not set that variable.
(file-notify--test-timeout) Use different timeouts for
different libraries.
(file-notify--test-library): New defun.
(file-notify--test-event-test): Make stronger checks.
(file-notify--test-with-events): EVENTS can also be a list of
lists.  Flush outstanding events before running the body.
Make timeout heuristically depend on the number of events.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests.  Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): New test.
2016-01-22 19:56:09 +01:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Michael Albinus
82c1b368a2 Fix Bug#21841
* lisp/filenotify.el (file-notify--rm-descriptor):
Use `descriptor' instead of computing its value.
(file-notify--descriptor): Additional argument FILE.  Adapt all callees.
(file-notify-rm-watch): Use `descriptor' when calling file name handler.
(Bug#21841)
2015-11-08 15:22:09 +01:00
Michael Albinus
547a23469a Minor fix in filenotify.el
* lisp/filenotify.el (file-notify--event-file-name)
(file-notify--event-file1-name): Normalize result with
`directory-file-name'.
2015-10-31 14:42:16 +01:00
Michael Albinus
0d9c67236c Further work on `stopped' events in filenotify.el
* doc/lispref/os.texi (File Notifications): Rework examples.

* lisp/filenotify.el (file-notify--rm-descriptor): Optional parameter.
(file-notify--rm-descriptor, file-notify-callback): Improve check
for sending `stopped' event.
(file-notify-add-watch): Check for more events for `inotify'.

* test/automated/file-notify-tests.el
(file-notify--test-expected-events): New defvar.
(file-notify--test-with-events): Use it.
(file-notify--test-cleanup): Make it more robust when deleting
directories.
(file-notify--test-event-test): Check also for watched directories.
(file-notify--test-event-handler): Suppress temporary .#files.
(file-notify-test02-events, file-notify-test04-file-validity):
Rework `stopped' events.
(file-notify-test05-dir-validity): Wait for events when appropriate.
2015-10-26 16:46:48 +01:00
Michael Albinus
ab116b19ed Introduce `stopped' event in file notification
* lisp/filenotify.el (file-notify--rm-descriptor): New defun.
(file-notify-rm-watch): Use it.
(file-notify-callback): Implement `stopped' event.
(file-notify-add-watch): Mention `stopped' in the docstring.
Check, that upper directory exists.

* test/automated/file-notify-tests.el (file-notify-test01-add-watch):
Add two test cases.
(file-notify-test02-events): Handle also `stopped' event.
(file-notify-test04-file-validity): Add another test case.
2015-10-25 14:18:17 +01:00
Michael Albinus
71d6acff1c Fix Bug#21669
* lisp/filenotify.el (file-notify-rm-watch): Improve check for
calling low-level functions.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
Decrase to 6 seconds for remote directories.
(file-notify-test02-events): Expect different number of
`attribute-changed' events for the local and remote cases.  Apply
short delays between the operations, in order to receive all
events in the remote case.  Combine `attribute-change' tests.
(Bug#21669)
2015-10-23 13:14:09 +02:00
Michael Albinus
8c3c506aa5 ; Fix thinko in last commit of filenotify.el 2015-09-23 21:21:49 +02:00
Michael Albinus
cad8aef324 Continue gfilenotify.c implementation of missing parts
* lisp/filenotify.el (file-notify-add-watch): Append `flags' to
`gfile-add-watch' call.
(file-notify-rm-watch): Modify `file-notify-descriptors' only
after calling the low level functions.

* src/gfilenotify.c (dir_monitor_callback): Check, whether
event_type is expected.
(Fgfile_add_watch): Allow also `change'and `attribute-change' for FLAGS.
(Fgfile_rm_watch): Fix typo.
(syms_of_gfilenotify): Declare Qchange and Qattribute_change.
2015-09-23 20:34:22 +02:00
Michael Albinus
170ed29b43 Implement gfile-valid-p
* lisp/filenotify.el (file-notify-callback): Fix typo.
(gfile-valid-p): Remove defalias.

* src/gfilenotify.c (dir_monitor_callback): Cancel the monitor if
the file or directory to be watched is deleted.
(Fgfile_add_watch): Make watch_object a triple.
(Fgfile_rm_watch): Check, whether watch is cancelled already.
(Fgfile_valid_p): New defun.
(syms_of_gfilenotify): Declare Sgfile_valid_p.
2015-09-22 08:40:08 +02:00
Paul Eggert
284c470ef7 Backslash cleanup in Elisp source files
This patch should not change behavior.  It typically omits backslashes
where they are redundant (e.g., in the string literal "^\$").
In a few places, insert backslashes where they make regular
expressions clearer: e.g., replace "^\*" (equivalent to "^*") with
"^\\*", which has the same effect as a regular expression.
Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs,
and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion with
RCS IDs, as that makes it clearer that the backslash is intended.
2015-09-17 16:09:39 -07:00
Michael Albinus
67ddc7c55d Adaot file-notify-tests.el test cases
* lisp/filenotify.el (file-notify-rm-watch): Ignore `file-notify-error'.

* src/inotify.c (Finotify_valid_p): Adapt docstring.

* test/automated/file-notify-tests.el ()
(file-notify-test03-autorevert)
(file-notify-test04-file-validity)
(file-notify-test04-file-validity-remote)
(file-notify-test05-dir-validity)
(file-notify-test05-dir-validity-remote): Adapt docstring.
(file-notify-test04-file-validity): Let events arrive before
calling final `file-notify-valid-p'.  Do not ignore errors.
(file-notify-test05-dir-validity): Do not manipulate
`temporary-file-directory', it isn't necessary.  Let events arrive
before calling final `file-notify-valid-p'.  Do not ignore errors.
2015-09-14 22:15:20 +02:00