]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix bootstrap
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 23 Nov 2024 17:33:26 +0000 (18:33 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 27 Nov 2024 19:53:42 +0000 (20:53 +0100)
* lisp/net/tramp.el (tramp-initial-file-name-regexp)
(tramp-autoload-file-name-regexp): Don't use `rx' in autoloaded
objects.  (Bug#74490)

(cherry picked from commit abcc8c717d80ddffaa68a30ff59bc71d35eb52e3)

lisp/net/tramp.el

index e7c3bb1c536f2f8af7d150ae716120f3425c50d6..6347286b71586897a2eb245eecf832991acbc53a 100644 (file)
@@ -1208,7 +1208,10 @@ See also `tramp-file-name-regexp'.")
 
 ;;;###autoload
 (defconst tramp-initial-file-name-regexp
-  (rx bos "/" (+ (not (any "/:"))) ":" (* (not (any "/:"))) ":")
+  ;; We shouldn't use `rx' in autoloaded objects, because we don't
+  ;; know whether it does exist already.  (Bug#74490)
+  ;; (rx bos "/" (+ (not (any "/:"))) ":" (* (not (any "/:"))) ":")
+  "\\`/[^/:]+:[^/:]*:"
   "Value for `tramp-file-name-regexp' for autoload.
 It must match the initial `tramp-syntax' settings.")
 
@@ -1287,7 +1290,10 @@ Also see `tramp-file-name-structure'.")
 ;;;###autoload
 (defconst tramp-autoload-file-name-regexp
   ;; The method is either "-", or at least two characters.
-  (rx bos "/" (| "-" (>= 2 (not (any "/:|")))) ":")
+  ;; We shouldn't use `rx' in autoloaded objects, because we don't
+  ;; know whether it does exist already.  (Bug#74490)
+  ;; (rx bos "/" (| "-" (>= 2 (not (any "/:|")))) ":")
+  "\\`/\\(?:-\\|[^/:|]\\{2,\\}\\):"
   "Regular expression matching file names handled by Tramp autoload.
 It must match the initial `tramp-syntax' settings.  It should not
 match file names at root of the underlying local file system,