From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Make `old-style-backquotes' variable internal Date: Sat, 13 May 2017 10:35:04 +0000 Message-ID: References: <83r301e6td.fsf@gnu.org> <20170507114946.38440-1-phst@google.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114b33e4a09af8054f656018" X-Trace: blaine.gmane.org 1494671758 12570 195.159.176.226 (13 May 2017 10:35:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 May 2017 10:35:58 +0000 (UTC) Cc: Philipp To: eliz@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 13 12:35:54 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9UOv-0003Af-Rt for ged-emacs-devel@m.gmane.org; Sat, 13 May 2017 12:35:54 +0200 Original-Received: from localhost ([::1]:57009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9UP1-000230-6A for ged-emacs-devel@m.gmane.org; Sat, 13 May 2017 06:35:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9UOO-00022t-OC for emacs-devel@gnu.org; Sat, 13 May 2017 06:35:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9UOM-0007CL-Sr for emacs-devel@gnu.org; Sat, 13 May 2017 06:35:20 -0400 Original-Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:38265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9UOK-0007Aa-2f; Sat, 13 May 2017 06:35:16 -0400 Original-Received: by mail-wm0-x234.google.com with SMTP id v15so3887718wmv.1; Sat, 13 May 2017 03:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X0A9hP84DDya7CVp7keEcDcrVbOzUk5awSZGAfg3sU8=; b=bMz5m4JyGsM2oAKPdMqQkNZzYfSm2Zrcb6z/xX71OivqRd8w59hTclB4gB7ejjtyP/ ZAG6m4fsw4bAWBaHwR4+LogwrsKubUZKjnta45SPprw0aUajz/SQLzG1rF8vVu+oqN41 BVKBSZtaPQwMjnga71MrSyjyYiwGW7hLv5k0uaCLHIYuzZteeAhDBptfNx5Wg97aGqNm CYF0Ib271B0XYWuhCCbn2SMxEW9CXzSUxTkWgvvkJMk4cnn4tyZcmNhpLSXu0IzngDR6 91pwff10CYdpPJlJfIIbgxCAk2FSjfA855A+hEMT7vOJGG2X3Dwj5GLMqVSJnjShXcRi Mhew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X0A9hP84DDya7CVp7keEcDcrVbOzUk5awSZGAfg3sU8=; b=S03mvrSpVmVP3s8+k7bSiE+Ogtypj9lnrxyzEbVHLzmoZ8yN7zevA3M5GTyFdVOOQY wlOSF6GgWxKvs+rUSY9AwnMRNc1FRX1eyZCcsHKN9kzDWt7mK8lcYrycSlIX5tyduGkD HHybMcmaCzuS6mYcSvF0d9zbIf31jNu75FbwvTEuTxtfZTgvlQ4xYuZ3O5KIOkDLXcxa tho+bmdzNM4zLRxXflNxdOGb7e+v5rB8YeovbLLDmNnBkkH8L492Tw08o/j5D061TPCy dbvwz39fURIFVuMEkdKf8PcFu8NPvyo9e9bip7vjU+I0c463dpWoRGwxxDyt7dNBCNzV cM2w== X-Gm-Message-State: AODbwcBnqQDRLTA5A41bBZq3hynwFuNoUtDvV2TdxmQAoUPXrbF2Z2xg znTP51QPPoKUdoMZLQN048nJAMv76Q== X-Received: by 10.28.150.86 with SMTP id y83mr5595001wmd.46.1494671714980; Sat, 13 May 2017 03:35:14 -0700 (PDT) In-Reply-To: <20170507114946.38440-1-phst@google.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214814 Archived-At: --001a114b33e4a09af8054f656018 Content-Type: text/plain; charset="UTF-8" Philipp schrieb am So., 7. Mai 2017 um 13:49 Uhr: > * 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. > --- > etc/NEWS | 5 +++++ > lisp/emacs-lisp/bytecomp.el | 4 ++-- > src/lread.c | 17 +++++++++-------- > test/lisp/emacs-lisp/bytecomp-tests.el | 15 +++++++++++++++ > test/src/lread-tests.el | 9 +++++++++ > 5 files changed, 40 insertions(+), 10 deletions(-) > > diff --git a/etc/NEWS b/etc/NEWS > index 1f1f4b4b4b..166744b848 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -896,6 +896,11 @@ which was sometimes numerically incorrect. For > example, on a 64-bit > host (max 1e16 10000000000000001) now returns its second argument > instead of its first. > > ++++ > +** The variable 'old-style-backquotes' has been made internal and > +renamed to 'lread--old-style-backquotes'. No user code should use > +this variable. > + > > * Lisp Changes in Emacs 26.1 > > diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el > index 201733ff03..04335ffbfe 100644 > --- a/lisp/emacs-lisp/bytecomp.el > +++ b/lisp/emacs-lisp/bytecomp.el > @@ -2021,11 +2021,11 @@ byte-compile-from-buffer > (not (eobp))) > (setq byte-compile-read-position (point) > byte-compile-last-position byte-compile-read-position) > - (let* ((old-style-backquotes nil) > + (let* ((lread--old-style-backquotes nil) > (lread--unescaped-character-literals nil) > (form (read inbuffer))) > ;; Warn about the use of old-style backquotes. > - (when old-style-backquotes > + (when lread--old-style-backquotes > (byte-compile-warn "!! The file uses old-style backquotes !! > This functionality has been obsolete for more than 10 years already > and will be removed soon. See (elisp)Backquote in the manual.")) > diff --git a/src/lread.c b/src/lread.c > index 6467043b1d..3cf8ef5a4e 100644 > --- a/src/lread.c > +++ b/src/lread.c > @@ -948,7 +948,7 @@ load_error_handler (Lisp_Object data) > static void > load_warn_old_style_backquotes (Lisp_Object file) > { > - if (!NILP (Vold_style_backquotes)) > + if (!NILP (Vlread_old_style_backquotes)) > { > AUTO_STRING (format, "Loading `%s': old-style backquotes > detected!"); > CALLN (Fmessage, format, file); > @@ -1214,7 +1214,7 @@ Return t if the file exists and loads successfully. > */) > version = -1; > > /* Check for the presence of old-style quotes and warn about them. */ > - specbind (Qold_style_backquotes, Qnil); > + specbind (Qlread_old_style_backquotes, Qnil); > record_unwind_protect (load_warn_old_style_backquotes, file); > > /* Check for the presence of unescaped character literals and warn > @@ -3037,7 +3037,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool > first_in_list) > "(\`" anyway). */ > if (!new_backquote_flag && first_in_list && next_char == ' ') > { > - Vold_style_backquotes = Qt; > + Vlread_old_style_backquotes = Qt; > goto default_label; > } > else > @@ -3091,7 +3091,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool > first_in_list) > } > else > { > - Vold_style_backquotes = Qt; > + Vlread_old_style_backquotes = Qt; > goto default_label; > } > } > @@ -4840,10 +4840,11 @@ variables, this must be set in the first line of a > file. */); > doc: /* List of buffers being read from by calls to > `eval-buffer' and `eval-region'. */); > Veval_buffer_list = Qnil; > > - DEFVAR_LISP ("old-style-backquotes", Vold_style_backquotes, > - doc: /* Set to non-nil when `read' encounters an old-style > backquote. */); > - Vold_style_backquotes = Qnil; > - DEFSYM (Qold_style_backquotes, "old-style-backquotes"); > + DEFVAR_LISP ("lread--old-style-backquotes", Vlread_old_style_backquotes, > + doc: /* Set to non-nil when `read' encounters an old-style > backquote. > +For internal use only. */); > + Vlread_old_style_backquotes = Qnil; > + DEFSYM (Qlread_old_style_backquotes, "lread--old-style-backquotes"); > > DEFVAR_LISP ("lread--unescaped-character-literals", > Vlread_unescaped_character_literals, > diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el > b/test/lisp/emacs-lisp/bytecomp-tests.el > index 3624904753..a83c998a59 100644 > --- a/test/lisp/emacs-lisp/bytecomp-tests.el > +++ b/test/lisp/emacs-lisp/bytecomp-tests.el > @@ -529,6 +529,21 @@ bytecomp-tests--with-temp-file > (list (concat "unescaped character literals " > "\", (, ), ;, [, ] detected!")))))))) > > +(ert-deftest bytecomp-tests--old-style-backquotes () > + "Check that byte compiling warns about old-style backquotes." > + (should (boundp 'lread--old-style-backquotes)) > + (bytecomp-tests--with-temp-file source > + (write-region "(` (a b))" nil source) > + (bytecomp-tests--with-temp-file destination > + (let* ((byte-compile-dest-file-function (lambda (_) destination)) > + (byte-compile-error-on-warn t) > + (byte-compile-debug t) > + (err (should-error (byte-compile-file source)))) > + (should (equal (cdr err) > + (list "!! The file uses old-style backquotes !! > +This functionality has been obsolete for more than 10 years already > +and will be removed soon. See (elisp)Backquote in the manual."))))))) > + > ;; Local Variables: > ;; no-byte-compile: t > ;; End: > diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el > index 84342348d4..e45d184cad 100644 > --- a/test/src/lread-tests.el > +++ b/test/src/lread-tests.el > @@ -142,4 +142,13 @@ lread-tests--last-message > "unescaped character literals " > "\", (, ), ;, [, ] detected!"))))) > > +(ert-deftest lread-tests--old-style-backquotes () > + "Check that loading warns about old-style backquotes." > + (lread-tests--with-temp-file file-name > + (write-region "(` (a b))" nil file-name) > + (should (equal (load file-name nil :nomessage :nosuffix) t)) > + (should (equal (lread-tests--last-message) > + (concat (format-message "Loading `%s': " file-name) > + "old-style backquotes detected!"))))) > + > ;;; lread-tests.el ends here > -- > 2.12.2 > > Pushed as a1d4615921. --001a114b33e4a09af8054f656018 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Philip= p <phil07c1@gmail.com> schr= ieb am So., 7. Mai 2017 um 13:49=C2=A0Uhr:
* 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.
---
=C2=A0etc/NEWS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 5 +++++
=C2=A0lisp/emacs-lisp/bytecomp.el=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = |=C2=A0 4 ++--
=C2=A0src/lread.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 17 +++++++++--------
=C2=A0test/lisp/emacs-lisp/bytecomp-tests.el | 15 +++++++++++++++
=C2=A0test/src/lread-tests.el=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 9 +++++++++
=C2=A05 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 1f1f4b4b4b..166744b848 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -896,6 +896,11 @@ which was sometimes numerically incorrect.=C2=A0 For e= xample, on a 64-bit
=C2=A0host (max 1e16 10000000000000001) now returns its second argument
=C2=A0instead of its first.

++++
+** The variable 'old-style-backquotes' has been made internal and<= br> +renamed to 'lread--old-style-backquotes'.=C2=A0 No user code shoul= d use
+this variable.
+

=C2=A0* Lisp Changes in Emacs 26.1

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 201733ff03..04335ffbfe 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2021,11 +2021,11 @@ byte-compile-from-buffer
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(not (eobp)))=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq byte-compile-read-position (point)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 byte-compile-last-p= osition byte-compile-read-position)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((old-style-backquotes nil)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((lread--old-style-backquotes nil)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lread--unes= caped-character-literals nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (form (read = inbuffer)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Warn about the use of ol= d-style backquotes.
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when old-style-backquotes
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when lread--old-style-backquote= s
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(byte-compile-warn &= quot;!! The file uses old-style backquotes !!
=C2=A0This functionality has been obsolete for more than 10 years already =C2=A0and will be removed soon.=C2=A0 See (elisp)Backquote in the manual.&q= uot;))
diff --git a/src/lread.c b/src/lread.c
index 6467043b1d..3cf8ef5a4e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -948,7 +948,7 @@ load_error_handler (Lisp_Object data)
=C2=A0static void
=C2=A0load_warn_old_style_backquotes (Lisp_Object file)
=C2=A0{
-=C2=A0 if (!NILP (Vold_style_backquotes))
+=C2=A0 if (!NILP (Vlread_old_style_backquotes))
=C2=A0 =C2=A0 =C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0AUTO_STRING (format, "Loading `%s': old= -style backquotes detected!");
=C2=A0 =C2=A0 =C2=A0 =C2=A0CALLN (Fmessage, format, file);
@@ -1214,7 +1214,7 @@ Return t if the file exists and loads successfully.= =C2=A0 */)
=C2=A0 =C2=A0version =3D -1;

=C2=A0 =C2=A0/* Check for the presence of old-style quotes and warn about t= hem.=C2=A0 */
-=C2=A0 specbind (Qold_style_backquotes, Qnil);
+=C2=A0 specbind (Qlread_old_style_backquotes, Qnil);
=C2=A0 =C2=A0record_unwind_protect (load_warn_old_style_backquotes, file);<= br>
=C2=A0 =C2=A0/* Check for the presence of unescaped character literals and = warn
@@ -3037,7 +3037,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_= in_list)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"(\`" anyway).=C2=A0 */<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!new_backquote_flag && first_in_lis= t && next_char =3D=3D ' ')
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Vold_style_backquotes =3D Qt;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Vlread_old_style_backquotes =3D Q= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto default_label;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 else
@@ -3091,7 +3091,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_= in_list)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Vold_style_backquotes =3D Qt;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Vlread_old_style_backquotes =3D Q= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto default_label;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0}
@@ -4840,10 +4840,11 @@ variables, this must be set in the first line of a = file.=C2=A0 */);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0doc: /* List of buff= ers being read from by calls to `eval-buffer' and `eval-region'.=C2= =A0 */);
=C2=A0 =C2=A0Veval_buffer_list =3D Qnil;

-=C2=A0 DEFVAR_LISP ("old-style-backquotes", Vold_style_backquote= s,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 doc: /* Set to non-nil wh= en `read' encounters an old-style backquote.=C2=A0 */);
-=C2=A0 Vold_style_backquotes =3D Qnil;
-=C2=A0 DEFSYM (Qold_style_backquotes, "old-style-backquotes"); +=C2=A0 DEFVAR_LISP ("lread--old-style-backquotes", Vlread_old_st= yle_backquotes,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 doc: /* Set to non-nil wh= en `read' encounters an old-style backquote.
+For internal use only.=C2=A0 */);
+=C2=A0 Vlread_old_style_backquotes =3D Qnil;
+=C2=A0 DEFSYM (Qlread_old_style_backquotes, "lread--old-style-backquo= tes");

=C2=A0 =C2=A0DEFVAR_LISP ("lread--unescaped-character-literals",<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Vlread_unescaped_ch= aracter_literals,
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/= bytecomp-tests.el
index 3624904753..a83c998a59 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -529,6 +529,21 @@ bytecomp-tests--with-temp-file
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (list (concat "unescaped character literals "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\", = (, ), ;, [, ] detected!"))))))))

+(ert-deftest bytecomp-tests--old-style-backquotes ()
+=C2=A0 "Check that byte compiling warns about old-style backquotes.&q= uot;
+=C2=A0 (should (boundp 'lread--old-style-backquotes))
+=C2=A0 (bytecomp-tests--with-temp-file source
+=C2=A0 =C2=A0 (write-region "(` (a b))" nil source)
+=C2=A0 =C2=A0 (bytecomp-tests--with-temp-file destination
+=C2=A0 =C2=A0 =C2=A0 (let* ((byte-compile-dest-file-function (lambda (_) d= estination))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (byte-compile-error-on-warn t) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (byte-compile-debug t)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (err (should-error (byte-compile= -file source))))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 (should (equal (cdr err)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(list "!! The file uses old-style backquotes !!
+This functionality has been obsolete for more than 10 years already
+and will be removed soon.=C2=A0 See (elisp)Backquote in the manual.")= ))))))
+
=C2=A0;; Local Variables:
=C2=A0;; no-byte-compile: t
=C2=A0;; End:
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index 84342348d4..e45d184cad 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -142,4 +142,13 @@ lread-tests--last-message
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 "unescaped character literals "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 "\", (, ), ;, [, ] detected!")))))<= br>
+(ert-deftest lread-tests--old-style-backquotes ()
+=C2=A0 "Check that loading warns about old-style backquotes." +=C2=A0 (lread-tests--with-temp-file file-name
+=C2=A0 =C2=A0 (write-region "(` (a b))" nil file-name)
+=C2=A0 =C2=A0 (should (equal (load file-name nil :nomessage :nosuffix) t))=
+=C2=A0 =C2=A0 (should (equal (lread-tests--last-message)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(conc= at (format-message "Loading `%s': " file-name)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0"old-style backquotes detected!")))))
+
=C2=A0;;; lread-tests.el ends here
--
2.12.2


Pushed as a1d4615921.=C2=A0
--001a114b33e4a09af8054f656018--