aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorPhillip Lord2016-07-18 23:28:05 +0100
committerPhillip Lord2017-01-14 12:07:27 +0000
commit86a2c93b3b62a1decad326fd66ed5cc1a9e64d5f (patch)
tree2bba44a75181d40df367217f4d9f2d5ec5b05925 /lisp/simple.el
parent9569916d94c6c448862d02919e52fc3bfb9b9c8d (diff)
downloademacs-feature/stdout-stderr-stream.tar.gz
emacs-feature/stdout-stderr-stream.zip
Support standard input, output and error streamsfeature/stdout-stderr-stream
* doc/lispref/streams.texi: Update doc * lisp/simple.el (external-standard-input): New function * src/fns.c (external-standard-input-read-char, external-standard-input-read-line): New functions * src/print.c: (external-standard-output, external-standard-input): New functions
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a757876328b..17697f9be2b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8718,6 +8718,21 @@ to capitalize ARG words."
8718 (capitalize-region (region-beginning) (region-end)) 8718 (capitalize-region (region-beginning) (region-end))
8719 (capitalize-word arg))) 8719 (capitalize-word arg)))
8720 8720
8721(defvar external-standard-input-pushback nil
8722 "Pushback character for `external-standard-input'.")
8723
8724(defun external-standard-input (&optional char)
8725 "Read a character from the system standard input.
8726
8727If CHAR is non-nil, then do not read but return CHAR
8728on the next invocation."
8729 (if char
8730 (setq external-standard-input-pushback char)
8731 (if (eq nil external-standard-input-pushback)
8732 (external-standard-input-read-char)
8733 (let ((rtn external-standard-input-pushback))
8734 (setq external-standard-input-pushback nil)
8735 rtn))))
8721 8736
8722 8737
8723(provide 'simple) 8738(provide 'simple)