diff options
| author | Philipp Stephani | 2017-12-29 21:58:07 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2018-01-07 14:25:12 +0100 |
| commit | 378be8df8d9075719437c475fbb520dd40d2353b (patch) | |
| tree | 676bd7222c3ebadecc1eef44a00d1aab61523007 /src | |
| parent | ddb74b2027802ab4416bd8cdb1757a209dd7a63b (diff) | |
| download | emacs-378be8df8d9075719437c475fbb520dd40d2353b.tar.gz emacs-378be8df8d9075719437c475fbb520dd40d2353b.zip | |
Improve error message for old-style backquotes
* src/lread.c (load_error_old_style_backquotes): Improve error message
if no file is being loaded.
* test/src/lread-tests.el (lread-tests--force-new-style-backquotes):
Adapt test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index d675b563916..bcf3b7f55c7 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1006,8 +1006,16 @@ load_error_handler (Lisp_Object data) | |||
| 1006 | static _Noreturn void | 1006 | static _Noreturn void |
| 1007 | load_error_old_style_backquotes (void) | 1007 | load_error_old_style_backquotes (void) |
| 1008 | { | 1008 | { |
| 1009 | AUTO_STRING (format, "Loading `%s': old-style backquotes detected!"); | 1009 | if (NILP (Vload_file_name)) |
| 1010 | xsignal1 (Qerror, CALLN (Fformat_message, format, Vload_file_name)); | 1010 | { |
| 1011 | AUTO_STRING (message, "Old-style backquotes detected!"); | ||
| 1012 | xsignal1 (Qerror, message); | ||
| 1013 | } | ||
| 1014 | else | ||
| 1015 | { | ||
| 1016 | AUTO_STRING (format, "Loading `%s': old-style backquotes detected!"); | ||
| 1017 | xsignal1 (Qerror, CALLN (Fformat_message, format, Vload_file_name)); | ||
| 1018 | } | ||
| 1011 | } | 1019 | } |
| 1012 | 1020 | ||
| 1013 | static void | 1021 | static void |