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.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tramp-loaddefs)
|
||||
(require 'tramp-loaddefs nil t) ; guard against load during autoload gen
|
||||
(require 'ansi-color)
|
||||
(require 'auth-source)
|
||||
(require 'format-spec)
|
||||
|
||||
@@ -103,8 +103,15 @@
|
||||
|
||||
(put 'tramp--startup-hook 'tramp-suppress-trace t)
|
||||
|
||||
;; TODO: once (autoload-macro expand) is available in all supported
|
||||
;; Emacs versions, this can be eliminated:
|
||||
;; backward compatibility for autoload-macro declare form
|
||||
(unless (assq 'autoload-macro macro-declarations-alist)
|
||||
(push '(autoload-macro ignore) macro-declarations-alist))
|
||||
|
||||
(defmacro tramp--with-startup (&rest body)
|
||||
"Schedule BODY to be executed at the end of tramp.el."
|
||||
(declare (autoload-macro expand))
|
||||
`(add-hook 'tramp--startup-hook (lambda () ,@body)))
|
||||
|
||||
(eval-and-compile
|
||||
|
||||
Reference in New Issue
Block a user