aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Porter2024-05-10 09:27:30 -0700
committerJim Porter2024-05-10 09:27:30 -0700
commitffc70962ca5fea86afcd984caa7770ab87a452a2 (patch)
tree6f259d03b086d59eebc75060646b4c0790bef0e5
parent184d6e8c02345583264b053bb59ae031bb1c5a00 (diff)
downloademacs-ffc70962ca5fea86afcd984caa7770ab87a452a2.tar.gz
emacs-ffc70962ca5fea86afcd984caa7770ab87a452a2.zip
; Clean up some 'require' and 'declare-function' calls in Eshell
* 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.
-rw-r--r--lisp/eshell/em-ls.el1
-rw-r--r--lisp/eshell/esh-cmd.el10
-rw-r--r--lisp/eshell/esh-ext.el10
-rw-r--r--lisp/eshell/esh-mode.el3
-rw-r--r--lisp/eshell/esh-proc.el2
5 files changed, 8 insertions, 18 deletions
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index fd89a9f778e..62ad7ff72a1 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -293,7 +293,6 @@ instead."
293 (eshell-do-ls (nconc switches (list target))))))))) 293 (eshell-do-ls (nconc switches (list target)))))))))
294 294
295 295
296(declare-function eshell-extended-glob "em-glob" (glob))
297(declare-function dired-read-dir-and-switches "dired" (str)) 296(declare-function dired-read-dir-and-switches "dired" (str))
298(declare-function dired-goto-next-file "dired" ()) 297(declare-function dired-goto-next-file "dired" ())
299 298
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index b220855299e..b489822f188 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -101,20 +101,18 @@
101;;; Code: 101;;; Code:
102 102
103(require 'esh-util) 103(require 'esh-util)
104(require 'eldoc)
105(require 'esh-arg) 104(require 'esh-arg)
106(require 'esh-proc) 105(require 'esh-proc)
107(require 'esh-module) 106(require 'esh-module)
108(require 'esh-io) 107(require 'esh-io)
109(require 'esh-ext) 108(require 'esh-ext)
109
110(require 'eldoc)
110(require 'generator) 111(require 'generator)
112(require 'pcomplete)
111 113
112(eval-when-compile 114(eval-when-compile
113 (require 'cl-lib) 115 (require 'cl-lib))
114 (require 'pcomplete))
115
116(declare-function pcomplete--here "pcomplete"
117 (&optional form stub paring form-only))
118 116
119(defgroup eshell-cmd nil 117(defgroup eshell-cmd nil
120 "Executing an Eshell command is as simple as typing it in and \ 118 "Executing an Eshell command is as simple as typing it in and \
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index 44861c222b8..b4fce7a82a2 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -31,12 +31,12 @@
31 31
32;;; Code: 32;;; Code:
33 33
34(require 'esh-util)
35
36(eval-when-compile (require 'cl-lib)) 34(eval-when-compile (require 'cl-lib))
37(require 'esh-io) 35(require 'esh-io)
38(require 'esh-arg) 36(require 'esh-arg)
39(require 'esh-opt) 37(require 'esh-opt)
38(require 'esh-proc)
39(require 'esh-util)
40 40
41(defgroup eshell-ext nil 41(defgroup eshell-ext nil
42 "External commands are invoked when operating system executables are 42 "External commands are invoked when operating system executables are
@@ -90,10 +90,6 @@ but Eshell will be able to understand
90 (setq list (cdr list))) 90 (setq list (cdr list)))
91 file))) 91 file)))
92 92
93;; This file provides itself then eval-when-compile loads files that require it.
94;; This causes spurious "might not be defined at runtime" warnings.
95(declare-function eshell-search-path "esh-ext" (name))
96
97(defcustom eshell-windows-shell-file 93(defcustom eshell-windows-shell-file
98 (if (eshell-under-windows-p) 94 (if (eshell-under-windows-p)
99 (if (string-match "\\(cmdproxy\\|sh\\)\\.\\(com\\|exe\\)" 95 (if (string-match "\\(cmdproxy\\|sh\\)\\.\\(com\\|exe\\)"
@@ -244,8 +240,6 @@ An external command simply means external to Emacs."
244 (cl-assert interp) 240 (cl-assert interp)
245 (if (functionp (car interp)) 241 (if (functionp (car interp))
246 (apply (car interp) (append (cdr interp) args)) 242 (apply (car interp) (append (cdr interp) args))
247 (require 'esh-proc)
248 (declare-function eshell-gather-process-output "esh-proc" (command args))
249 (eshell-gather-process-output 243 (eshell-gather-process-output
250 (car interp) (append (cdr interp) args))))) 244 (car interp) (append (cdr interp) args)))))
251 245
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 5de200ce4b5..78a448a41a5 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -694,9 +694,6 @@ newline."
694(defun eshell-send-eof-to-process () 694(defun eshell-send-eof-to-process ()
695 "Send EOF to the currently-running \"head\" process." 695 "Send EOF to the currently-running \"head\" process."
696 (interactive) 696 (interactive)
697 (require 'esh-mode)
698 (declare-function eshell-send-input "esh-mode"
699 (&optional use-region queue-p no-newline))
700 (eshell-send-input nil nil t) 697 (eshell-send-input nil nil t)
701 (when (eshell-head-process) 698 (when (eshell-head-process)
702 (process-send-eof (eshell-head-process)))) 699 (process-send-eof (eshell-head-process))))
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 35c81f6a4b2..34db5e1c771 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -27,6 +27,8 @@
27(require 'esh-io) 27(require 'esh-io)
28(require 'esh-util) 28(require 'esh-util)
29 29
30(require 'pcomplete)
31
30(defgroup eshell-proc nil 32(defgroup eshell-proc nil
31 "When Eshell invokes external commands, it always does so 33 "When Eshell invokes external commands, it always does so
32asynchronously, so that Emacs isn't tied up waiting for the process to 34asynchronously, so that Emacs isn't tied up waiting for the process to