changeset 95619:45dbb3c749a6

Remove unnecessary eval-when-compiles and eval-and-compiles.
author Glenn Morris <rgm@gnu.org>
date Sat, 07 Jun 2008 02:37:13 +0000
parents fc741047d17a
children c94868f48d3d
files lisp/eshell/em-dirs.el lisp/eshell/em-glob.el lisp/eshell/em-ls.el lisp/eshell/em-unix.el lisp/eshell/esh-cmd.el lisp/eshell/esh-io.el lisp/eshell/esh-opt.el lisp/eshell/esh-test.el lisp/eshell/esh-util.el
diffstat 9 files changed, 55 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/eshell/em-dirs.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/em-dirs.el	Sat Jun 07 02:37:13 2008 +0000
@@ -341,8 +341,7 @@
 		  index (1+ index)))))
     oldpath))
 
-(eval-when-compile
-  (defvar dired-directory))
+(defvar dired-directory)
 
 (defun eshell/cd (&rest args)           ; all but first ignored
   "Alias to extend the behavior of `cd'."
--- a/lisp/eshell/em-glob.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/em-glob.el	Sat Jun 07 02:37:13 2008 +0000
@@ -260,9 +260,8 @@
 	    (error "No matches found: %s" glob)
 	  glob))))
 
-(eval-when-compile
-  (defvar matches)
-  (defvar message-shown))
+(defvar matches)
+(defvar message-shown)
 
 ;; FIXME does this really need to abuse matches, message-shown?
 (defun eshell-glob-entries (path globs &optional recurse-p)
--- a/lisp/eshell/em-ls.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/em-ls.el	Sat Jun 07 02:37:13 2008 +0000
@@ -303,24 +303,23 @@
 
 (put 'eshell/ls 'eshell-no-numeric-conversions t)
 
-(eval-when-compile
-  (defvar block-size)
-  (defvar dereference-links)
-  (defvar dir-literal)
-  (defvar error-func)
-  (defvar flush-func)
-  (defvar human-readable)
-  (defvar ignore-pattern)
-  (defvar insert-func)
-  (defvar listing-style)
-  (defvar numeric-uid-gid)
-  (defvar reverse-list)
-  (defvar show-all)
-  (defvar show-recursive)
-  (defvar show-size)
-  (defvar sort-method)
-  (defvar ange-cache)
-  (defvar dired-flag))
+(defvar block-size)
+(defvar dereference-links)
+(defvar dir-literal)
+(defvar error-func)
+(defvar flush-func)
+(defvar human-readable)
+(defvar ignore-pattern)
+(defvar insert-func)
+(defvar listing-style)
+(defvar numeric-uid-gid)
+(defvar reverse-list)
+(defvar show-all)
+(defvar show-recursive)
+(defvar show-size)
+(defvar sort-method)
+(defvar ange-cache)
+(defvar dired-flag)
 
 (defun eshell-do-ls (&rest args)
   "Implementation of \"ls\" in Lisp, passing ARGS."
--- a/lisp/eshell/em-unix.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/em-unix.el	Sat Jun 07 02:37:13 2008 +0000
@@ -152,11 +152,10 @@
 (defalias 'eshell/basename 'file-name-nondirectory)
 (defalias 'eshell/dirname  'file-name-directory)
 
-(eval-when-compile
-  (defvar interactive)
-  (defvar preview)
-  (defvar recursive)
-  (defvar verbose))
+(defvar interactive)
+(defvar preview)
+(defvar recursive)
+(defvar verbose)
 
 (defun eshell/man (&rest args)
   "Invoke man, flattening the arguments appropriately."
@@ -337,10 +336,9 @@
 
 (put 'eshell/rmdir 'eshell-no-numeric-conversions t)
 
-(eval-when-compile
-  (defvar no-dereference)
-  (defvar preview)
-  (defvar verbose))
+(defvar no-dereference)
+(defvar preview)
+(defvar verbose)
 
 (defvar eshell-warn-dot-directories t)
 
@@ -803,15 +801,14 @@
 
 (defalias 'pcomplete/ssh 'pcomplete/rsh)
 
-(eval-when-compile
-  (defvar block-size)
-  (defvar by-bytes)
-  (defvar dereference-links)
-  (defvar grand-total)
-  (defvar human-readable)
-  (defvar max-depth)
-  (defvar only-one-filesystem)
-  (defvar show-all))
+(defvar block-size)
+(defvar by-bytes)
+(defvar dereference-links)
+(defvar grand-total)
+(defvar human-readable)
+(defvar max-depth)
+(defvar only-one-filesystem)
+(defvar show-all)
 
 (defsubst eshell-du-size-string (size)
   (let* ((str (eshell-printable-size size human-readable block-size t))
--- a/lisp/eshell/esh-cmd.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/esh-cmd.el	Sat Jun 07 02:37:13 2008 +0000
@@ -1,7 +1,7 @@
 ;;; esh-cmd.el --- command invocation
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -477,9 +477,8 @@
   "Execute named command"
   (eshell-command-result-p "+ 1 2" "3\n"))
 
-(eval-when-compile
-  (defvar eshell-command-body)
-  (defvar eshell-test-body))
+(defvar eshell-command-body)
+(defvar eshell-test-body)
 
 (defsubst eshell-invokify-arg (arg &optional share-output silent)
   "Change ARG so it can be invoked from a structured command.
--- a/lisp/eshell/esh-io.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/esh-io.el	Sat Jun 07 02:37:13 2008 +0000
@@ -1,7 +1,7 @@
 ;;; esh-io.el --- I/O management
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -380,8 +380,7 @@
     (error "Invalid redirection target: %s"
 	   (eshell-stringify target)))))
 
-(eval-when-compile
-  (defvar grep-null-device))
+(defvar grep-null-device)
 
 (defun eshell-set-output-handle (index mode &optional target)
   "Set handle INDEX, using MODE, to point to TARGET."
--- a/lisp/eshell/esh-opt.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/esh-opt.el	Sat Jun 07 02:37:13 2008 +0000
@@ -1,7 +1,7 @@
 ;;; esh-opt.el --- command options processing
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -72,12 +72,11 @@
 
 ;;; Internal Functions:
 
-(eval-when-compile
-  (defvar temp-args)
-  (defvar last-value)
-  (defvar usage-msg)
-  (defvar ext-command)
-  (defvar args))
+(defvar temp-args)
+(defvar last-value)
+(defvar usage-msg)
+(defvar ext-command)
+(defvar args)
 
 (defun eshell-do-opt (name options body-forms)
   "Helper function for `eshell-eval-using-options'.
--- a/lisp/eshell/esh-test.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/esh-test.el	Sat Jun 07 02:37:13 2008 +0000
@@ -1,7 +1,7 @@
 ;;; esh-test.el --- Eshell test suite
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -71,8 +71,7 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar test-buffer))
+(defvar test-buffer)
 
 (defun eshell-insert-command (text &optional func)
   "Insert a command at the end of the buffer."
--- a/lisp/eshell/esh-util.el	Sat Jun 07 02:36:34 2008 +0000
+++ b/lisp/eshell/esh-util.el	Sat Jun 07 02:37:13 2008 +0000
@@ -1,7 +1,7 @@
 ;;; esh-util.el --- general utilities
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -593,8 +593,7 @@
          (cons file (eshell-file-attributes (expand-file-name file directory)))))
        (directory-files directory full match nosort)))))
 
-(eval-when-compile
-  (defvar ange-cache))
+(defvar ange-cache)
 
 (defun eshell-directory-files-and-attributes (dir &optional full match nosort)
   "Make sure to use the handler for `directory-file-and-attributes'."