diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-19 12:55:46 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-19 12:55:46 +0200 |
commit | 9e586ac1d1b3bbabbd73a119698df742c0bfa523 (patch) | |
tree | e550f79abad54bb0e550f9a27eeb78c7b341fe87 | |
parent | dc90e62276da36af14305e0dbe1076e2d041ac4f (diff) | |
download | emacs-9e586ac1d1b3bbabbd73a119698df742c0bfa523.tar.gz |
Signal an end-of-file error upon errors when reading from stdin
* src/minibuf.c (read_minibuf_noninteractive): Signal an
`end-of-file' error when reading from stdin instead of a general
error (bug#34123). This makes it easier to write code that
recovers from this situation.
Suggested by Noam Postavsky <npostavs@gmail.com>.
-rw-r--r-- | src/minibuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index cb302c5a605..e18ff17abbf 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -251,7 +251,7 @@ read_minibuf_noninteractive (Lisp_Object prompt, bool expflag, else { xfree (line); - error ("Error reading from stdin"); + xsignal1 (Qend_of_file, build_string ("Error reading from stdin")); } /* If Lisp form desired instead of string, parse it. */ |