diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-11-04 15:39:58 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-11-04 15:39:58 +0100 |
commit | 5d6e919a90bc3ad3c73f9c6b20b25837d283af0e (patch) | |
tree | e3de87e2cf669ed09a89a3631bd430ed87c79444 /lisp/net/tramp.el | |
parent | f0f960050b1d3931331bf0ce42d2e106f8c7832b (diff) | |
download | emacs-5d6e919a90bc3ad3c73f9c6b20b25837d283af0e.tar.gz |
Fix calling file name handler for `load'.
* lisp/net/ange-ftp.el (ange-ftp-load): Add MUST-SUFFIX argument.
* lisp/net/tramp.el (tramp-handle-load): Adapt MUST_SUFFIX test.
* src/lread.c (Fload): Call handler with must_suffix.
* test/lisp/net/tramp-tests.el (tramp-test27-load): Extend test.
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r-- | lisp/net/tramp.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 9552e51c48d..b08bc63e8a2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4584,14 +4584,9 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.") (setq file (concat file ".elc"))) ((file-exists-p (concat file ".el")) (setq file (concat file ".el"))))) - (when must-suffix - ;; The first condition is always true for absolute file names. - ;; Included for safety's sake. - (unless (or (file-name-directory file) - (string-match-p (rx ".el" (? "c") eos) file)) - (tramp-error - v 'file-error - "File `%s' does not include a `.el' or `.elc' suffix" file))) + (when (and must-suffix (not (string-match-p (rx ".el" (? "c") eos) file))) + (tramp-error + v 'file-error "File `%s' does not include a `.el' or `.elc' suffix" file)) (unless (or noerror (file-exists-p file)) (tramp-error v 'file-missing file)) (if (not (file-exists-p file)) |