all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 9613690: Raise an error when detecting old-style backquotes.
       [not found] ` <20171008165907.42229201F3@vcs0.savannah.gnu.org>
@ 2017-10-09 11:56   ` Mark Oteiza
  2017-10-09 14:09     ` Philipp Stephani
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Oteiza @ 2017-10-09 11:56 UTC (permalink / raw)
  To: emacs-devel; +Cc: Philipp Stephani


p.stephani2@gmail.com (Philipp Stephani) writes:

>     Raise an error when detecting old-style backquotes.

I see the following when building master

make -C ../admin/grammars all EMACS="../../src/emacs"
make[2]: Entering directory '/tmp/makepkg/emacs-git/src/emacs/admin/grammars'
  GEN      ../../lisp/cedet/semantic/bovine/make-by.el
../../lisp/emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete generic function (as of 25.1); use ‘eieio-named’ instead.
../../lisp/emacs-lisp/eieio.el: ‘object-print’ is an obsolete generic function (as of 26.1); use ‘cl-print-object’ instead.
../../lisp/emacs-lisp/eieio-base.el: ‘eieio-object-name-string’ is an obsolete generic function (as of 25.1); use ‘eieio-named’ instead.
Loading ‘nil’: old-style backquotes detected!
make[2]: Leaving directory '/tmp/makepkg/emacs-git/src/emacs/admin/grammars'
make[2]: Entering directory '/tmp/makepkg/emacs-git/src/emacs/lisp'
  ELC      cedet/semantic/bovine/make.elc
../../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete generic function (as of 25.1); use ‘eieio-named’ instead.
../../../emacs-lisp/eieio.el: ‘object-print’ is an obsolete generic function (as of 26.1); use ‘cl-print-object’ instead.

In toplevel form:
cedet/semantic/bovine/make.el:31:1:Error: Cannot open load file: No such file or directory, semantic/bovine/make-by
make[2]: *** [Makefile:297: cedet/semantic/bovine/make.elc] Error 1
make[2]: Leaving directory '/tmp/makepkg/emacs-git/src/emacs/lisp'
make[1]: *** [Makefile:320: compile-main] Error 2
make[1]: Leaving directory '/tmp/makepkg/emacs-git/src/emacs/lisp'
make: *** [Makefile:403: lisp] Error 2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master 9613690: Raise an error when detecting old-style backquotes.
  2017-10-09 11:56   ` master 9613690: Raise an error when detecting old-style backquotes Mark Oteiza
@ 2017-10-09 14:09     ` Philipp Stephani
  2017-10-10  1:19       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Stephani @ 2017-10-09 14:09 UTC (permalink / raw)
  To: Mark Oteiza, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]

Mark Oteiza <mvoteiza@udel.edu> schrieb am Mo., 9. Okt. 2017 um 13:56 Uhr:

>
> p.stephani2@gmail.com (Philipp Stephani) writes:
>
> >     Raise an error when detecting old-style backquotes.
>
> I see the following when building master
>
> make -C ../admin/grammars all EMACS="../../src/emacs"
> make[2]: Entering directory
> '/tmp/makepkg/emacs-git/src/emacs/admin/grammars'
>   GEN      ../../lisp/cedet/semantic/bovine/make-by.el
> ../../lisp/emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete
> generic function (as of 25.1); use ‘eieio-named’ instead.
> ../../lisp/emacs-lisp/eieio.el: ‘object-print’ is an obsolete generic
> function (as of 26.1); use ‘cl-print-object’ instead.
> ../../lisp/emacs-lisp/eieio-base.el: ‘eieio-object-name-string’ is an
> obsolete generic function (as of 25.1); use ‘eieio-named’ instead.
> Loading ‘nil’: old-style backquotes detected!
> make[2]: Leaving directory
> '/tmp/makepkg/emacs-git/src/emacs/admin/grammars'
> make[2]: Entering directory '/tmp/makepkg/emacs-git/src/emacs/lisp'
>   ELC      cedet/semantic/bovine/make.elc
> ../../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete
> generic function (as of 25.1); use ‘eieio-named’ instead.
> ../../../emacs-lisp/eieio.el: ‘object-print’ is an obsolete generic
> function (as of 26.1); use ‘cl-print-object’ instead.
>
> In toplevel form:
> cedet/semantic/bovine/make.el:31:1:Error: Cannot open load file: No such
> file or directory, semantic/bovine/make-by
> make[2]: *** [Makefile:297: cedet/semantic/bovine/make.elc] Error 1
> make[2]: Leaving directory '/tmp/makepkg/emacs-git/src/emacs/lisp'
> make[1]: *** [Makefile:320: compile-main] Error 2
> make[1]: Leaving directory '/tmp/makepkg/emacs-git/src/emacs/lisp'
> make: *** [Makefile:403: lisp] Error 2
>
>
:-(
I've reverted the commit, but this should really be fixed. Apparently
Bovine generates incorrect code.
-- 

Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

If you received this communication by mistake, please don't forward it to
anyone else (it may contain confidential or privileged information), please
erase all copies of it, including all attachments, and please let the
sender know it went to the wrong person. Thanks.

[-- Attachment #2: Type: text/html, Size: 3093 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master 9613690: Raise an error when detecting old-style backquotes.
  2017-10-09 14:09     ` Philipp Stephani
@ 2017-10-10  1:19       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2017-10-10  1:19 UTC (permalink / raw)
  To: emacs-devel

> I've reverted the commit, but this should really be fixed. Apparently
> Bovine generates incorrect code.

Bovine uses the Lisp reader to `read` things like "( ,@$2 )" and "( foo
,$1 (car ,@$2) )".  AFAICT it was designed for the old-style unquotes, but
it's been tweaked to work correctly when those commas are treated as
new-style unquotes.

The patch below seems to work around this problem.  Of course, as
mentioned in another email, just always interpreting those unquotes as
new-style works just as well (and with cleaner semantics).


        Stefan


diff --git a/src/lread.c b/src/lread.c
index c073fc4ce6..75c7e3ee55 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2667,13 +2667,17 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
 {
   int c;
   bool uninterned_symbol = false;
+  bool went_through_retry = false;
   bool multibyte;
   char stackbuf[MAX_ALLOCA];
   current_thread->stack_top = stackbuf;
 
   *pch = 0;
 
+  goto skipretry;
  retry:
+  went_through_retry = true;
+ skipretry:
 
   c = READCHAR_REPORT_MULTIBYTE (&multibyte);
   if (c < 0)
@@ -3202,6 +3206,9 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
 	   of a list.  */
 	if (new_backquote_flag
 	    || !first_in_list
+            /* If there was some separation (space, comment, ....) between the
+               `(` and the `,`, we consider this is a new-style unquote.  */
+            || went_through_retry
 	    || (next_char != ' ' && next_char != '@'))
 	  {
 	    Lisp_Object comma_type = Qnil;




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-10  1:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20171008165905.14025.63605@vcs0.savannah.gnu.org>
     [not found] ` <20171008165907.42229201F3@vcs0.savannah.gnu.org>
2017-10-09 11:56   ` master 9613690: Raise an error when detecting old-style backquotes Mark Oteiza
2017-10-09 14:09     ` Philipp Stephani
2017-10-10  1:19       ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.