((memq action '(attrib link)) 'attribute-changed)
((memq action '(create added)) 'created)
((memq action '(modify modified write)) 'changed)
- ((memq action
- '(delete delete-self move-self removed)) 'deleted)
+ ((memq action '(delete delete-self move-self removed))
+ 'deleted)
;; Make the event pending.
((memq action '(moved-from renamed-from))
(setq file-notify--pending-event
(defun file-notify--test-read-event ()
"Read one event.
There are different timeouts for local and remote file notification libraries."
+ (sit-for 0.001 'nodisp)
(read-event
nil nil
(cond
;; Remove first watch.
(file-notify-rm-watch file-notify--test-desc)
;; Only the second callback shall run.
+ (file-notify--test-read-event)
(delete-file file-notify--test-tmpfile)
(file-notify--wait-for-events
(file-notify--test-timeout) results)
;; After deleting the parent directory, the descriptor must
;; not be valid anymore.
(should-not (file-notify-valid-p file-notify--test-desc))
- ;; w32notify doesn't generate 'stopped' events when the parent
+ ;; w32notify doesn't generate `stopped' events when the parent
;; directory is deleted, which doesn't provide a chance for
;; filenotify.el to remove the descriptor from the internal
;; hash table it maintains. So we must remove the descriptor