]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-alias.el
Update copyright year to 2015
[gnu-emacs] / lisp / eshell / em-alias.el
index 4b62fec95e6e13145ac7e6aa63dbbd9b3679ed00..b76cb7c1005c3d4d876a6d13a3ad8a469c22d865 100644 (file)
@@ -1,6 +1,6 @@
-;;; em-alias.el --- creation and management of command aliases
+;;; em-alias.el --- creation and management of command aliases  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -90,8 +90,6 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'esh-util))
 (require 'eshell)
 
 ;;;###autoload
@@ -133,10 +131,10 @@ Each element of this alias is a list of the form:
 Where NAME is the textual name of the alias, and DEFINITION is the
 command string to replace that command with.
 
-Note: this list should not be modified in your '.emacs' file.  Rather,
-any desired alias definitions should be declared using the `alias'
-command, which will automatically write them to the file named by
-`eshell-aliases-file'.")
+Note: this list should not be modified in your init file.
+Rather, any desired alias definitions should be declared using
+the `alias' command, which will automatically write them to the
+file named by `eshell-aliases-file'.")
 
 (put 'eshell-command-aliases-list 'risky-local-variable t)
 
@@ -223,18 +221,11 @@ command, which will automatically write them to the file named by
     (let ((alias (eshell-lookup-alias command)))
       (if alias
          (throw 'eshell-replace-command
-                (list
-                 'let
-                 (list
-                  (list 'eshell-command-name
-                        (list 'quote eshell-last-command-name))
-                  (list 'eshell-command-arguments
-                        (list 'quote eshell-last-arguments))
-                  (list 'eshell-prevent-alias-expansion
-                        (list 'quote
-                              (cons command
-                                    eshell-prevent-alias-expansion))))
-                 (eshell-parse-command (nth 1 alias))))))))
+                `(let ((eshell-command-name ',eshell-last-command-name)
+                        (eshell-command-arguments ',eshell-last-arguments)
+                        (eshell-prevent-alias-expansion
+                         ',(cons command eshell-prevent-alias-expansion)))
+                    ,(eshell-parse-command (nth 1 alias))))))))
 
 (defun eshell-alias-completions (name)
   "Find all possible completions for NAME.