]> git.eshelyaron.com Git - emacs.git/commitdiff
Preserve connection-local settings in dired
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 2 Jul 2022 11:19:04 +0000 (13:19 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 2 Jul 2022 11:19:04 +0000 (13:19 +0200)
* lisp/dired-aux.el (dired-shell-command):
Preserve connection-local settings.  (Bug#56333)

lisp/dired-aux.el

index 095f80017019fe6cabdc898f3d5d04bb4d97d004..c403cc5cbdeda8726bb52e0e917af66152ec352b 100644 (file)
@@ -1056,18 +1056,19 @@ Return the result of `process-file' - zero for success."
         (dir default-directory))
     (with-current-buffer (get-buffer-create out-buffer)
       (erase-buffer)
-      (let* ((default-directory dir)
-             (res (process-file
-                   shell-file-name
-                   nil
-                   t
-                   nil
-                   shell-command-switch
-                   cmd)))
-        (dired-uncache dir)
-        (unless (zerop res)
-          (pop-to-buffer out-buffer))
-        res))))
+      (let ((default-directory dir) res)
+        (with-connection-local-variables
+         (setq res (process-file
+                    shell-file-name
+                    nil
+                    t
+                    nil
+                    shell-command-switch
+                    cmd))
+         (dired-uncache dir)
+         (unless (zerop res)
+           (pop-to-buffer out-buffer))
+         res)))))
 
 \f
 ;;; Commands that delete or redisplay part of the dired buffer