]> git.eshelyaron.com Git - emacs.git/commitdiff
; Clean up some 'require' and 'declare-function' calls in Eshell
authorJim Porter <jporterbugs@gmail.com>
Fri, 10 May 2024 16:27:30 +0000 (09:27 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sun, 12 May 2024 15:48:29 +0000 (17:48 +0200)
* lisp/eshell/em-ls.el:
* lisp/eshell/esh-cmd.el:
* lisp/eshell/esh-mode.el:
* lisp/eshell/esh-ext.el: Remove superfluous 'declare-function' calls.

* lisp/eshell/esh-proc.el (pcomplete): Require this explicitly instead
of transitively.

(cherry picked from commit ffc70962ca5fea86afcd984caa7770ab87a452a2)

lisp/eshell/em-ls.el
lisp/eshell/esh-cmd.el
lisp/eshell/esh-ext.el
lisp/eshell/esh-mode.el
lisp/eshell/esh-proc.el

index fd89a9f778e4ab127c790eed3bc6d75429e9ff97..62ad7ff72a1c514412b9eeeee95038eb2d8bffbd 100644 (file)
@@ -293,7 +293,6 @@ instead."
             (eshell-do-ls (nconc switches (list target)))))))))
 
 
-(declare-function eshell-extended-glob "em-glob" (glob))
 (declare-function dired-read-dir-and-switches "dired" (str))
 (declare-function dired-goto-next-file "dired" ())
 
index b220855299e2fabb1175ac18f30ab7e5d6690701..b489822f18805a30e5756ae996bc52bac6b790bc 100644 (file)
 ;;; Code:
 
 (require 'esh-util)
-(require 'eldoc)
 (require 'esh-arg)
 (require 'esh-proc)
 (require 'esh-module)
 (require 'esh-io)
 (require 'esh-ext)
+
+(require 'eldoc)
 (require 'generator)
+(require 'pcomplete)
 
 (eval-when-compile
-  (require 'cl-lib)
-  (require 'pcomplete))
-
-(declare-function pcomplete--here "pcomplete"
-                 (&optional form stub paring form-only))
+  (require 'cl-lib))
 
 (defgroup eshell-cmd nil
   "Executing an Eshell command is as simple as typing it in and \
index 44861c222b8887ac308d6297fa05a92f8ef85372..b4fce7a82a21817ea4e38b3850e83c635f057cce 100644 (file)
 
 ;;; Code:
 
-(require 'esh-util)
-
 (eval-when-compile (require 'cl-lib))
 (require 'esh-io)
 (require 'esh-arg)
 (require 'esh-opt)
+(require 'esh-proc)
+(require 'esh-util)
 
 (defgroup eshell-ext nil
   "External commands are invoked when operating system executables are
@@ -90,10 +90,6 @@ but Eshell will be able to understand
        (setq list (cdr list)))
       file)))
 
-;; This file provides itself then eval-when-compile loads files that require it.
-;; This causes spurious "might not be defined at runtime" warnings.
-(declare-function eshell-search-path "esh-ext" (name))
-
 (defcustom eshell-windows-shell-file
   (if (eshell-under-windows-p)
       (if (string-match "\\(cmdproxy\\|sh\\)\\.\\(com\\|exe\\)"
@@ -244,8 +240,6 @@ An external command simply means external to Emacs."
     (cl-assert interp)
     (if (functionp (car interp))
        (apply (car interp) (append (cdr interp) args))
-      (require 'esh-proc)
-      (declare-function eshell-gather-process-output "esh-proc" (command args))
       (eshell-gather-process-output
        (car interp) (append (cdr interp) args)))))
 
index 5de200ce4b58884d25e0144fe1df4cda66bc75c1..78a448a41a5c6926a68644fb68850d87d83cd002 100644 (file)
@@ -694,9 +694,6 @@ newline."
 (defun eshell-send-eof-to-process ()
   "Send EOF to the currently-running \"head\" process."
   (interactive)
-  (require 'esh-mode)
-  (declare-function eshell-send-input "esh-mode"
-                    (&optional use-region queue-p no-newline))
   (eshell-send-input nil nil t)
   (when (eshell-head-process)
     (process-send-eof (eshell-head-process))))
index 35c81f6a4b2491d0bbef503726f17f02e91878d7..34db5e1c77102ebd0f2c88087d278a0d73d14272 100644 (file)
@@ -27,6 +27,8 @@
 (require 'esh-io)
 (require 'esh-util)
 
+(require 'pcomplete)
+
 (defgroup eshell-proc nil
   "When Eshell invokes external commands, it always does so
 asynchronously, so that Emacs isn't tied up waiting for the process to