(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
(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)))))
(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)