diff options
| author | JD Smith | 2025-08-10 17:17:47 -0400 |
|---|---|---|
| committer | JD Smith | 2025-08-17 11:17:34 -0400 |
| commit | 1f4e2e82649bb2a122b1406caf645ea06a933dc6 (patch) | |
| tree | 46b051d84c2ef8b9a8bd6b24c36bbaa42b766477 | |
| parent | da3973b657db46501e650fb4af4a4f3bb07c77fd (diff) | |
| download | emacs-1f4e2e82649bb2a122b1406caf645ea06a933dc6.tar.gz emacs-1f4e2e82649bb2a122b1406caf645ea06a933dc6.zip | |
Adapt tramp to new autoload-macro expand
Bug #78995.
* lisp/net/tramp-compat.el (tramp-loaddefs): suppress error on requiring
tramp-loaddef.
* lisp/net/tramp.el (tramp--with-startup): declare autoload-macro
expand, and suppress warnings about this declare form on older versions
of Emacs.
| -rw-r--r-- | lisp/net/tramp-compat.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 9787e3a6553..5db8f1f61da 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (require 'tramp-loaddefs) | 32 | (require 'tramp-loaddefs nil t) ; guard against load during autoload gen |
| 33 | (require 'ansi-color) | 33 | (require 'ansi-color) |
| 34 | (require 'auth-source) | 34 | (require 'auth-source) |
| 35 | (require 'format-spec) | 35 | (require 'format-spec) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 503b370cb3d..e80a470957f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -103,8 +103,15 @@ | |||
| 103 | 103 | ||
| 104 | (put 'tramp--startup-hook 'tramp-suppress-trace t) | 104 | (put 'tramp--startup-hook 'tramp-suppress-trace t) |
| 105 | 105 | ||
| 106 | ;; TODO: once (autoload-macro expand) is available in all supported | ||
| 107 | ;; Emacs versions, this can be eliminated: | ||
| 108 | ;; backward compatibility for autoload-macro declare form | ||
| 109 | (unless (assq 'autoload-macro macro-declarations-alist) | ||
| 110 | (push '(autoload-macro ignore) macro-declarations-alist)) | ||
| 111 | |||
| 106 | (defmacro tramp--with-startup (&rest body) | 112 | (defmacro tramp--with-startup (&rest body) |
| 107 | "Schedule BODY to be executed at the end of tramp.el." | 113 | "Schedule BODY to be executed at the end of tramp.el." |
| 114 | (declare (autoload-macro expand)) | ||
| 108 | `(add-hook 'tramp--startup-hook (lambda () ,@body))) | 115 | `(add-hook 'tramp--startup-hook (lambda () ,@body))) |
| 109 | 116 | ||
| 110 | (eval-and-compile | 117 | (eval-and-compile |