HOME


sh-3ll 1.0
DIR:/usr/share/emacs/26.1/lisp/
Upload File :
Current File : //usr/share/emacs/26.1/lisp/filenotify.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'cl-lib)
#@231 Non-nil when Emacs has been compiled with file notification support.
The value is the name of the low-level file notification package
to be used for local file systems.  Remote file notifications
could use another implementation.
(defconst file-notify--library (byte-code "\300\301!\203\301\207\300\302!\203\302\207\300\303!\203\303\207\300\304!\205\304\207" [featurep inotify kqueue gfilenotify w32notify] 2) (#$ . 427))
#@77 compiler-macro for inlining `file-notify--watch-p'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'file-notify--watch-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block file-notify--watch-p (and (memq (type-of cl-x) cl-struct-file-notify--watch-tags) t)) nil] 9 (#$ . 863)])
(put 'file-notify--watch-p 'compiler-macro 'file-notify--watch-p--cmacro)
#@13 

(fn CL-X)
(defalias 'file-notify--watch-p #[257 "\301!>\205	\302\207" [cl-struct-file-notify--watch-tags type-of t] 3 (#$ . 1244)])
(byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put file-notify--watch-p side-effect-free error-free put file-notify--watch cl-deftype-satisfies] 5)
#@85 compiler-macro for inlining `file-notify--watch-directory'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'file-notify--watch-directory--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block file-notify--watch-directory (or (file-notify--watch-p cl-x) (signal 'wrong-type-argument (list 'file-notify--watch cl-x))) (aref cl-x 1)) nil] 9 (#$ . 1550)])
(put 'file-notify--watch-directory 'compiler-macro 'file-notify--watch-directory--cmacro)
#@163 Access slot "directory" of `(file-notify--watch (:constructor nil) (:constructor file-notify--watch-make (directory filename callback)))' struct CL-X.

(fn CL-X)
(defalias 'file-notify--watch-directory #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-file-notify--watch-tags type-of signal wrong-type-argument file-notify--watch 1] 5 (#$ . 2018)])
(byte-code "\300\301\302\303#\300\207" [function-put file-notify--watch-directory side-effect-free t] 4)
#@84 compiler-macro for inlining `file-notify--watch-filename'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'file-notify--watch-filename--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block file-notify--watch-filename (or (file-notify--watch-p cl-x) (signal 'wrong-type-argument (list 'file-notify--watch cl-x))) (aref cl-x 2)) nil] 9 (#$ . 2495)])
(put 'file-notify--watch-filename 'compiler-macro 'file-notify--watch-filename--cmacro)
#@162 Access slot "filename" of `(file-notify--watch (:constructor nil) (:constructor file-notify--watch-make (directory filename callback)))' struct CL-X.

(fn CL-X)
(defalias 'file-notify--watch-filename #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-file-notify--watch-tags type-of signal wrong-type-argument file-notify--watch 2] 5 (#$ . 2958)])
(byte-code "\300\301\302\303#\300\207" [function-put file-notify--watch-filename side-effect-free t] 4)
#@84 compiler-macro for inlining `file-notify--watch-callback'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'file-notify--watch-callback--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block file-notify--watch-callback (or (file-notify--watch-p cl-x) (signal 'wrong-type-argument (list 'file-notify--watch cl-x))) (aref cl-x 3)) nil] 9 (#$ . 3432)])
(put 'file-notify--watch-callback 'compiler-macro 'file-notify--watch-callback--cmacro)
#@162 Access slot "callback" of `(file-notify--watch (:constructor nil) (:constructor file-notify--watch-make (directory filename callback)))' struct CL-X.

(fn CL-X)
(defalias 'file-notify--watch-callback #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-file-notify--watch-tags type-of signal wrong-type-argument file-notify--watch 3] 5 (#$ . 3895)])
(byte-code "\300\301\302\303#\304\305\306\"\207" [function-put file-notify--watch-callback side-effect-free t defalias copy-file-notify--watch copy-sequence] 4)
#@103 compiler-macro for inlining `file-notify--watch-make'.

(fn CL-WHOLE-ARG DIRECTORY FILENAME CALLBACK)
(defalias 'file-notify--watch-make--cmacro #[1028 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (directory filename callback) (cl-block file-notify--watch-make (record 'file-notify--watch directory filename callback)) nil] 13 (#$ . 4427)])
(put 'file-notify--watch-make 'compiler-macro 'file-notify--watch-make--cmacro)
#@89 Constructor for objects of type `file-notify--watch'.

(fn DIRECTORY FILENAME CALLBACK)
(defalias 'file-notify--watch-make #[771 "\300\301$\207" [record file-notify--watch] 8 (#$ . 4869)])
(byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303&	\207" [function-put file-notify--watch-make side-effect-free t cl-struct-define file-notify--watch nil cl-structure-object record ((cl-tag-slot) (directory) (filename) (callback)) cl-struct-file-notify--watch-tags] 11)
#@61 Return the absolute filename observed by WATCH.

(fn WATCH)
(defalias 'file-notify--watch-absolute-filename #[257 "\301!>\204\302\303\304D\"\210\211\305H\203<\306\301!>\204%\302\303\304D\"\210\305H\301!>\2047\302\303\304D\"\210\307H\"\207\301!>\204K\302\303\304D\"\210\211\307H\207" [cl-struct-file-notify--watch-tags type-of signal wrong-type-argument file-notify--watch 2 expand-file-name 1] 7 (#$ . 5357)])
#@251 Hash table for registered file notification descriptors.
A key in this hash table is the descriptor as returned from
`inotify', `kqueue', `gfilenotify', `w32notify' or a file name
handler.  The value in the hash table is `file-notify--watch'
struct.
(defvar file-notify-descriptors (make-hash-table :test 'equal) (#$ . 5794))
#@211 Remove DESCRIPTOR from `file-notify-descriptors'.
DESCRIPTOR should be an object returned by `file-notify-add-watch'.
If it is registered in `file-notify-descriptors', a stopped event is sent.

(fn DESCRIPTOR)
(defalias 'file-notify--rm-descriptor #[257 "\302\"\211\205/\303\304\305\306\307!\310\"\311$\216\312!	>\204$\313\314\315D\"\210\211\311H\316\317!E!)\207" [file-notify-descriptors cl-struct-file-notify--watch-tags gethash make-byte-code 0 "\302\300	\"\207" vconcat vector [file-notify-descriptors remhash] 3 type-of signal wrong-type-argument file-notify--watch stopped file-notify--watch-absolute-filename] 8 (#$ . 6127)])
#@231 Handle file system monitoring event.
If EVENT is a filewatch event, call its callback.  It has the format

  (file-notify (DESCRIPTOR ACTIONS FILE [FILE1-OR-COOKIE]) CALLBACK)

Otherwise, signal a `file-notify-error'.

(fn EVENT)
(defalias 'file-notify-handle-event #[257 "\211:\203\211@\300=\203\211G\301Y\203\3028A@!\207\303\304\305B\"\207" [file-notify 3 2 signal file-notify-error "Not a valid file-notify event"] 5 (#$ . 6777) "e"])
#@134 A pending file notification event for a future `renamed' action.
It is a form ((DESCRIPTOR ACTION FILE [FILE1-OR-COOKIE]) CALLBACK).
(defvar file-notify--pending-event nil (#$ . 7231))
#@123 Return file or directory being watched.
Could be different from the directory watched by the backend library.

(fn EVENT)
(defalias 'file-notify--event-watched-file #[257 "\301@\"\211\205\f\302!\207" [file-notify-descriptors gethash file-notify--watch-absolute-filename] 4 (#$ . 7423)])
#@66 Return file name of file notification event, or nil.

(fn EVENT)
(defalias 'file-notify--event-file-name #[257 "\302@\"\211\205.\303\304\3058;\203\3058\206\306\307!	>\204)\310\311\312D\"\210\313H\"!\207" [file-notify-descriptors cl-struct-file-notify--watch-tags gethash directory-file-name expand-file-name 2 "" type-of signal wrong-type-argument file-notify--watch 1] 9 (#$ . 7720)])
#@122 Return second file name of file notification event, or nil.
This is available in case a file has been moved.

(fn EVENT)
(defalias 'file-notify--event-file1-name #[257 "\302@\"\211\205*\3038;\205*\304\305\3038\306!	>\204%\307\310\311D\"\210\312H\"!\207" [file-notify-descriptors cl-struct-file-notify--watch-tags gethash 3 directory-file-name expand-file-name type-of signal wrong-type-argument file-notify--watch 1] 9 (#$ . 8127)])
#@112 Return cookie of file notification event, or nil.
This is available in case a file has been moved.

(fn EVENT)
(defalias 'file-notify--event-cookie #[257 "\3008\207" [3] 3 (#$ . 8578)])
#@168 Handle an EVENT returned from file notification.
EVENT is the cadr of the event in `file-notify-handle-event'
(DESCRIPTOR ACTIONS FILE [FILE1-OR-COOKIE]).

(fn EVENT)
(defalias 'file-notify-callback #[257 "\211@\303\"A@\304!\305\211\211:\204\305B\262\205	\205	\211A\262\242	\203`\306	@!\306\n!\232\204`	@A@\307=\203F\211\310=\203U	@A@\311=\203`\211\312=\204`	\262\305@A\313\240\210\211\314>\203j\211\202\211\315>\203\202\316	!\211\262\203~\317\202\313\202\211\320=\203\222\321\262\305\211\262\202\211\322>\203\234\323\202\211\324>\203\246\325\202\211\326>\203\260\327\202\211\330>\203\272\313\202\211\331>\203\345\306\f!F\332!\n>\204\333\333\334\335\nD\"\210\336HD\305\202\211\337>\205	\204\363\325\202\262\304	@!\262	@@\232\204	@@\317F	A@D\262\305\317\262\203'A@@!\210\305\262\211\203\342\332!\n>\204<\333\334\335	D\"\210\340H\203\237\332!\n>\204T\333\334\335	D\"\210\340H\341!\230\204\237\341!\341\332	!\n>\204u\333\334\335D\"\210\342H!\230\204\237;\203\342\332!\n>\204\224\333\334\335	D\"\210\340H\341!\230\203\342\203\305\332!\n>\204\264\333\334\335	D\"\210\336HF!\210\202\342\332!\n>\204\326\333\334\335	D\"\210\336HE!\210\204\211\343>\203;\203\367\344!\204\345\n!\230\203\346!\210\210\202\207" [file-notify-descriptors file-notify--pending-event cl-struct-file-notify--watch-tags gethash file-notify--event-file-name nil file-notify--event-cookie moved-from moved-to renamed-from renamed-to deleted (attribute-changed changed created deleted renamed) (moved rename) file-notify--event-file1-name renamed ignored t (attrib link) attribute-changed (create added) created (modify modified write) changed (delete delete-self move-self removed) (moved-from renamed-from) type-of signal wrong-type-argument file-notify--watch 3 (moved-to renamed-to) 2 file-name-nondirectory 1 (deleted renamed) backup-file-name-p file-notify--event-watched-file file-notify-rm-watch] 15 (#$ . 8772)])
#@1420 Add a watch for filesystem events pertaining to FILE.
This arranges for filesystem events pertaining to FILE to be reported
to Emacs.  Use `file-notify-rm-watch' to cancel the watch.

The returned value is a descriptor for the added watch.  If the
file cannot be watched for some reason, this function signals a
`file-notify-error' error.

FLAGS is a list of conditions to set what will be watched for.  It can
include the following symbols:

  `change'           -- watch for file changes
  `attribute-change' -- watch for file attributes changes, like
                        permissions or modification time

If FILE is a directory, `change' watches for file creation or
deletion in that directory.  This does not work recursively.

When any event happens, Emacs will call the CALLBACK function passing
it a single argument EVENT, which is of the form

  (DESCRIPTOR ACTION FILE [FILE1])

DESCRIPTOR is the same object as the one returned by this function.
ACTION is the description of the event.  It could be any one of the
following:

  `created'           -- FILE was created
  `deleted'           -- FILE was deleted
  `changed'           -- FILE has changed
  `renamed'           -- FILE has been renamed to FILE1
  `attribute-changed' -- a FILE attribute was changed
  `stopped'           -- watching FILE has been stopped

FILE is the name of the file whose event is being reported.

(fn FILE FLAGS CALLBACK)
(defalias 'file-notify-add-watch #[771 ";\204\302\303C\"\210\304!\262:\203\"\305\306\305\307\310!\"\"\203(\302\303C\"\210\311!\2044\302\303C\"\210\312\313\"\314\315!\203C\202F\316!!\317\211\211\315!\204X\302\320\321D\"\210\203i\313		$\262\202\347\204r\302\320\322\"\210\323\267\202\210\324\202\211\325\202\211\326\202\211\327\202\211\317\262\330=\203\233\331\332\"\262\202\325\306>\203\267\333\267\202\264\334\202\265\335\202\265\336\202\265\317\262\307>\203\325\337\267\202\320\340\202\321\340\202\321\341\202\321\317B\262\342=\203\341\202\342\343#\262\315	!?\205\364\344	!\345\346$\266\203\347	#\266\207" [file-notify--library file-notify-descriptors signal wrong-type-argument expand-file-name delq change attribute-change copy-tree functionp find-file-name-handler file-notify-add-watch directory-file-name file-directory-p file-name-directory nil file-notify-error "Directory does not exist" ("No file notification package available") #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (inotify 120 kqueue 124 gfilenotify 128 w32notify 132)) inotify-add-watch kqueue-add-watch gfile-add-watch w32notify-add-watch gfilenotify append (watch-mounts send-moved) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (inotify 168 kqueue 172 w32notify 176)) (create delete delete-self modify move-self move) (create delete write extend rename) (file-name directory-name size last-write-time) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (inotify 196 kqueue 200 w32notify 204)) attrib attributes kqueue file-notify-callback file-name-nondirectory record file-notify--watch puthash] 16 (#$ . 10838)])
#@140 Remove an existing watch specified by its DESCRIPTOR.
DESCRIPTOR should be an object returned by `file-notify-add-watch'.

(fn DESCRIPTOR)
(defalias 'file-notify-rm-watch #[257 "\303\"\211\205R\304\305!	>\204\306\307\310D\"\210\311H\312\"\3131I\211\203,\211\312\"\202E\n\314\267\202B\315\202C\316\202C\317\202C\320\202C\321!0\202M\210\202N\210\210\322!\207" [file-notify-descriptors cl-struct-file-notify--watch-tags file-notify--library gethash find-file-name-handler type-of signal wrong-type-argument file-notify--watch 1 file-notify-rm-watch (file-notify-error) #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (inotify 50 kqueue 54 gfilenotify 58 w32notify 62)) inotify-rm-watch kqueue-rm-watch gfile-rm-watch w32notify-rm-watch nil file-notify--rm-descriptor] 7 (#$ . 14056)])
#@129 Check a watch specified by its DESCRIPTOR.
DESCRIPTOR should be an object returned by `file-notify-add-watch'.

(fn DESCRIPTOR)
(defalias 'file-notify-valid-p #[257 "\303\"\211\205G\304\305!	>\204\306\307\310D\"\210\311H\312\"\211\203(\211\312\"\202A\n\313\267\202>\314\202?\315\202?\316\202?\317\202?\320!\205E\321\262\207" [file-notify-descriptors cl-struct-file-notify--watch-tags file-notify--library gethash find-file-name-handler type-of signal wrong-type-argument file-notify--watch 1 file-notify-valid-p #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (inotify 46 kqueue 50 gfilenotify 54 w32notify 58)) inotify-valid-p kqueue-valid-p gfile-valid-p w32notify-valid-p nil t] 7 (#$ . 14903)])
(provide 'filenotify)