diff options
| author | Philipp | 2017-05-06 22:23:03 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-05-13 12:32:29 +0200 |
| commit | a1d461592172ca4c8aac0e4e923ef5e909cfb361 (patch) | |
| tree | 7d972dbecad74eab4f7dfb37969ab0170c2870e1 /src/lread.c | |
| parent | 16004397f40d15d9db6b90632c236c804f38fc40 (diff) | |
| download | emacs-a1d461592172ca4c8aac0e4e923ef5e909cfb361.tar.gz emacs-a1d461592172ca4c8aac0e4e923ef5e909cfb361.zip | |
Make `old-style-backquotes' variable internal
* src/lread.c (load_warn_old_style_backquotes, Fload, read1)
(syms_of_lread): Rename `old-style-backquotes' to
`lread--old-style-backquotes', and clarify that it's for internal
use only.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Rename
variable.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Add
unit test.
* emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes): Add unit test.
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lread.c b/src/lread.c index 0e5b476a9a2..c03aad4f722 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -948,7 +948,7 @@ load_error_handler (Lisp_Object data) | |||
| 948 | static void | 948 | static void |
| 949 | load_warn_old_style_backquotes (Lisp_Object file) | 949 | load_warn_old_style_backquotes (Lisp_Object file) |
| 950 | { | 950 | { |
| 951 | if (!NILP (Vold_style_backquotes)) | 951 | if (!NILP (Vlread_old_style_backquotes)) |
| 952 | { | 952 | { |
| 953 | AUTO_STRING (format, "Loading `%s': old-style backquotes detected!"); | 953 | AUTO_STRING (format, "Loading `%s': old-style backquotes detected!"); |
| 954 | CALLN (Fmessage, format, file); | 954 | CALLN (Fmessage, format, file); |
| @@ -1216,7 +1216,7 @@ Return t if the file exists and loads successfully. */) | |||
| 1216 | version = -1; | 1216 | version = -1; |
| 1217 | 1217 | ||
| 1218 | /* Check for the presence of old-style quotes and warn about them. */ | 1218 | /* Check for the presence of old-style quotes and warn about them. */ |
| 1219 | specbind (Qold_style_backquotes, Qnil); | 1219 | specbind (Qlread_old_style_backquotes, Qnil); |
| 1220 | record_unwind_protect (load_warn_old_style_backquotes, file); | 1220 | record_unwind_protect (load_warn_old_style_backquotes, file); |
| 1221 | 1221 | ||
| 1222 | /* Check for the presence of unescaped character literals and warn | 1222 | /* Check for the presence of unescaped character literals and warn |
| @@ -3040,7 +3040,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 3040 | "(\`" anyway). */ | 3040 | "(\`" anyway). */ |
| 3041 | if (!new_backquote_flag && first_in_list && next_char == ' ') | 3041 | if (!new_backquote_flag && first_in_list && next_char == ' ') |
| 3042 | { | 3042 | { |
| 3043 | Vold_style_backquotes = Qt; | 3043 | Vlread_old_style_backquotes = Qt; |
| 3044 | goto default_label; | 3044 | goto default_label; |
| 3045 | } | 3045 | } |
| 3046 | else | 3046 | else |
| @@ -3094,7 +3094,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 3094 | } | 3094 | } |
| 3095 | else | 3095 | else |
| 3096 | { | 3096 | { |
| 3097 | Vold_style_backquotes = Qt; | 3097 | Vlread_old_style_backquotes = Qt; |
| 3098 | goto default_label; | 3098 | goto default_label; |
| 3099 | } | 3099 | } |
| 3100 | } | 3100 | } |
| @@ -4843,10 +4843,11 @@ variables, this must be set in the first line of a file. */); | |||
| 4843 | doc: /* List of buffers being read from by calls to `eval-buffer' and `eval-region'. */); | 4843 | doc: /* List of buffers being read from by calls to `eval-buffer' and `eval-region'. */); |
| 4844 | Veval_buffer_list = Qnil; | 4844 | Veval_buffer_list = Qnil; |
| 4845 | 4845 | ||
| 4846 | DEFVAR_LISP ("old-style-backquotes", Vold_style_backquotes, | 4846 | DEFVAR_LISP ("lread--old-style-backquotes", Vlread_old_style_backquotes, |
| 4847 | doc: /* Set to non-nil when `read' encounters an old-style backquote. */); | 4847 | doc: /* Set to non-nil when `read' encounters an old-style backquote. |
| 4848 | Vold_style_backquotes = Qnil; | 4848 | For internal use only. */); |
| 4849 | DEFSYM (Qold_style_backquotes, "old-style-backquotes"); | 4849 | Vlread_old_style_backquotes = Qnil; |
| 4850 | DEFSYM (Qlread_old_style_backquotes, "lread--old-style-backquotes"); | ||
| 4850 | 4851 | ||
| 4851 | DEFVAR_LISP ("lread--unescaped-character-literals", | 4852 | DEFVAR_LISP ("lread--unescaped-character-literals", |
| 4852 | Vlread_unescaped_character_literals, | 4853 | Vlread_unescaped_character_literals, |