emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 85d08d5788e: Minor connection-local variables fixes


From: Michael Albinus
Subject: emacs-29 85d08d5788e: Minor connection-local variables fixes
Date: Mon, 23 Oct 2023 11:07:29 -0400 (EDT)

branch: emacs-29
commit 85d08d5788eba1e7195f6ea8888e802aea87f19d
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Minor connection-local variables fixes
    
    * doc/emacs/custom.texi (Connection Variables): Warn about
    specifying the same variable twice.
    
    * lisp/files-x.el (connection-local-get-profiles): Normalize criteria.
---
 doc/emacs/custom.texi | 4 ++++
 lisp/files-x.el       | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 09473d7deb7..2bc39095f3c 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1572,6 +1572,10 @@ discriminate for the properties @code{:protocol} (this 
is the Tramp
 method) or @code{:user} (a remote user name).  The @code{nil} criteria
 matches all buffers with a remote default directory.
 
+  Be careful when declaring different profiles with the same variable,
+and setting these profiles to criteria which could match in parallel.
+It is unspecified which variable value is used then.
+
 @node Key Bindings
 @section Customizing Key Bindings
 @cindex key bindings
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 9b1a7a17902..477ca059b2a 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -644,7 +644,8 @@ Return a reordered plist."
   "Return the connection profiles list for CRITERIA.
 CRITERIA is a plist identifying a connection and the application
 using this connection, see `connection-local-criteria-alist'."
-  (let (profiles)
+  (let ((criteria (connection-local-normalize-criteria criteria))
+        profiles)
     (dolist (crit-alist connection-local-criteria-alist)
       (let ((crit criteria)
             (match t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]