diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-03-18 12:25:32 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-03-18 12:25:32 +0100 |
commit | 499f2085fa6fce6c7a2868c8d27d465f43d53f0f (patch) | |
tree | c5a77d92b9933a5c9ee38cb6fa2f3d5b97aebaa7 /test/lisp/files-x-tests.el | |
parent | ce26657b5d7e77d851ed9267d554f4f48e43a0b6 (diff) | |
download | emacs-499f2085fa6fce6c7a2868c8d27d465f43d53f0f.tar.gz emacs-499f2085fa6fce6c7a2868c8d27d465f43d53f0f.tar.bz2 emacs-499f2085fa6fce6c7a2868c8d27d465f43d53f0f.zip |
Make application configurable in 'with-connection-local-variables'
* doc/lispref/variables.texi (Connection Local Variables):
Explain 'connection-local-default-application'.
* etc/NEWS: Mention 'connection-local-default-application'.
* lisp/files-x.el (connection-local-default-application): New variable.
(connection-local-criteria-for-default-directory): Use it. (Bug#54405)
* test/lisp/files-x-tests.el
(files-x-test-with-connection-local-variables): Extend test.
Diffstat (limited to 'test/lisp/files-x-tests.el')
-rw-r--r-- | test/lisp/files-x-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lisp/files-x-tests.el b/test/lisp/files-x-tests.el index 60787e1cd3d..7ee2f0c1a65 100644 --- a/test/lisp/files-x-tests.el +++ b/test/lisp/files-x-tests.el @@ -325,6 +325,9 @@ (should-not (boundp 'remote-shell-file-name)) (should (string-equal (symbol-value 'remote-null-device) "null")) + (connection-local-set-profiles + files-x-test--application 'remote-bash) + (with-connection-local-variables ;; All connection-local variables are set. They apply in ;; reverse order in `connection-local-variables-alist'. @@ -347,6 +350,21 @@ (should (string-equal (symbol-value 'remote-shell-file-name) "/bin/ksh")) (should + (string-equal (symbol-value 'remote-null-device) "/dev/null")) + + ;; Run another instance of `with-connection-local-variables' + ;; with a different application. + (let ((connection-local-default-application (cadr files-x-test--application))) + (with-connection-local-variables + ;; The proper variable values are set. + (should + (string-equal (symbol-value 'remote-shell-file-name) "/bin/bash")) + (should + (string-equal (symbol-value 'remote-null-device) "/dev/null")))) + ;; The variable values are reset. + (should + (string-equal (symbol-value 'remote-shell-file-name) "/bin/ksh")) + (should (string-equal (symbol-value 'remote-null-device) "/dev/null"))) ;; Everything is rewound. The old variable values are reset. |