mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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.
This commit is contained in:
parent
4ebded3f5e
commit
45125e019c
2 changed files with 6 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue