]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-script.el
Dired recognize dirs when file size in human units
[gnu-emacs] / lisp / eshell / em-script.el
index 8acbc2644bea1cbb2fd26a2bd02f8a6f1a1b1ae5..1141399f670ff5f51a5c6a4196580f61c3eacdc9 100644 (file)
@@ -1,6 +1,6 @@
-;;; em-script.el --- Eshell script files
+;;; em-script.el --- Eshell script files  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
 ;;; Code:
 
 (require 'eshell)
+(require 'esh-opt)
 
 ;;;###autoload
-(eshell-defgroup eshell-script nil
+(progn
+(defgroup eshell-script nil
   "This module allows for the execution of files containing Eshell
 commands, as a script file."
   :tag "Running script files."
-  :group 'eshell-module)
+  :group 'eshell-module))
 
 ;;; User Variables:
 
@@ -43,7 +45,7 @@ commands, as a script file."
 (defcustom eshell-login-script (expand-file-name "login" eshell-directory-name)
   "If non-nil, a file to invoke when starting up Eshell interactively.
 This file should be a file containing Eshell commands, where comment
-lines begin with '#'."
+lines begin with `#'."
   :type 'file
   :group 'eshell-script)
 
@@ -59,9 +61,10 @@ This includes when running `eshell-command'."
   "Initialize the script parsing code."
   (make-local-variable 'eshell-interpreter-alist)
   (setq eshell-interpreter-alist
-       (cons '((lambda (file)
-                 (string= (file-name-nondirectory file)
-                          "eshell")) . eshell/source)
+       (cons (cons #'(lambda (file args)
+                        (string= (file-name-nondirectory file)
+                                 "eshell"))
+                    'eshell/source)
              eshell-interpreter-alist))
   (make-local-variable 'eshell-complex-commands)
   (setq eshell-complex-commands
@@ -86,7 +89,7 @@ This includes when running `eshell-command'."
 
 (defun eshell-source-file (file &optional args subcommand-p)
   "Execute a series of Eshell commands in FILE, passing ARGS.
-Comments begin with '#'."
+Comments begin with `#'."
   (interactive "f")
   (let ((orig (point))
        (here (point-max))