diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 40ea47ede40..bb7b266dd35 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -32,7 +32,6 @@ (require 'ansi-color) (require 'auth-source) (require 'format-spec) -(require 'ls-lisp) ;; Due to `tramp-handle-insert-directory'. (require 'parse-time) (require 'shell) (require 'subr-x) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index fb8112c384d..da34f31fea6 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -38,6 +38,7 @@ (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) @@ -2551,7 +2552,7 @@ The method used must be an out-of-band method." (access-file filename "Reading directory")) (with-parsed-tramp-file-name (expand-file-name filename) nil (if (and (featurep 'ls-lisp) - (not (symbol-value 'ls-lisp-use-insert-directory-program))) + (not ls-lisp-use-insert-directory-program)) (tramp-handle-insert-directory filename switches wildcard full-directory-p) (when (stringp switches) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f7d40cc1de5..12fc25b5ba9 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -63,6 +63,7 @@ (declare-function file-notify-rm-watch "filenotify") (declare-function netrc-parse "netrc") (defvar auto-save-file-name-transforms) +(defvar ls-lisp-use-insert-directory-program) ;; Reload `tramp-compat' when we reload `tramp-autoloads' of the GNU ;; ELPA package. @@ -4407,6 +4408,7 @@ Let-bind it when necessary.") (defun tramp-handle-insert-directory (filename switches &optional wildcard full-directory-p) "Like `insert-directory' for Tramp files." + (require 'ls-lisp) (unless switches (setq switches "")) ;; Mark trailing "/". (when (and (directory-name-p filename) @@ -4419,7 +4421,6 @@ Let-bind it when necessary.") (with-tramp-progress-reporter v 0 (format "Opening directory %s" filename) (let (ls-lisp-use-insert-directory-program start) ;; Silence byte compiler. - (ignore ls-lisp-use-insert-directory-program) (tramp-run-real-handler #'insert-directory (list filename switches wildcard full-directory-p)) diff --git a/src/minibuf.c b/src/minibuf.c index d5f95968ae1..bcb7eb9375d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1266,9 +1266,6 @@ minibuffer_unwind (void) set_window_buffer (window, Fcar (entry), 0, 0); Fset_window_start (window, Fcar (Fcdr (entry)), Qnil); Fset_window_point (window, Fcar (Fcdr (Fcdr (entry)))); - /* set-window-configuration may/will have unselected the - mini-window as the selected window. Restore it. */ - Fset_frame_selected_window (exp_MB_frame, window, Qnil); } else set_window_buffer (window, nth_minibuffer (0), 0, 0);