HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git]
/
lisp
/
eshell
/
esh-io.el
diff --git
a/lisp/eshell/esh-io.el
b/lisp/eshell/esh-io.el
index
276ecf1
..
c8230e0
100644
(file)
--- a/
lisp/eshell/esh-io.el
+++ b/
lisp/eshell/esh-io.el
@@
-1,7
+1,6
@@
;;; esh-io.el --- I/O management
;;; 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-2012 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Author: John Wiegley <johnw@gnu.org>
@@
-55,9
+54,13
@@
;; (+ 1 2) > a > b > c ; prints number to all three files
;; (+ 1 2) > a | wc ; prints to 'a', and pipes to 'wc'
;; (+ 1 2) > a > b > c ; prints number to all three files
;; (+ 1 2) > a | wc ; prints to 'a', and pipes to 'wc'
+;;; Code:
+
(provide 'esh-io)
(provide 'esh-io)
-(eval-when-compile (require 'eshell))
+(eval-when-compile
+ (require 'cl)
+ (require 'eshell))
(defgroup eshell-io nil
"Eshell's I/O management code provides a scheme for treating many
(defgroup eshell-io nil
"Eshell's I/O management code provides a scheme for treating many
@@
-68,13
+71,14
@@
though they were files."
;;; User Variables:
;;; User Variables:
-(defcustom eshell-io-load-hook '(eshell-io-initialize)
- "*A hook that gets run when `eshell-io' is loaded."
+(defcustom eshell-io-load-hook nil
+ "A hook that gets run when `eshell-io' is loaded."
+ :version "24.1" ; removed eshell-io-initialize
:type 'hook
:group 'eshell-io)
(defcustom eshell-number-of-handles 3
:type 'hook
:group 'eshell-io)
(defcustom eshell-number-of-handles 3
- "
*
The number of file handles that eshell supports.
+ "The number of file handles that eshell supports.
Currently this is standard input, output and error. But even all of
these Emacs does not currently support with asynchronous processes
\(which is what eshell uses so that you can continue doing work in
Currently this is standard input, output and error. But even all of
these Emacs does not currently support with asynchronous processes
\(which is what eshell uses so that you can continue doing work in
@@
-83,17
+87,17
@@
other buffers) ."
:group 'eshell-io)
(defcustom eshell-output-handle 1
:group 'eshell-io)
(defcustom eshell-output-handle 1
- "
*
The index of the standard output handle."
+ "The index of the standard output handle."
:type 'integer
:group 'eshell-io)
(defcustom eshell-error-handle 2
:type 'integer
:group 'eshell-io)
(defcustom eshell-error-handle 2
- "
*
The index of the standard error handle."
+ "The index of the standard error handle."
:type 'integer
:group 'eshell-io)
(defcustom eshell-buffer-shorthand nil
:type 'integer
:group 'eshell-io)
(defcustom eshell-buffer-shorthand nil
- "
*
If non-nil, a symbol name can be used for a buffer in redirection.
+ "If non-nil, a symbol name can be used for a buffer in redirection.
If nil, redirecting to a buffer requires buffer name syntax. If this
variable is set, redirection directly to Lisp symbols will be
impossible.
If nil, redirecting to a buffer requires buffer name syntax. If this
variable is set, redirection directly to Lisp symbols will be
impossible.
@@
-106,7
+110,7
@@
Example:
:group 'eshell-io)
(defcustom eshell-print-queue-size 5
:group 'eshell-io)
(defcustom eshell-print-queue-size 5
- "
*
The size of the print queue, for doing buffered printing.
+ "The size of the print queue, for doing buffered printing.
This is basically a speed enhancement, to avoid blocking the Lisp code
from executing while Emacs is redisplaying."
:type 'integer
This is basically a speed enhancement, to avoid blocking the Lisp code
from executing while Emacs is redisplaying."
:type 'integer
@@
-123,7
+127,7
@@
from executing while Emacs is redisplaying."
(let ((x-select-enable-clipboard t))
(kill-new "")))
'eshell-clipboard-append) t))
(let ((x-select-enable-clipboard t))
(kill-new "")))
'eshell-clipboard-append) t))
- "
*
Map virtual devices name to Emacs Lisp functions.
+ "Map virtual devices name to Emacs Lisp functions.
If the user specifies any of the filenames above as a redirection
target, the function in the second element will be called.
If the user specifies any of the filenames above as a redirection
target, the function in the second element will be called.
@@
-339,8
+343,9
@@
it defaults to `insert'."
(let* ((exists (get-file-buffer target))
(buf (find-file-noselect target t)))
(with-current-buffer buf
(let* ((exists (get-file-buffer target))
(buf (find-file-noselect target t)))
(with-current-buffer buf
- (if buffer-read-only
+ (if buffer-
file-
read-only
(error "Cannot write to read-only file `%s'" target))
(error "Cannot write to read-only file `%s'" target))
+ (setq buffer-read-only nil)
(set (make-local-variable 'eshell-output-file-buffer)
(if (eq exists buf) 0 t))
(cond ((eq mode 'overwrite)
(set (make-local-variable 'eshell-output-file-buffer)
(if (eq exists buf) 0 t))
(cond ((eq mode 'overwrite)
@@
-380,8
+385,7
@@
it defaults to `insert'."
(error "Invalid redirection target: %s"
(eshell-stringify target)))))
(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."
(defun eshell-set-output-handle (index mode &optional target)
"Set handle INDEX, using MODE, to point to TARGET."
@@
-512,7
+516,4
@@
Returns what was actually sent, or nil if nothing was sent."
(eshell-output-object-to-target object (car target))
(setq target (cdr target))))))
(eshell-output-object-to-target object (car target))
(setq target (cdr target))))))
-;;; Code:
-
-;; arch-tag: 9ca2080f-d5e0-4b26-aa0b-d59194a905a2
;;; esh-io.el ends here
;;; esh-io.el ends here