emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113527: * filenotify.el (file-notify-supported-p):


From: Michael Albinus
Subject: [Emacs-diffs] trunk r113527: * filenotify.el (file-notify-supported-p):
Date: Wed, 24 Jul 2013 13:29:31 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113527
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2013-07-24 15:29:15 +0200
message:
  * filenotify.el (file-notify-supported-p):
  * net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
  Remove functions.
  
  * autorevert.el (auto-revert-use-notify):
  (auto-revert-notify-add-watch):
  * net/tramp.el (tramp-file-name-for-operation):
  * net/tramp-adb.el (tramp-adb-file-name-handler-alist):
  * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
  * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
  * net/tramp-smb.el (tramp-smb-file-name-handler-alist):
  Remove `file-notify-supported-p' entry.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/autorevert.el             
autorevert.el-20091113204419-o5vbwnq5f7feedwu-1197
  lisp/filenotify.el             filenotify.el-20130625113410-31so8z8hgotqv5s4-1
  lisp/net/tramp-adb.el          trampadb.el-20121204164216-03wyr5miam215d7f-1
  lisp/net/tramp-gvfs.el         
trampgvfs.el-20091113204419-o5vbwnq5f7feedwu-10898
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
  lisp/net/tramp-smb.el          
trampsmb.el-20091113204419-o5vbwnq5f7feedwu-2515
  lisp/net/tramp.el              tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-24 08:04:39 +0000
+++ b/lisp/ChangeLog    2013-07-24 13:29:15 +0000
@@ -1,3 +1,18 @@
+2013-07-24  Michael Albinus  <address@hidden>
+
+       * filenotify.el (file-notify-supported-p):
+       * net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
+       Remove functions.
+
+       * autorevert.el (auto-revert-use-notify):
+       (auto-revert-notify-add-watch):
+       * net/tramp.el (tramp-file-name-for-operation):
+       * net/tramp-adb.el (tramp-adb-file-name-handler-alist):
+       * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
+       * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
+       * net/tramp-smb.el (tramp-smb-file-name-handler-alist):
+       Remove `file-notify-supported-p' entry.
+
 2013-07-24  Glenn Morris  <address@hidden>
 
        * printing.el: Replace all uses of deleted ps-windows-system,

=== modified file 'lisp/autorevert.el'
--- a/lisp/autorevert.el        2013-07-18 10:03:49 +0000
+++ b/lisp/autorevert.el        2013-07-24 13:29:15 +0000
@@ -271,9 +271,7 @@
   :type 'boolean
   :version "24.4")
 
-(defcustom auto-revert-use-notify
-  ;; We use the support of the local filesystem as default.
-  (file-notify-supported-p temporary-file-directory)
+(defcustom auto-revert-use-notify t
   "If non-nil Auto Revert Mode uses file notification functions.
 You should set this variable through Custom."
   :group 'auto-revert
@@ -512,8 +510,7 @@
     (set (make-local-variable 'auto-revert-use-notify) nil))
 
   (when (and buffer-file-name auto-revert-use-notify
-            (not auto-revert-notify-watch-descriptor)
-            (file-notify-supported-p buffer-file-name))
+            (not auto-revert-notify-watch-descriptor))
     (setq auto-revert-notify-watch-descriptor
          (ignore-errors
            (file-notify-add-watch

=== modified file 'lisp/filenotify.el'
--- a/lisp/filenotify.el        2013-07-18 10:03:49 +0000
+++ b/lisp/filenotify.el        2013-07-24 13:29:15 +0000
@@ -190,17 +190,6 @@
            (funcall callback (list desc action file file1))
          (funcall callback (list desc action file)))))))
 
-(defun file-notify-supported-p (file)
-  "Returns non-nil if filesystem pertaining to FILE could be watched."
-  (unless (stringp file)
-    (signal 'wrong-type-argument (list file)))
-  (setq file (expand-file-name file))
-
-  (let ((handler (find-file-name-handler file 'file-notify-supported-p)))
-    (if handler
-       (funcall handler 'file-notify-supported-p file)
-      (and file-notify--library t))))
-
 (defun file-notify-add-watch (file flags callback)
   "Add a watch for filesystem events pertaining to FILE.
 This arranges for filesystem events pertaining to FILE to be reported
@@ -274,10 +263,11 @@
                  '("No file notification package available")))
 
        ;; Determine low-level function to be called.
-       (setq func (cond
-                   ((eq file-notify--library 'gfilenotify) 'gfile-add-watch)
-                   ((eq file-notify--library 'inotify) 'inotify-add-watch)
-                   ((eq file-notify--library 'w32notify) 
'w32notify-add-watch)))
+       (setq func
+             (cond
+              ((eq file-notify--library 'gfilenotify) 'gfile-add-watch)
+              ((eq file-notify--library 'inotify) 'inotify-add-watch)
+              ((eq file-notify--library 'w32notify) 'w32notify-add-watch)))
 
        ;; Determine respective flags.
        (if (eq file-notify--library 'gfilenotify)

=== modified file 'lisp/net/tramp-adb.el'
--- a/lisp/net/tramp-adb.el     2013-07-23 14:06:02 +0000
+++ b/lisp/net/tramp-adb.el     2013-07-24 13:29:15 +0000
@@ -110,7 +110,6 @@
     (file-modes . tramp-handle-file-modes)
     (file-notify-add-watch . tramp-handle-file-notify-add-watch)
     (file-notify-rm-watch . ignore)
-    (file-notify-supported-p . ignore)
     (expand-file-name . tramp-adb-handle-expand-file-name)
     (find-backup-file-name . tramp-handle-find-backup-file-name)
     (directory-files . tramp-handle-directory-files)

=== modified file 'lisp/net/tramp-gvfs.el'
--- a/lisp/net/tramp-gvfs.el    2013-07-23 14:06:02 +0000
+++ b/lisp/net/tramp-gvfs.el    2013-07-24 13:29:15 +0000
@@ -437,7 +437,6 @@
     (file-newer-than-file-p . tramp-handle-file-newer-than-file-p)
     (file-notify-add-watch . tramp-handle-file-notify-add-watch)
     (file-notify-rm-watch . ignore)
-    (file-notify-supported-p . ignore)
     (file-ownership-preserved-p . ignore)
     (file-readable-p . tramp-gvfs-handle-file-readable-p)
     (file-regular-p . tramp-handle-file-regular-p)

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2013-07-18 10:03:49 +0000
+++ b/lisp/net/tramp-sh.el      2013-07-24 13:29:15 +0000
@@ -867,8 +867,7 @@
     (set-file-acl . tramp-sh-handle-set-file-acl)
     (vc-registered . tramp-sh-handle-vc-registered)
     (file-notify-add-watch . tramp-sh-handle-file-notify-add-watch)
-    (file-notify-rm-watch . tramp-sh-handle-file-notify-rm-watch)
-    (file-notify-supported-p . tramp-sh-handle-file-notify-supported-p))
+    (file-notify-rm-watch . tramp-sh-handle-file-notify-rm-watch))
   "Alist of handler functions.
 Operations not mentioned here will be handled by the normal Emacs functions.")
 
@@ -3499,13 +3498,6 @@
   (tramp-message proc 6 (format "Kill %S" proc))
   (kill-process proc))
 
-(defun tramp-sh-handle-file-notify-supported-p (file-name)
-  "Like `file-notify-supported-p' for Tramp files."
-  (with-parsed-tramp-file-name (expand-file-name file-name) nil
-    (and (or (tramp-get-remote-gvfs-monitor-dir v)
-            (tramp-get-remote-inotifywait v))
-        t)))
-
 ;;; Internal Functions:
 
 (defun tramp-maybe-send-script (vec script name)

=== modified file 'lisp/net/tramp-smb.el'
--- a/lisp/net/tramp-smb.el     2013-07-23 14:06:02 +0000
+++ b/lisp/net/tramp-smb.el     2013-07-24 13:29:15 +0000
@@ -211,7 +211,6 @@
     (file-newer-than-file-p . tramp-handle-file-newer-than-file-p)
     (file-notify-add-watch . tramp-handle-file-notify-add-watch)
     (file-notify-rm-watch . ignore)
-    (file-notify-supported-p . ignore)
     (file-ownership-preserved-p . ignore)
     (file-readable-p . tramp-handle-file-exists-p)
     (file-regular-p . tramp-handle-file-regular-p)

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-07-23 14:06:02 +0000
+++ b/lisp/net/tramp.el 2013-07-24 13:29:15 +0000
@@ -1980,7 +1980,7 @@
                  ;; Emacs 22+ only.
                  'set-file-times
                  ;; Emacs 24+ only.
-                 'file-acl 'file-notify-add-watch 'file-notify-supported-p
+                 'file-acl 'file-notify-add-watch
                  'file-selinux-context 'set-file-acl 'set-file-selinux-context
                  ;; XEmacs only.
                  'abbreviate-file-name 'create-file-buffer
@@ -2036,8 +2036,9 @@
     default-directory)
    ;; PROC.
    ((eq operation 'file-notify-rm-watch)
-    (with-current-buffer (process-buffer (nth 0 args))
-      default-directory))
+    (when (processp (nth 0 args))
+      (with-current-buffer (process-buffer (nth 0 args))
+       default-directory)))
    ;; Unknown file primitive.
    (t (error "unknown file I/O primitive: %s" operation))))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]