emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/eshell/esh-io.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/eshell/esh-io.el [lexbind]
Date: Tue, 06 Jul 2004 07:15:07 -0400

Index: emacs/lisp/eshell/esh-io.el
diff -c emacs/lisp/eshell/esh-io.el:1.6.4.2 emacs/lisp/eshell/esh-io.el:1.6.4.3
*** emacs/lisp/eshell/esh-io.el:1.6.4.2 Tue Oct 14 23:51:31 2003
--- emacs/lisp/eshell/esh-io.el Tue Jul  6 09:14:27 2004
***************
*** 333,354 ****
    (cond
     ((stringp target)
      (let ((redir (assoc target eshell-virtual-targets)))
!      (if redir
!        (if (nth 2 redir)
!            (funcall (nth 1 redir) mode)
!          (nth 1 redir))
!        (let* ((exists (get-file-buffer target))
!             (buf (find-file-noselect target t)))
!        (with-current-buffer buf
!          (if buffer-read-only
!              (error "Cannot write to read-only file `%s'" target))
!          (set (make-local-variable 'eshell-output-file-buffer)
!               (if (eq exists buf) 0 t))
!          (cond ((eq mode 'overwrite)
!                 (erase-buffer))
!                ((eq mode 'append)
!                 (goto-char (point-max))))
!          (point-marker))))))
     ((or (bufferp target)
        (and (boundp 'eshell-buffer-shorthand)
             (symbol-value 'eshell-buffer-shorthand)
--- 333,355 ----
    (cond
     ((stringp target)
      (let ((redir (assoc target eshell-virtual-targets)))
!       (if redir
!         (if (nth 2 redir)
!             (funcall (nth 1 redir) mode)
!           (nth 1 redir))
!       (let* ((exists (get-file-buffer target))
!              (buf (find-file-noselect target t)))
!         (with-current-buffer buf
!           (if buffer-read-only
!               (error "Cannot write to read-only file `%s'" target))
!           (set (make-local-variable 'eshell-output-file-buffer)
!                (if (eq exists buf) 0 t))
!           (cond ((eq mode 'overwrite)
!                  (erase-buffer))
!                 ((eq mode 'append)
!                  (goto-char (point-max))))
!           (point-marker))))))
! 
     ((or (bufferp target)
        (and (boundp 'eshell-buffer-shorthand)
             (symbol-value 'eshell-buffer-shorthand)
***************
*** 363,377 ****
              ((eq mode 'append)
               (goto-char (point-max))))
        (point-marker))))
!    ((functionp target)
!     nil)
     ((symbolp target)
      (if (eq mode 'overwrite)
        (set target nil))
      target)
     ((or (eshell-processp target)
        (markerp target))
      target)
     (t
      (error "Illegal redirection target: %s"
           (eshell-stringify target)))))
--- 364,381 ----
              ((eq mode 'append)
               (goto-char (point-max))))
        (point-marker))))
! 
!    ((functionp target) nil)
! 
     ((symbolp target)
      (if (eq mode 'overwrite)
        (set target nil))
      target)
+ 
     ((or (eshell-processp target)
        (markerp target))
      target)
+ 
     (t
      (error "Illegal redirection target: %s"
           (eshell-stringify target)))))
***************
*** 481,487 ****
          (let ((moving (= (point) target)))
            (save-excursion
              (goto-char target)
!             (setq object (eshell-stringify object))
              (insert-and-inherit object)
              (set-marker target (point-marker)))
            (if moving
--- 485,492 ----
          (let ((moving (= (point) target)))
            (save-excursion
              (goto-char target)
!             (unless (stringp object)
!               (setq object (eshell-stringify object)))
              (insert-and-inherit object)
              (set-marker target (point-marker)))
            (if moving
***************
*** 489,495 ****
  
     ((eshell-processp target)
      (when (eq (process-status target) 'run)
!       (setq object (eshell-stringify object))
        (process-send-string target object)))
  
     ((consp target)
--- 494,501 ----
  
     ((eshell-processp target)
      (when (eq (process-status target) 'run)
!       (unless (stringp object)
!       (setq object (eshell-stringify object)))
        (process-send-string target object)))
  
     ((consp target)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]