]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind `enable-local-variables' in `hack-connection-local-variables'
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 24 Mar 2019 13:24:31 +0000 (14:24 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 24 Mar 2019 13:24:31 +0000 (14:24 +0100)
* lisp/files-x.el (hack-connection-local-variables):
Bind `enable-local-variables', instead of re-declaring
`safe-local-variable-p'.

lisp/files-x.el

index 5353e54158ee5a06f4399164f85249519cfe9082..b71e9204f324d09cde948bbb4422c595338d49a7 100644 (file)
@@ -31,7 +31,6 @@
 ;;; Code:
 
 (eval-when-compile (require 'subr-x)) ; for string-trim-right
-(eval-when-compile (require 'cl-lib)) ; for cl-letf
 
 \f
 ;;; Commands to add/delete file-local/directory-local variables.
@@ -690,7 +689,7 @@ This does nothing if `enable-connection-local-variables' is nil."
     ;; Push them to `file-local-variables-alist'.  Connection-local
     ;; variables do not appear from external files.  So we can regard
     ;; them as safe.
-    (cl-letf (((symbol-function 'safe-local-variable-p) (lambda (_sym _val) t)))
+    (let ((enable-local-variables :all))
       (hack-local-variables-filter connection-local-variables-alist nil))))
 
 ;;;###autoload