From: Michael Albinus Date: Wed, 26 Oct 2022 11:58:42 +0000 (+0200) Subject: Modernize `auto-revert-notify-exclude-dir-regexp' X-Git-Tag: emacs-29.0.90~1616^2~459 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2468b819e2947ebd35ff974c00e984589bd00cc8;p=emacs.git Modernize `auto-revert-notify-exclude-dir-regexp' * lisp/autorevert.el (auto-revert-notify-exclude-dir-regexp): Use `rx' and `mounted-file-systems'. --- diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 576659675b5..e3d66c04bc2 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -297,9 +297,10 @@ You should set this variable through Custom." (defcustom auto-revert-notify-exclude-dir-regexp (concat ;; No mounted file systems. - "^" (regexp-opt '("/afs/" "/media/" "/mnt" "/net/" "/tmp_mnt/")) + mounted-file-systems ;; No remote files. - (unless auto-revert-remote-files "\\|^/[^/|:][^/|]+:")) + (unless auto-revert-remote-files + (rx (| "" (: bol "/" (not (any "/:|")) (1+ (not (any "/|"))) ":"))))) "Regular expression of directories to be excluded from file notifications." :group 'auto-revert :type 'regexp