emacs-diffs
[Top][All Lists]
Advanced

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

master 39c6437e47 1/2: Ignore some handlers in ange-ftp.el


From: Michael Albinus
Subject: master 39c6437e47 1/2: Ignore some handlers in ange-ftp.el
Date: Mon, 19 Dec 2022 04:24:10 -0500 (EST)

branch: master
commit 39c6437e472a155414085b1ee57cf499b518aa57
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Ignore some handlers in ange-ftp.el
    
    * lisp/net/ange-ftp.el: Return nil for `file-acl',
    `file-notify-add-watch', `file-notify-rm-watch',
    `file-notify-valid-p', `file-system-info',
    `list-system-processes', `memory-info', `process-attributes',
    `set-file-acl', `set-file-selinux-context'.
---
 lisp/net/ange-ftp.el | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 6e17e417ea..9781ebf863 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -4498,6 +4498,25 @@ NEWNAME should be the name to give the new compressed or 
uncompressed file.")
 (put 'process-file 'ange-ftp 'ange-ftp-process-file)
 (put 'start-file-process 'ange-ftp 'ignore)
 (put 'shell-command 'ange-ftp 'ange-ftp-shell-command)
+
+;; Do not execute system information functions.
+(put 'file-system-info 'ange-ftp 'ignore)
+(put 'list-system-processes 'ange-ftp 'ignore)
+(put 'memory-info 'ange-ftp 'ignore)
+(put 'process-attributes 'ange-ftp 'ignore)
+
+;; There aren't ACLs.  `file-selinux-context' shall return '(nil nil
+;; nil nil) if the file is nonexistent, so we let the default file
+;; name handler do the job.
+(put 'file-acl 'ange-ftp 'ignore)
+;; (put 'file-selinux-context 'ange-ftp 'ignore)
+(put 'set-file-acl 'ange-ftp 'ignore)
+(put 'set-file-selinux-context 'ange-ftp 'ignore)
+
+;; There aren't file notifications.
+(put 'file-notify-add-watch 'ange-ftp 'ignore)
+(put 'file-notify-rm-watch 'ange-ftp 'ignore)
+(put 'file-notify-valid-p 'ange-ftp 'ignore)
 
 ;;; Define ways of getting at unmodified Emacs primitives,
 ;;; turning off our handler.



reply via email to

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