]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor Tramp changes
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 1 Jun 2024 17:22:21 +0000 (19:22 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 2 Jun 2024 06:33:47 +0000 (08:33 +0200)
* lisp/net/tramp-adb.el:
* lisp/net/tramp-container.el: Add myself as maintainer.

* lisp/net/tramp-compat.el (connection-local-default-application):
Define if not bound.
(tramp-compat-connection-local-p, tramp-compat-connection-local-value):
Use it.

(cherry picked from commit f0cd7eab0967c787703f144ac9d7c04e1d866306)

lisp/net/tramp-adb.el
lisp/net/tramp-compat.el
lisp/net/tramp-container.el

index b794d8b481a63b43ac7c155895c6400085cbce05..9db313e3ed0f08d61857d467288eccea0c0f4650 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
 
 ;; Author: Jürgen Hötzel <juergen@archlinux.org>
+;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
 
index bbffdf7f3d9dc0f0a4659aee2355192712bf70ee..f1e7a801ec163144cb9a7c26b0e97705b8564413 100644 (file)
@@ -304,6 +304,12 @@ Also see `ignore'."
     (lambda (function sequence)
       (delq nil (seq-map function sequence)))))
 
+;; User option `connection-local-default-application' is new in Emacs 29.1.
+(unless (boundp 'connection-local-default-application)
+  (defvar connection-local-default-application 'tramp
+    "Default application in connection-local functions, a symbol.
+This variable must not be changed globally."))
+
 ;; User option `password-colon-equivalents' is new in Emacs 30.1.
 (if (boundp 'password-colon-equivalents)
     (defvaralias
@@ -329,9 +335,10 @@ If APPLICATION is nil, the value of
     (declare (debug (symbolp &optional form)))
     (unless (symbolp variable)
       (signal 'wrong-type-argument (list 'symbolp variable)))
-    `(let ((criteria
-            (connection-local-criteria-for-default-directory ,application))
-           connection-local-variables-alist file-local-variables-alist)
+    `(let* ((connection-local-default-application
+            (or ,application connection-local-default-application))
+           (criteria (connection-local-criteria-for-default-directory))
+            connection-local-variables-alist file-local-variables-alist)
        (when criteria
         (hack-connection-local-variables criteria)
         (and (assq ',variable connection-local-variables-alist) t)))))
@@ -348,9 +355,10 @@ value is the default binding of the variable."
     (declare (debug (symbolp &optional form)))
     (unless (symbolp variable)
       (signal 'wrong-type-argument (list 'symbolp variable)))
-    `(let ((criteria
-            (connection-local-criteria-for-default-directory ,application))
-           connection-local-variables-alist file-local-variables-alist)
+    `(let* ((connection-local-default-application
+            (or ,application connection-local-default-application))
+           (criteria (connection-local-criteria-for-default-directory))
+            connection-local-variables-alist file-local-variables-alist)
        (if (not criteria)
            ,variable
         (hack-connection-local-variables criteria)
index 278ce033da66661ffaa420ed7895b45733e53591..d0edbfea1e8c3f49b1a09de32c064d91ca1ba0cb 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright © 2022-2024 Free Software Foundation, Inc.
 
 ;; Author: Brian Cully <bjc@kublai.com>
+;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp