don't use function-equal in nadvice
[bpt/emacs.git] / lisp / eshell / em-alias.el
index 4b62fec..e9cde39 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-2014 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.