emacs-diffs
[Top][All Lists]
Advanced

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

master 45125e019c3: tramp: Tweak the ls-lisp declarations


From: Stefan Monnier
Subject: master 45125e019c3: tramp: Tweak the ls-lisp declarations
Date: Sat, 3 Feb 2024 23:05:16 -0500 (EST)

branch: master
commit 45125e019c3698ff74ccb2183b789c25f9d3f574
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    tramp: Tweak the ls-lisp declarations
    
    * lisp/net/tramp-sh.el (ls-lisp-use-insert-directory-program): Don't
    declare its existence...
    (tramp-sh-handle-insert-directory): ...test it instead.
    
    * lisp/net/tramp.el (ls-lisp-dirs-first, ls-lisp-emulation)
    (ls-lisp-ignore-case, ls-lisp-use-insert-directory-program)
    (ls-lisp-verbosity): Move declaration...
    (tramp-handle-insert-directory): ...to the point where we have a good
    reason to think these variables exist.
---
 lisp/net/tramp-sh.el |  3 +--
 lisp/net/tramp.el    | 10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 6bb1d976ec5..7656da81dcc 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -38,7 +38,6 @@
 (declare-function dired-compress-file "dired-aux")
 (declare-function dired-remove-file "dired-aux")
 (defvar dired-compress-file-suffixes)
-(defvar ls-lisp-use-insert-directory-program)
 ;; Added in Emacs 28.1.
 (defvar process-file-return-signal-string)
 (defvar vc-handled-backends)
@@ -2636,7 +2635,7 @@ The method used must be an out-of-band method."
 (defun tramp-sh-handle-insert-directory
     (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files."
-  (if (and (featurep 'ls-lisp)
+  (if (and (boundp 'ls-lisp-use-insert-directory-program)
           (not ls-lisp-use-insert-directory-program))
       (tramp-handle-insert-directory
        filename switches wildcard full-directory-p)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 74d95757e46..7800efc2a5e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -67,11 +67,6 @@
 (declare-function file-notify-rm-watch "filenotify")
 (declare-function netrc-parse "netrc")
 (defvar auto-save-file-name-transforms)
-(defvar ls-lisp-dirs-first)
-(defvar ls-lisp-emulation)
-(defvar ls-lisp-ignore-case)
-(defvar ls-lisp-use-insert-directory-program)
-(defvar ls-lisp-verbosity)
 (defvar tramp-prefix-format)
 (defvar tramp-prefix-regexp)
 (defvar tramp-method-regexp)
@@ -4189,6 +4184,11 @@ Let-bind it when necessary.")
     (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files."
   (require 'ls-lisp)
+  (defvar ls-lisp-dirs-first)
+  (defvar ls-lisp-emulation)
+  (defvar ls-lisp-ignore-case)
+  (defvar ls-lisp-use-insert-directory-program)
+  (defvar ls-lisp-verbosity)
   (unless switches (setq switches ""))
   ;; Mark trailing "/".
   (when (and (directory-name-p filename)



reply via email to

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