diff options
| author | Stefan Monnier | 2019-04-09 14:57:29 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-04-09 14:57:29 -0400 |
| commit | a017927c9ff627a0adf19ac3720bf6b2e77e5da5 (patch) | |
| tree | 687b8337af5fdda2109168b200467b48609e3080 | |
| parent | 1055eee692b2cdcee5ba7ee4ad8d92ead8fc30e5 (diff) | |
| download | emacs-a017927c9ff627a0adf19ac3720bf6b2e77e5da5.tar.gz emacs-a017927c9ff627a0adf19ac3720bf6b2e77e5da5.zip | |
Fix up Eshell 'require's after previous dependency reshuffle.
* lisp/eshell/em-unix.el:
* lisp/eshell/em-script.el:
* lisp/eshell/em-pred.el:
* lisp/eshell/em-dirs.el:
* lisp/eshell/em-alias.el:
Fix up 'require's to silence byte-compiler.
* lisp/eshell/esh-util.el (eshell-read-hosts-file): Don't limit number
of entries per line. Preserve the structure.
(eshell-read-hosts): Adjust accordingly.
| -rw-r--r-- | lisp/eshell/em-alias.el | 8 | ||||
| -rw-r--r-- | lisp/eshell/em-banner.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-cmpl.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-dirs.el | 11 | ||||
| -rw-r--r-- | lisp/eshell/em-glob.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-hist.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-pred.el | 8 | ||||
| -rw-r--r-- | lisp/eshell/em-prompt.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-rebind.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-script.el | 10 | ||||
| -rw-r--r-- | lisp/eshell/em-smart.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-term.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-tramp.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-unix.el | 5 | ||||
| -rw-r--r-- | lisp/eshell/esh-arg.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-cmd.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-ext.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-io.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-mode.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-proc.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-util.el | 18 | ||||
| -rw-r--r-- | lisp/eshell/esh-var.el | 2 |
22 files changed, 41 insertions, 51 deletions
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index dbffd52aa76..c465d464d6a 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el | |||
| @@ -90,7 +90,7 @@ | |||
| 90 | 90 | ||
| 91 | ;;; Code: | 91 | ;;; Code: |
| 92 | 92 | ||
| 93 | (require 'eshell) | 93 | (require 'esh-mode) |
| 94 | 94 | ||
| 95 | ;;;###autoload | 95 | ;;;###autoload |
| 96 | (progn | 96 | (progn |
| @@ -141,12 +141,12 @@ file named by `eshell-aliases-file'.") | |||
| 141 | (defvar eshell-failed-commands-alist nil | 141 | (defvar eshell-failed-commands-alist nil |
| 142 | "An alist of command name failures.") | 142 | "An alist of command name failures.") |
| 143 | 143 | ||
| 144 | (defun eshell-alias-initialize () | 144 | (defun eshell-alias-initialize () ;Called from `eshell-mode' via intern-soft! |
| 145 | "Initialize the alias handling code." | 145 | "Initialize the alias handling code." |
| 146 | (make-local-variable 'eshell-failed-commands-alist) | 146 | (make-local-variable 'eshell-failed-commands-alist) |
| 147 | (add-hook 'eshell-alternate-command-hook 'eshell-fix-bad-commands t t) | 147 | (add-hook 'eshell-alternate-command-hook #'eshell-fix-bad-commands t t) |
| 148 | (eshell-read-aliases-list) | 148 | (eshell-read-aliases-list) |
| 149 | (add-hook 'eshell-named-command-hook 'eshell-maybe-replace-by-alias t t) | 149 | (add-hook 'eshell-named-command-hook #'eshell-maybe-replace-by-alias t t) |
| 150 | (make-local-variable 'eshell-complex-commands) | 150 | (make-local-variable 'eshell-complex-commands) |
| 151 | (add-to-list 'eshell-complex-commands 'eshell-command-aliased-p)) | 151 | (add-to-list 'eshell-complex-commands 'eshell-command-aliased-p)) |
| 152 | 152 | ||
diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el index 4a0b265ae0e..c284c1bd70d 100644 --- a/lisp/eshell/em-banner.el +++ b/lisp/eshell/em-banner.el | |||
| @@ -71,7 +71,7 @@ This can be any sexp, and should end with at least two newlines." | |||
| 71 | :type 'hook | 71 | :type 'hook |
| 72 | :group 'eshell-banner) | 72 | :group 'eshell-banner) |
| 73 | 73 | ||
| 74 | (defun eshell-banner-initialize () | 74 | (defun eshell-banner-initialize () ;Called from `eshell-mode' via intern-soft! |
| 75 | "Output a welcome banner on initialization." | 75 | "Output a welcome banner on initialization." |
| 76 | ;; it's important to use `eshell-interactive-print' rather than | 76 | ;; it's important to use `eshell-interactive-print' rather than |
| 77 | ;; `insert', because `insert' doesn't know how to interact with the | 77 | ;; `insert', because `insert' doesn't know how to interact with the |
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 25a6e88c8e6..e3bfd8d9d48 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el | |||
| @@ -244,7 +244,7 @@ to writing a completion function." | |||
| 244 | (let ((completion-at-point-functions '(lisp-completion-at-point))) | 244 | (let ((completion-at-point-functions '(lisp-completion-at-point))) |
| 245 | (completion-at-point))) | 245 | (completion-at-point))) |
| 246 | 246 | ||
| 247 | (defun eshell-cmpl-initialize () | 247 | (defun eshell-cmpl-initialize () ;Called from `eshell-mode' via intern-soft! |
| 248 | "Initialize the completions module." | 248 | "Initialize the completions module." |
| 249 | (set (make-local-variable 'pcomplete-command-completion-function) | 249 | (set (make-local-variable 'pcomplete-command-completion-function) |
| 250 | eshell-command-completion-function) | 250 | eshell-command-completion-function) |
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 93b10b59948..c28fd72f45c 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el | |||
| @@ -42,15 +42,11 @@ | |||
| 42 | 42 | ||
| 43 | ;;; Code: | 43 | ;;; Code: |
| 44 | 44 | ||
| 45 | (require 'eshell) | 45 | (require 'esh-mode) ;For eshell-directory-name |
| 46 | (require 'esh-var) ;For eshell-variable-aliases-list | ||
| 46 | (require 'ring) | 47 | (require 'ring) |
| 47 | (require 'esh-opt) | 48 | (require 'esh-opt) |
| 48 | 49 | ||
| 49 | (declare-function eshell-apply-indices "esh-var") | ||
| 50 | (defvar eshell-variable-aliases-list) | ||
| 51 | (defvar eshell-directory-name) | ||
| 52 | (defvar eshell-mode) | ||
| 53 | |||
| 54 | ;;;###autoload | 50 | ;;;###autoload |
| 55 | (progn | 51 | (progn |
| 56 | (defgroup eshell-dirs nil | 52 | (defgroup eshell-dirs nil |
| @@ -174,9 +170,8 @@ Thus, this does not include the current directory.") | |||
| 174 | 170 | ||
| 175 | ;;; Functions: | 171 | ;;; Functions: |
| 176 | 172 | ||
| 177 | (defun eshell-dirs-initialize () | 173 | (defun eshell-dirs-initialize () ;Called from `eshell-mode' via intern-soft! |
| 178 | "Initialize the builtin functions for Eshell." | 174 | "Initialize the builtin functions for Eshell." |
| 179 | (require 'esh-var) | ||
| 180 | (make-local-variable 'eshell-variable-aliases-list) | 175 | (make-local-variable 'eshell-variable-aliases-list) |
| 181 | (setq eshell-variable-aliases-list | 176 | (setq eshell-variable-aliases-list |
| 182 | (append | 177 | (append |
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index f03243a6af4..99c52ea0d30 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el | |||
| @@ -125,7 +125,7 @@ This option slows down recursive glob processing by quite a bit." | |||
| 125 | 125 | ||
| 126 | ;;; Functions: | 126 | ;;; Functions: |
| 127 | 127 | ||
| 128 | (defun eshell-glob-initialize () | 128 | (defun eshell-glob-initialize () ;Called from `eshell-mode' via intern-soft! |
| 129 | "Initialize the extended globbing code." | 129 | "Initialize the extended globbing code." |
| 130 | ;; it's important that `eshell-glob-chars-list' come first | 130 | ;; it's important that `eshell-glob-chars-list' come first |
| 131 | (when (boundp 'eshell-special-chars-outside-quoting) | 131 | (when (boundp 'eshell-special-chars-outside-quoting) |
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index bc0da96c588..614faaa131e 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el | |||
| @@ -216,7 +216,7 @@ Returns non-nil if INPUT is blank." | |||
| 216 | Returns nil if INPUT is prepended by blank space, otherwise non-nil." | 216 | Returns nil if INPUT is prepended by blank space, otherwise non-nil." |
| 217 | (not (string-match-p "\\`\\s-+" input))) | 217 | (not (string-match-p "\\`\\s-+" input))) |
| 218 | 218 | ||
| 219 | (defun eshell-hist-initialize () | 219 | (defun eshell-hist-initialize () ;Called from `eshell-mode' via intern-soft! |
| 220 | "Initialize the history management code for one Eshell buffer." | 220 | "Initialize the history management code for one Eshell buffer." |
| 221 | (when (eshell-using-module 'eshell-cmpl) | 221 | (when (eshell-using-module 'eshell-cmpl) |
| 222 | (add-hook 'pcomplete-try-first-hook | 222 | (add-hook 'pcomplete-try-first-hook |
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index dd3351b14d3..9bc856a2966 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el | |||
| @@ -46,9 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | ;;; Code: | 47 | ;;; Code: |
| 48 | 48 | ||
| 49 | (require 'esh-util) | 49 | (require 'esh-mode) |
| 50 | (require 'esh-arg) | ||
| 51 | (eval-when-compile (require 'eshell)) | ||
| 52 | 50 | ||
| 53 | ;;;###autoload | 51 | ;;;###autoload |
| 54 | (progn | 52 | (progn |
| @@ -247,10 +245,10 @@ EXAMPLES: | |||
| 247 | (lambda () | 245 | (lambda () |
| 248 | (insert eshell-modifier-help-string))))) | 246 | (insert eshell-modifier-help-string))))) |
| 249 | 247 | ||
| 250 | (defun eshell-pred-initialize () | 248 | (defun eshell-pred-initialize () ;Called from `eshell-mode' via intern-soft! |
| 251 | "Initialize the predicate/modifier code." | 249 | "Initialize the predicate/modifier code." |
| 252 | (add-hook 'eshell-parse-argument-hook | 250 | (add-hook 'eshell-parse-argument-hook |
| 253 | 'eshell-parse-arg-modifier t t) | 251 | #'eshell-parse-arg-modifier t t) |
| 254 | (define-key eshell-command-map [(meta ?q)] 'eshell-display-predicate-help) | 252 | (define-key eshell-command-map [(meta ?q)] 'eshell-display-predicate-help) |
| 255 | (define-key eshell-command-map [(meta ?m)] 'eshell-display-modifier-help)) | 253 | (define-key eshell-command-map [(meta ?m)] 'eshell-display-modifier-help)) |
| 256 | 254 | ||
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index a3035205adb..adc68b6c856 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el | |||
| @@ -99,7 +99,7 @@ arriving, or after." | |||
| 99 | 99 | ||
| 100 | ;;; Functions: | 100 | ;;; Functions: |
| 101 | 101 | ||
| 102 | (defun eshell-prompt-initialize () | 102 | (defun eshell-prompt-initialize () ;Called from `eshell-mode' via intern-soft! |
| 103 | "Initialize the prompting code." | 103 | "Initialize the prompting code." |
| 104 | (unless eshell-non-interactive-p | 104 | (unless eshell-non-interactive-p |
| 105 | (add-hook 'eshell-post-command-hook 'eshell-emit-prompt nil t) | 105 | (add-hook 'eshell-post-command-hook 'eshell-emit-prompt nil t) |
diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index 9cb16174f20..a817edbcc99 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el | |||
| @@ -145,7 +145,7 @@ This is default behavior of shells like bash." | |||
| 145 | 145 | ||
| 146 | ;;; Functions: | 146 | ;;; Functions: |
| 147 | 147 | ||
| 148 | (defun eshell-rebind-initialize () | 148 | (defun eshell-rebind-initialize () ;Called from `eshell-mode' via intern-soft! |
| 149 | "Initialize the inputting code." | 149 | "Initialize the inputting code." |
| 150 | (unless eshell-non-interactive-p | 150 | (unless eshell-non-interactive-p |
| 151 | (add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t) | 151 | (add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t) |
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index bab26222baf..4a3b84e10e3 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el | |||
| @@ -23,8 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Code: | 24 | ;;; Code: |
| 25 | 25 | ||
| 26 | (require 'eshell) | 26 | (require 'esh-mode) |
| 27 | (require 'esh-opt) | ||
| 28 | 27 | ||
| 29 | ;;;###autoload | 28 | ;;;###autoload |
| 30 | (progn | 29 | (progn |
| @@ -57,7 +56,7 @@ This includes when running `eshell-command'." | |||
| 57 | 56 | ||
| 58 | ;;; Functions: | 57 | ;;; Functions: |
| 59 | 58 | ||
| 60 | (defun eshell-script-initialize () | 59 | (defun eshell-script-initialize () ;Called from `eshell-mode' via intern-soft! |
| 61 | "Initialize the script parsing code." | 60 | "Initialize the script parsing code." |
| 62 | (make-local-variable 'eshell-interpreter-alist) | 61 | (make-local-variable 'eshell-interpreter-alist) |
| 63 | (setq eshell-interpreter-alist | 62 | (setq eshell-interpreter-alist |
| @@ -73,13 +72,14 @@ This includes when running `eshell-command'." | |||
| 73 | ;; to ruin it for other modules | 72 | ;; to ruin it for other modules |
| 74 | (let (eshell-inside-quote-regexp | 73 | (let (eshell-inside-quote-regexp |
| 75 | eshell-outside-quote-regexp) | 74 | eshell-outside-quote-regexp) |
| 76 | (and (not eshell-non-interactive-p) | 75 | (and (not (bound-and-true-p eshell-non-interactive-p)) |
| 77 | eshell-login-script | 76 | eshell-login-script |
| 78 | (file-readable-p eshell-login-script) | 77 | (file-readable-p eshell-login-script) |
| 79 | (eshell-do-eval | 78 | (eshell-do-eval |
| 80 | (list 'eshell-commands | 79 | (list 'eshell-commands |
| 81 | (catch 'eshell-replace-command | 80 | (catch 'eshell-replace-command |
| 82 | (eshell-source-file eshell-login-script))) t)) | 81 | (eshell-source-file eshell-login-script))) |
| 82 | t)) | ||
| 83 | (and eshell-rc-script | 83 | (and eshell-rc-script |
| 84 | (file-readable-p eshell-rc-script) | 84 | (file-readable-p eshell-rc-script) |
| 85 | (eshell-do-eval | 85 | (eshell-do-eval |
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index 420f8850504..c7965b4187c 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el | |||
| @@ -166,7 +166,7 @@ The options are `begin', `after' or `end'." | |||
| 166 | 166 | ||
| 167 | ;;; Functions: | 167 | ;;; Functions: |
| 168 | 168 | ||
| 169 | (defun eshell-smart-initialize () | 169 | (defun eshell-smart-initialize () ;Called from `eshell-mode' via intern-soft! |
| 170 | "Setup Eshell smart display." | 170 | "Setup Eshell smart display." |
| 171 | (unless eshell-non-interactive-p | 171 | (unless eshell-non-interactive-p |
| 172 | ;; override a few variables, since they would interfere with the | 172 | ;; override a few variables, since they would interfere with the |
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index 9a9f23cddd9..dea90405ad7 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el | |||
| @@ -147,7 +147,7 @@ behavior for short-lived processes, see bug#18108." | |||
| 147 | 147 | ||
| 148 | ;;; Functions: | 148 | ;;; Functions: |
| 149 | 149 | ||
| 150 | (defun eshell-term-initialize () | 150 | (defun eshell-term-initialize () ;Called from `eshell-mode' via intern-soft! |
| 151 | "Initialize the `term' interface code." | 151 | "Initialize the `term' interface code." |
| 152 | (make-local-variable 'eshell-interpreter-alist) | 152 | (make-local-variable 'eshell-interpreter-alist) |
| 153 | (setq eshell-interpreter-alist | 153 | (setq eshell-interpreter-alist |
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index 603b7627d5d..c7916360ee6 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | :tag "TRAMP Eshell features" | 46 | :tag "TRAMP Eshell features" |
| 47 | :group 'eshell-module)) | 47 | :group 'eshell-module)) |
| 48 | 48 | ||
| 49 | (defun eshell-tramp-initialize () | 49 | (defun eshell-tramp-initialize () ;Called from `eshell-mode' via intern-soft! |
| 50 | "Initialize the TRAMP-using commands code." | 50 | "Initialize the TRAMP-using commands code." |
| 51 | (when (eshell-using-module 'eshell-cmpl) | 51 | (when (eshell-using-module 'eshell-cmpl) |
| 52 | (add-hook 'pcomplete-try-first-hook | 52 | (add-hook 'pcomplete-try-first-hook |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index e4c4265d702..25221817218 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -35,8 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | ;;; Code: | 36 | ;;; Code: |
| 37 | 37 | ||
| 38 | (require 'eshell) | 38 | (require 'esh-mode) |
| 39 | (require 'esh-opt) | ||
| 40 | (require 'pcomplete) | 39 | (require 'pcomplete) |
| 41 | 40 | ||
| 42 | ;;;###autoload | 41 | ;;;###autoload |
| @@ -140,7 +139,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." | |||
| 140 | 139 | ||
| 141 | ;;; Functions: | 140 | ;;; Functions: |
| 142 | 141 | ||
| 143 | (defun eshell-unix-initialize () | 142 | (defun eshell-unix-initialize () ;Called from `eshell-mode' via intern-soft! |
| 144 | "Initialize the UNIX support/emulation code." | 143 | "Initialize the UNIX support/emulation code." |
| 145 | (when (eshell-using-module 'eshell-cmpl) | 144 | (when (eshell-using-module 'eshell-cmpl) |
| 146 | (add-hook 'pcomplete-try-first-hook | 145 | (add-hook 'pcomplete-try-first-hook |
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 3ba4c935a72..026edc59808 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el | |||
| @@ -157,7 +157,7 @@ treated as a literal character." | |||
| 157 | 157 | ||
| 158 | ;;; Functions: | 158 | ;;; Functions: |
| 159 | 159 | ||
| 160 | (defun eshell-arg-initialize () | 160 | (defun eshell-arg-initialize () ;Called from `eshell-mode' via intern-soft! |
| 161 | "Initialize the argument parsing code." | 161 | "Initialize the argument parsing code." |
| 162 | ;; This is supposedly run after enabling esh-mode, when eshell-mode-map | 162 | ;; This is supposedly run after enabling esh-mode, when eshell-mode-map |
| 163 | ;; already exists. | 163 | ;; already exists. |
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 7b05cfbc341..6e03bda22b7 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -287,7 +287,7 @@ otherwise t.") | |||
| 287 | "Return currently running command process, if non-Lisp." | 287 | "Return currently running command process, if non-Lisp." |
| 288 | eshell-last-async-proc) | 288 | eshell-last-async-proc) |
| 289 | 289 | ||
| 290 | (defun eshell-cmd-initialize () | 290 | (defun eshell-cmd-initialize () ;Called from `eshell-mode' via intern-soft! |
| 291 | "Initialize the Eshell command processing module." | 291 | "Initialize the Eshell command processing module." |
| 292 | (set (make-local-variable 'eshell-current-command) nil) | 292 | (set (make-local-variable 'eshell-current-command) nil) |
| 293 | (set (make-local-variable 'eshell-command-name) nil) | 293 | (set (make-local-variable 'eshell-command-name) nil) |
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index ae8bf846249..978fc55c4de 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el | |||
| @@ -172,7 +172,7 @@ external version." | |||
| 172 | 172 | ||
| 173 | ;;; Functions: | 173 | ;;; Functions: |
| 174 | 174 | ||
| 175 | (defun eshell-ext-initialize () | 175 | (defun eshell-ext-initialize () ;Called from `eshell-mode' via intern-soft! |
| 176 | "Initialize the external command handling code." | 176 | "Initialize the external command handling code." |
| 177 | (add-hook 'eshell-named-command-hook #'eshell-explicit-command nil t)) | 177 | (add-hook 'eshell-named-command-hook #'eshell-explicit-command nil t)) |
| 178 | 178 | ||
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 1a6c71eda03..ce1d021384d 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el | |||
| @@ -169,7 +169,7 @@ not be added to this variable." | |||
| 169 | 169 | ||
| 170 | ;;; Functions: | 170 | ;;; Functions: |
| 171 | 171 | ||
| 172 | (defun eshell-io-initialize () | 172 | (defun eshell-io-initialize () ;Called from `eshell-mode' via intern-soft! |
| 173 | "Initialize the I/O subsystem code." | 173 | "Initialize the I/O subsystem code." |
| 174 | (add-hook 'eshell-parse-argument-hook | 174 | (add-hook 'eshell-parse-argument-hook |
| 175 | 'eshell-parse-redirection nil t) | 175 | 'eshell-parse-redirection nil t) |
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 1f86dacd96c..cff29bed1b6 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -412,7 +412,7 @@ and the hook `eshell-exit-hook'." | |||
| 412 | (when (and load-hook (boundp load-hook)) | 412 | (when (and load-hook (boundp load-hook)) |
| 413 | (if (memq initfunc (symbol-value load-hook)) (setq initfunc nil)) | 413 | (if (memq initfunc (symbol-value load-hook)) (setq initfunc nil)) |
| 414 | (run-hooks load-hook)) | 414 | (run-hooks load-hook)) |
| 415 | ;; So we don't need the -initialize functions on the hooks (b#5375). | 415 | ;; So we don't need the -initialize functions on the hooks (bug#5375). |
| 416 | (and initfunc (fboundp initfunc) (funcall initfunc)))) | 416 | (and initfunc (fboundp initfunc) (funcall initfunc)))) |
| 417 | 417 | ||
| 418 | (if eshell-send-direct-to-subprocesses | 418 | (if eshell-send-direct-to-subprocesses |
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index d9a6eef7169..d538ae32b37 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el | |||
| @@ -121,7 +121,7 @@ PROC and STATUS to functions on the latter." | |||
| 121 | (eshell-reset-after-proc status) | 121 | (eshell-reset-after-proc status) |
| 122 | (run-hook-with-args 'eshell-kill-hook proc status)) | 122 | (run-hook-with-args 'eshell-kill-hook proc status)) |
| 123 | 123 | ||
| 124 | (defun eshell-proc-initialize () | 124 | (defun eshell-proc-initialize () ;Called from `eshell-mode' via intern-soft! |
| 125 | "Initialize the process handling code." | 125 | "Initialize the process handling code." |
| 126 | (make-local-variable 'eshell-process-list) | 126 | (make-local-variable 'eshell-process-list) |
| 127 | ;; This is supposedly run after enabling esh-mode, when eshell-command-map | 127 | ;; This is supposedly run after enabling esh-mode, when eshell-command-map |
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 118978e77d0..6f355c70a42 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -478,24 +478,22 @@ list." | |||
| 478 | (insert-file-contents (or filename eshell-hosts-file)) | 478 | (insert-file-contents (or filename eshell-hosts-file)) |
| 479 | (goto-char (point-min)) | 479 | (goto-char (point-min)) |
| 480 | (while (re-search-forward | 480 | (while (re-search-forward |
| 481 | "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) | 481 | ;; "^ \t\\([^# \t\n]+\\)[ \t]+\\([^ \t\n]+\\)\\([ \t]*\\([^ \t\n]+\\)\\)?" |
| 482 | (if (match-string 1) | 482 | "^[ \t]*\\([^# \t\n]+\\)[ \t]+\\([^ \t\n].+\\)" nil t) |
| 483 | (cl-pushnew (match-string 1) hosts :test #'equal)) | 483 | (push (cons (match-string 1) |
| 484 | (if (match-string 2) | 484 | (split-string (match-string 2))) |
| 485 | (cl-pushnew (match-string 2) hosts :test #'equal)) | 485 | hosts))) |
| 486 | (if (match-string 4) | 486 | (nreverse hosts))) |
| 487 | (cl-pushnew (match-string 4) hosts :test #'equal)))) | ||
| 488 | (sort hosts #'string-lessp))) | ||
| 489 | 487 | ||
| 490 | (defun eshell-read-hosts (file result-var timestamp-var) | 488 | (defun eshell-read-hosts (file result-var timestamp-var) |
| 491 | "Read the contents of /etc/passwd for user names." | 489 | "Read the contents of /etc/hosts for host names." |
| 492 | (if (or (not (symbol-value result-var)) | 490 | (if (or (not (symbol-value result-var)) |
| 493 | (not (symbol-value timestamp-var)) | 491 | (not (symbol-value timestamp-var)) |
| 494 | (time-less-p | 492 | (time-less-p |
| 495 | (symbol-value timestamp-var) | 493 | (symbol-value timestamp-var) |
| 496 | (file-attribute-modification-time (file-attributes file)))) | 494 | (file-attribute-modification-time (file-attributes file)))) |
| 497 | (progn | 495 | (progn |
| 498 | (set result-var (eshell-read-hosts-file file)) | 496 | (set result-var (apply #'nconc (eshell-read-hosts-file file))) |
| 499 | (set timestamp-var (current-time)))) | 497 | (set timestamp-var (current-time)))) |
| 500 | (symbol-value result-var)) | 498 | (symbol-value result-var)) |
| 501 | 499 | ||
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 82e0f7135ba..b08a5d242fe 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el | |||
| @@ -199,7 +199,7 @@ function), and the arguments passed to this function would be the list | |||
| 199 | 199 | ||
| 200 | ;;; Functions: | 200 | ;;; Functions: |
| 201 | 201 | ||
| 202 | (defun eshell-var-initialize () | 202 | (defun eshell-var-initialize () ;Called from `eshell-mode' via intern-soft! |
| 203 | "Initialize the variable handle code." | 203 | "Initialize the variable handle code." |
| 204 | ;; Break the association with our parent's environment. Otherwise, | 204 | ;; Break the association with our parent's environment. Otherwise, |
| 205 | ;; changing a variable will affect all of Emacs. | 205 | ;; changing a variable will affect all of Emacs. |