emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1228ec3e1d 2/2: Don't use 'eshell-eval-using-options' for 'eshell


From: Lars Ingebrigtsen
Subject: master 1228ec3e1d 2/2: Don't use 'eshell-eval-using-options' for 'eshell/source' or 'eshell/.'
Date: Fri, 21 Jan 2022 07:07:36 -0500 (EST)

branch: master
commit 1228ec3e1d7657c9eb50184719410f37ed0eb750
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Don't use 'eshell-eval-using-options' for 'eshell/source' or 'eshell/.'
    
    This makes 'source' and '.' in Eshell more compatible with regular
    shells, which just treat the first argument as the file to source and
    all subsequent arguments as arguments to that file.
    
    * lisp/eshell/em-script.el (eshell/source, eshell/.): Don't use
    'eshell-eval-using-options'.
    
    * etc/NEWS: Announce the change (bug#53293)
---
 etc/NEWS                 |  5 +++++
 lisp/eshell/em-script.el | 18 ++----------------
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 4cf99490ce..a4908017a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -104,6 +104,11 @@ files that were compiled with an old EIEIO (Emacs<25).
 ** 'C-x 8 .' has been moved to 'C-x 8 . .'.
 This is to open up the 'C-x 8 .' map to bind further characters there.
 
+---
+** 'source' and '.' in Eshell no longer accept the '--help' option.
+This is for compatibility with the shell versions of these commands,
+which don't handle options like '--help' in any special way.
+
 
 * Changes in Emacs 29.1
 
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el
index e8459513f3..e0bcd8b099 100644
--- a/lisp/eshell/em-script.el
+++ b/lisp/eshell/em-script.el
@@ -113,27 +113,13 @@ Comments begin with `#'."
 
 (defun eshell/source (&rest args)
   "Source a file in a subshell environment."
-  (eshell-eval-using-options
-   "source" args
-   '((?h "help" nil nil "show this usage screen")
-     :show-usage
-     :usage "FILE [ARGS]
-Invoke the Eshell commands in FILE in a subshell, binding ARGS to $1,
-$2, etc.")
-   (eshell-source-file (car args) (cdr args) t)))
+  (eshell-source-file (car args) (cdr args) t))
 
 (put 'eshell/source 'eshell-no-numeric-conversions t)
 
 (defun eshell/. (&rest args)
   "Source a file in the current environment."
-  (eshell-eval-using-options
-   "." args
-   '((?h "help" nil nil "show this usage screen")
-     :show-usage
-     :usage "FILE [ARGS]
-Invoke the Eshell commands in FILE within the current shell
-environment, binding ARGS to $1, $2, etc.")
-   (eshell-source-file (car args) (cdr args))))
+  (eshell-source-file (car args) (cdr args)))
 
 (put 'eshell/. 'eshell-no-numeric-conversions t)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]