From: Michael Albinus Date: Sat, 1 Jun 2024 17:22:21 +0000 (+0200) Subject: Minor Tramp changes X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16a137c0b359c2cb4f218763bd990faf1529c3db;p=emacs.git Minor Tramp changes * 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) --- diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index b794d8b481a..9db313e3ed0 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. ;; Author: Jürgen Hötzel +;; Maintainer: Michael Albinus ;; Keywords: comm, processes ;; Package: tramp diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index bbffdf7f3d9..f1e7a801ec1 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -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) diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el index 278ce033da6..d0edbfea1e8 100644 --- a/lisp/net/tramp-container.el +++ b/lisp/net/tramp-container.el @@ -3,6 +3,7 @@ ;; Copyright © 2022-2024 Free Software Foundation, Inc. ;; Author: Brian Cully +;; Maintainer: Michael Albinus ;; Keywords: comm, processes ;; Package: tramp