diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2023-03-23 17:09:52 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2023-03-23 17:09:52 +0100 |
commit | b19d040a4fe709b032143d8e569690073befabdf (patch) | |
tree | acb7a74cd70f241da95745c068ce7045e797edda /lisp/net/tramp-integration.el | |
parent | 117a29fd1889591d01e1bb5ede4eec9526a482ad (diff) | |
download | emacs-b19d040a4fe709b032143d8e569690073befabdf.tar.gz |
New user option remote-file-name-inhibit-auto-save
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Mention remote-file-name-inhibit-auto-save.
(Frequently Asked Questions): Describe, how to suppress auto-save.
* etc/NEWS: Add remote-file-name-inhibit-auto-save.
* lisp/simple.el (remote-file-name-inhibit-auto-save): New defcustom.
(auto-save-mode): Handle it. (Bug#62260)
* lisp/net/tramp-integration.el
(tramp-set-connection-local-variables-for-buffer): Declare.
(find-file-hook): Add `tramp-set-connection-local-variables-for-buffer'.
Diffstat (limited to 'lisp/net/tramp-integration.el')
-rw-r--r-- | lisp/net/tramp-integration.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 5b3259eab03..d7fcd8afefa 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -42,9 +42,10 @@ (declare-function shortdoc-add-function "shortdoc") (declare-function tramp-dissect-file-name "tramp") (declare-function tramp-file-name-equal-p "tramp") -(declare-function tramp-tramp-file-p "tramp") (declare-function tramp-rename-files "tramp-cmds") (declare-function tramp-rename-these-files "tramp-cmds") +(declare-function tramp-set-connection-local-variables-for-buffer "tramp") +(declare-function tramp-tramp-file-p "tramp") (defvar eshell-path-env) (defvar ido-read-file-name-non-ido) (defvar info-lookup-alist) @@ -549,6 +550,14 @@ See `tramp-process-attributes-ps-format'.") '(:application tramp :machine "localhost") local-profile)) +;; Set connection-local variables for buffers visiting a file. + +(add-hook 'find-file-hook #'tramp-set-connection-local-variables-for-buffer -50) +(add-hook 'tramp-unload-hook + (lambda () + (remove-hook + 'find-file-hook #'tramp-set-connection-local-variables-for-buffer))) + (add-hook 'tramp-unload-hook (lambda () (unload-feature 'tramp-integration 'force))) |