Merged from emacs@sv.gnu.org
[bpt/emacs.git] / lisp / eshell / esh-io.el
index 6944770..19f90e6 100644 (file)
@@ -1,6 +1,7 @@
 ;;; esh-io.el --- I/O management
 
-;; Copyright (C) 1999, 2000, 2005 Free Software Foundation
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -18,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 (provide 'esh-io)
 
@@ -192,7 +193,7 @@ not be added to this variable."
          (eshell-finish-arg
           (prog1
               (list 'eshell-set-output-handle
-                    (or (and sh (string-to-int sh)) 1)
+                    (or (and sh (string-to-number sh)) 1)
                     (list 'quote
                           (aref [overwrite append insert]
                                 (1- (length oper)))))
@@ -353,7 +354,8 @@ it defaults to `insert'."
    ((or (bufferp target)
        (and (boundp 'eshell-buffer-shorthand)
             (symbol-value 'eshell-buffer-shorthand)
-            (symbolp target)))
+            (symbolp target)
+            (not (memq target '(t nil)))))
     (let ((buf (if (bufferp target)
                   target
                 (get-buffer-create