diff options
| author | Karl Heuer | 1994-03-22 22:20:38 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-22 22:20:38 +0000 |
| commit | 92fddec9eb13fec973f817093cf5ba662b117c0c (patch) | |
| tree | cdaf12efd97be1e394a8153487fa716fe53baa8f /src | |
| parent | f943104adbd9be9e67f2ae17dcd0c4143f075acd (diff) | |
| download | emacs-92fddec9eb13fec973f817093cf5ba662b117c0c.tar.gz emacs-92fddec9eb13fec973f817093cf5ba662b117c0c.zip | |
(unreadchar): Don't back up the pointer when unreading EOF.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c index af7a0153b02..760cb462483 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -165,7 +165,11 @@ unreadchar (readcharfun, c) | |||
| 165 | Lisp_Object readcharfun; | 165 | Lisp_Object readcharfun; |
| 166 | int c; | 166 | int c; |
| 167 | { | 167 | { |
| 168 | if (XTYPE (readcharfun) == Lisp_Buffer) | 168 | if (c == -1) |
| 169 | /* Don't back up the pointer if we're unreading the end-of-input mark, | ||
| 170 | since readchar didn't advance it when we read it. */ | ||
| 171 | ; | ||
| 172 | else if (XTYPE (readcharfun) == Lisp_Buffer) | ||
| 169 | { | 173 | { |
| 170 | if (XBUFFER (readcharfun) == current_buffer) | 174 | if (XBUFFER (readcharfun) == current_buffer) |
| 171 | SET_PT (point - 1); | 175 | SET_PT (point - 1); |