Fix Tramp shortdoc integration
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 25 Sep 2024 17:43:07 +0000 (19:43 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 25 Sep 2024 17:43:07 +0000 (19:43 +0200)
* lisp/net/tramp-integration.el (tramp-syntax): Declare.
(shortdoc): Check, that Tramp has `default' syntax.

lisp/net/tramp-integration.el

index 8d039c25eaeca39fe9c22054837d352ec670c71a..465b7dbbaecb7ec2b3ba84a92a561e6752104204 100644 (file)
@@ -54,6 +54,7 @@
 (defvar shortdoc--groups)
 (defvar tramp-current-connection)
 (defvar tramp-postfix-host-format)
+(defvar tramp-syntax)
 (defvar tramp-use-connection-share)
 
 ;;; Fontification of `read-file-name':
@@ -277,7 +278,8 @@ NAME must be equal to `tramp-current-connection'."
 (tramp--with-startup
  (with-eval-after-load 'shortdoc
    ;; Some packages deactivate Tramp.  They don't deserve a shortdoc entry then.
-   (when (file-remote-p "/ssh:user@host:/tmp/foo")
+   (when (and (file-remote-p "/ssh:user@host:/tmp/foo")
+              (eq tramp-syntax 'default))
      (dolist (elem `((file-remote-p
                      :eval (file-remote-p "/ssh:user@host:/tmp/foo")
                      :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method)