summaryrefslogtreecommitdiff
path: root/lisp/files-x.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-04-02 11:02:54 +0200
committerMichael Albinus <michael.albinus@gmx.de>2017-04-02 11:02:54 +0200
commit59191cd0cbe8463f9095a71cb4048bb138d6e446 (patch)
treeea0e063deb25c07c6e315b02d3db427e25e917b8 /lisp/files-x.el
parent21918f4e1c5939038c7e8d0b8b8e8a647c086796 (diff)
downloademacs-59191cd0cbe8463f9095a71cb4048bb138d6e446.tar.gz
Apply connecion-local variables for shells
* doc/misc/tramp.texi (Remote processes): Show use of connection-local variables. Don't mention Emacs 23 anymore. (Frequently Asked Questions): Precise Emacs and MS Windows version. * lisp/files-x.el (connection-local-normalize-criteria): Suppress nil properties. (connection-local-set-profiles, with-connection-local-profiles): Adapt docstring. * lisp/shell.el (shell): Apply connecion-local variables.
Diffstat (limited to 'lisp/files-x.el')
-rw-r--r--lisp/files-x.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/files-x.el b/lisp/files-x.el
index a0cad708425..b7c6f51e658 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -585,7 +585,7 @@ Return a new ordered plist list containing only property names from PROPERTIES."
nil
(mapcar
(lambda (property)
- (when (plist-member criteria property)
+ (when (and (plist-member criteria property) (plist-get criteria property))
(list property (plist-get criteria property))))
properties)))
@@ -606,12 +606,10 @@ using this connection, see `connection-local-criteria-alist'."
;;;###autoload
(defun connection-local-set-profiles (criteria &rest profiles)
- "Add PROFILES for remote servers.
-CRITERIA is either a regular expression identifying a remote
-server, or a function with one argument IDENTIFICATION, which
-returns non-nil when a remote server shall apply PROFILE's
-variables. If CRITERIA is nil, it always applies.
-PROFILES are the names of a connection profile (a symbol).
+ "Add PROFILES for CRITERIA.
+CRITERIA is a plist identifying a connection and the application
+using this connection, see `connection-local-criteria-alist'.
+PROFILES are the names of connection profiles (a symbol).
When a connection to a remote server is opened and CRITERIA
matches to that server, the connection-local variables from
@@ -678,7 +676,7 @@ will not be changed."
;;;###autoload
(defmacro with-connection-local-profiles (profiles &rest body)
"Apply connection-local variables according to PROFILES in current buffer.
-Execute BODY, and unwind connection local variables."
+Execute BODY, and unwind connection-local variables."
(declare (indent 1) (debug t))
`(let ((enable-connection-local-variables t)
(old-buffer-local-variables (buffer-local-variables))