diff options
| author | Mattias EngdegÄrd | 2022-06-03 10:12:24 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-06-03 11:23:30 +0200 |
| commit | 28622d4dd0347227a28b7b25c674437239a00a06 (patch) | |
| tree | 194fe6c6de674eec25f4126fd5d772000fd1b99a /src | |
| parent | e48c9181b1c103b42032a5fb6547184da75bd773 (diff) | |
| download | emacs-28622d4dd0347227a28b7b25c674437239a00a06.tar.gz emacs-28622d4dd0347227a28b7b25c674437239a00a06.zip | |
Let ?\LF signal an error (bug#55738)
As suggested by Stefan Monnier.
* src/lread.c (read_escape):
Signal an error for ?\LF since it cannot reasonably be intended.
* test/src/lread-tests.el (lread-escaped-lf): Update test.
* etc/NEWS: Announce.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lread.c b/src/lread.c index 4b7d38a8e6c..1d20470a8bf 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2664,6 +2664,10 @@ read_escape (Lisp_Object readcharfun) | |||
| 2664 | case 'v': | 2664 | case 'v': |
| 2665 | return '\v'; | 2665 | return '\v'; |
| 2666 | 2666 | ||
| 2667 | case '\n': | ||
| 2668 | /* ?\LF is an error; it's probably a user mistake. */ | ||
| 2669 | error ("Invalid escape character syntax"); | ||
| 2670 | |||
| 2667 | case 'M': | 2671 | case 'M': |
| 2668 | c = READCHAR; | 2672 | c = READCHAR; |
| 2669 | if (c != '-') | 2673 | if (c != '-') |