GNU bug report logs - #24542
25.1.50; The symbol `@' and sexp scanning

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Sun, 25 Sep 2016 17:43:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 24542 <at> debbugs.gnu.org:


Received: (at 24542) by debbugs.gnu.org; 3 Jan 2017 13:03:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 03 08:03:00 2017
Received: from localhost ([127.0.0.1]:40063 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cOOjz-00057G-Vd
	for submit <at> debbugs.gnu.org; Tue, 03 Jan 2017 08:03:00 -0500
Received: from mail-io0-f179.google.com ([209.85.223.179]:34246)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cOOjy-000573-NP
 for 24542 <at> debbugs.gnu.org; Tue, 03 Jan 2017 08:02:58 -0500
Received: by mail-io0-f179.google.com with SMTP id p42so430040404ioo.1
 for <24542 <at> debbugs.gnu.org>; Tue, 03 Jan 2017 05:02:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=AeVBMjEQMkf86xfP22p77RtJTdKCcLUBBIeVqjN7AE0=;
 b=NhOPOCR9EhT3otTcizAowU9tAmvdiyYvYAvUSgeTn4WShWFXOet25WlS2Hm1NoKrze
 948PblKltAHOxsskDR4l/HVJxMGmLiDbdizaVgLjvvVXw008dUUsyuOhPqGftxuFzwj3
 bgaDi4aobvGnGYA5yQGyOu1glpJ8Iq3UAFiY8AcAkjtotnlxFEZN9+VKukGihxEV9sFX
 /COuGIQFYKwTGx4sffgymtOldQdWpGrcIPjKXhYFrsvE0A4172ZGI48h6FBZBolKfipg
 lURcaXylHK26c2swOv3wRdfp+zsg7c5eyhEBAUKn6jgFY/N888w1V8Y4weyRHfmAGOi9
 Hm8g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=AeVBMjEQMkf86xfP22p77RtJTdKCcLUBBIeVqjN7AE0=;
 b=qFAoJlOdKsZ6Xg2JF2Wv4OaT859cjJclt2C91++atY8AJyjzdEzyNpQd1ECPj3P9Ks
 J2Dww/kQqrWpGAWT65C6K4oT7Gc46EzHQOSSwFe4p6T8U3OgLWDMr9uFRYSNs6wZlBi6
 h+NAS48HiQNVmFYpXPW/GdK/ZIJ6EvojAdygZ+11o8ViyV7WfRnUM6syyQzXsnBOFXNj
 xRWC1LvkRn9yG/3NgBgHk4Xj7uc/DK7rfXBQZqqBz/tQm7a96AJVKjnDJR46f/Bbs0+H
 geo/Ge1tLlMNZH+bXtYyweD1xQ8as0Fqvc5PYeCdN7EV/HiAP10SwG368XzYWFkNVoQJ
 nCIQ==
X-Gm-Message-State: AIkVDXLLfJJQjN2fUmeM1heUKLTbNFpEnW+brG3awW3UACj5dQzsIFwp6reIXqMtNi6rzQ==
X-Received: by 10.107.15.29 with SMTP id x29mr53309736ioi.185.1483448572762;
 Tue, 03 Jan 2017 05:02:52 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id j143sm35978403ita.1.2017.01.03.05.02.51
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 03 Jan 2017 05:02:52 -0800 (PST)
From: npostavs@HIDDEN
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#24542: 25.1.50; The symbol `@' and sexp scanning
References: <8760pj27wm.fsf@HIDDEN> <87o9zptn3r.fsf@HIDDEN>
 <87zij95hbr.fsf@HIDDEN> <87pok48g65.fsf@HIDDEN>
Date: Tue, 03 Jan 2017 08:03:54 -0500
In-Reply-To: <87pok48g65.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 03
 Jan 2017 13:46:26 +0100")
Message-ID: <87inpw5m85.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: 24542
Cc: 24542 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>> `@' has the prefix syntax flag, the elisp manual says `(elisp) Syntax Flags':
>>
>>    * `p' identifies an additional prefix character for Lisp syntax.
>>      These characters are treated as whitespace when they appear between
>>                           ^^^^^^^^^^^^^^^^^^^^^
>>      expressions.  When they appear within an expression, they are
>>      handled according to their usual syntax classes.
>>
>> So (eq element '@) acts the same as (eq element ' ).
>
> I don't agree with your interpretation.  `@' is an (textual
> representation of an) expression in the above example, so "these
> characters" don't "appear between expressions" in this case.  Could be
> that this wording led to a wrong implementation, however.

Well, it's a bit ambiguous whether a character sequence composed soley
of prefix characters should be considered an expression or not.
Obviously the end result is wrong for Lisp, i.e., does not correspond
with what `read' thinks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24542; Package emacs. Full text available.

Message received at 24542 <at> debbugs.gnu.org:


Received: (at 24542) by debbugs.gnu.org; 3 Jan 2017 12:47:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 03 07:47:04 2017
Received: from localhost ([127.0.0.1]:40050 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cOOUa-0004iR-CB
	for submit <at> debbugs.gnu.org; Tue, 03 Jan 2017 07:47:04 -0500
Received: from mout.web.de ([212.227.17.11]:52470)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1cOOUY-0004hs-B9
 for 24542 <at> debbugs.gnu.org; Tue, 03 Jan 2017 07:47:02 -0500
Received: from drachen.dragon ([109.84.3.238]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MHY5w-1cNHUj1Ylg-003JqP; Tue, 03
 Jan 2017 13:46:42 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: npostavs@HIDDEN
Subject: Re: bug#24542: 25.1.50; The symbol `@' and sexp scanning
References: <8760pj27wm.fsf@HIDDEN> <87o9zptn3r.fsf@HIDDEN>
 <87zij95hbr.fsf@HIDDEN>
Date: Tue, 03 Jan 2017 13:46:26 +0100
In-Reply-To: <87zij95hbr.fsf@HIDDEN>
 (npostavs@HIDDEN's message of "Mon, 02 Jan 2017
 15:37:28 -0500")
Message-ID: <87pok48g65.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K0:mRA4ZI9ulb46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pW9ZoXKXB
 Hb0W4Ky
X-Spam-Score: -3.9 (---)
X-Debbugs-Envelope-To: 24542
Cc: 24542 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

npostavs@HIDDEN writes:

> >> insert
> >>
> >>     (eq element '@)
> >>
> >> in an elisp mode buffer (e.g. scratch).  Put point at the quote or the
> >> "@".  Eval
> >>
> >>     (goto-char (scan-sexps (point) 1))
> >>
> >> and you get an error like:
> >>
> >>
> >> Debugger entered--Lisp error: (scan-error "Containing expression ends
> >> prematurely" 15 16)
> >
> > It seems that you can replace the symbol `@' in this recipe with any
> > symbol whose name has the form "@+", i.e. `@@' or `@@@' or...  When the
> > symbol contains only one character different from "@", it doesn't seem
> > to happen.
>
> `@' has the prefix syntax flag, the elisp manual says `(elisp) Syntax Flags':
>
>    * `p' identifies an additional prefix character for Lisp syntax.
>      These characters are treated as whitespace when they appear between
>                           ^^^^^^^^^^^^^^^^^^^^^
>      expressions.  When they appear within an expression, they are
>      handled according to their usual syntax classes.
>
> So (eq element '@) acts the same as (eq element ' ).

I don't agree with your interpretation.  `@' is an (textual
representation of an) expression in the above example, so "these
characters" don't "appear between expressions" in this case.  Could be
that this wording led to a wrong implementation, however.

> This could be changed with something the following patch, but I'm not
> sure if it's the right thing for non-Lisp languages...

> diff --git i/src/syntax.c w/src/syntax.c
> index 0ee1c74..253d3fb 100644
> --- i/src/syntax.c
> +++ w/src/syntax.c
> @@ -2681,7 +2681,16 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
>  	    }
>  
>  	  if (prefix)
> -	    continue;
> +            {
> +              int next_c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
> +              int next_syntax = SYNTAX_WITH_FLAGS (next_c);
> +              bool next_prefix = SYNTAX_FLAGS_PREFIX (next_syntax);
> +              enum syntaxcode next_code = syntax_multibyte (next_c, multibyte_symbol_p);
> +              if (next_prefix
> +                  || next_code == Ssymbol
> +                  || next_code == Sword)
> +                continue;
> +            }
>  
>  	  switch (code)
>  	    {

Thanks for the patch.  Can anyone judge whether we can do this?


Thanks,

Michael. 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24542; Package emacs. Full text available.

Message received at 24542 <at> debbugs.gnu.org:


Received: (at 24542) by debbugs.gnu.org; 2 Jan 2017 20:36:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 02 15:36:32 2017
Received: from localhost ([127.0.0.1]:39698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cO9LM-0008WF-AT
	for submit <at> debbugs.gnu.org; Mon, 02 Jan 2017 15:36:32 -0500
Received: from mail-io0-f177.google.com ([209.85.223.177]:33560)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cO9LK-0008W1-Sx
 for 24542 <at> debbugs.gnu.org; Mon, 02 Jan 2017 15:36:31 -0500
Received: by mail-io0-f177.google.com with SMTP id d9so418032332ioe.0
 for <24542 <at> debbugs.gnu.org>; Mon, 02 Jan 2017 12:36:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=nQakAXh7HTG64AtVGrQ1M7wh/Z4yQov/PYSOckoMhrc=;
 b=YbaFkn++G1MclUkIs3gvcSvi3sNYJMbM8G8B0Pg9hJe/7HARbn3j9JYVvA1wRYl3bX
 HmFjBXgo3bNCU0sTdbPdGGjWyC41CQMrVzJAKilYiDnZI8X6UtR1Os4f9nwlyQKRwWhA
 Vit3io/D+HrZ7WpJ5HYt8eCxVGQptI666KPXRA7R/WxXnGb+KAkg5Rdn0/chQv94ah7w
 jJKaVR02sksoz6uCPgKTdwhsB3qPlhFDNbiG8JJPTcQK5Iain4keBVxmB3xXDP5bYnL6
 PTbOlqGcN40EfCiQUa+Q3GnV5kn1rKd+97s+ky+JFms+czJlQ6HYokKHpDHvmcqJ0Uyv
 H6Yw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=nQakAXh7HTG64AtVGrQ1M7wh/Z4yQov/PYSOckoMhrc=;
 b=MHM7LiMuA/8/GyaZZNRB7vmk6I5gTwaODoLP27aTNm83BhBaBJetHyv3lTNhfNXFKq
 UtiULVaJYPodU7uo6T4eFfvrcgIyp9h/4pW75jQgedq/D8NHvY4zYYw8MXhGqyKJ9Khy
 p2nItSA9DMuzcgAuQJz9zLhkhgwzkgTBdpuVChvTGRj8RvJ5Zo6a9VmAvP2sMoFqPZ3+
 WqImRY+kHlcaZqaOR124n6/ysecpvaBTKDwPVsAl4vhUyRZiVv15kgDWTRCJKzKBf0mw
 D27Fi4DwxHm0aSA6Ie3OEBjtdCGv//fepwmksdDCgPasnxf+gsN5wSuuGrigm2053En7
 t/vQ==
X-Gm-Message-State: AIkVDXKs0ZP/nm6pLLTALSp/7fmBrdX0FQNuc+EfA+CBUExyysshKNPpy1gm/DwezqKekQ==
X-Received: by 10.107.154.14 with SMTP id c14mr44154554ioe.0.1483389385274;
 Mon, 02 Jan 2017 12:36:25 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id 96sm18751892ioh.27.2017.01.02.12.36.24
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 02 Jan 2017 12:36:24 -0800 (PST)
From: npostavs@HIDDEN
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#24542: 25.1.50; The symbol `@' and sexp scanning
References: <8760pj27wm.fsf@HIDDEN> <87o9zptn3r.fsf@HIDDEN>
Date: Mon, 02 Jan 2017 15:37:28 -0500
In-Reply-To: <87o9zptn3r.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 02
 Jan 2017 17:58:48 +0100")
Message-ID: <87zij95hbr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: 24542
Cc: 24542 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
>> insert
>>
>>     (eq element '@)
>>
>> in an elisp mode buffer (e.g. scratch).  Put point at the quote or the
>> "@".  Eval
>>
>>     (goto-char (scan-sexps (point) 1))
>>
>> and you get an error like:
>>
>>
>> Debugger entered--Lisp error: (scan-error "Containing expression ends
>> prematurely" 15 16)
>
> It seems that you can replace the symbol `@' in this recipe with any
> symbol whose name has the form "@+", i.e. `@@' or `@@@' or...  When the
> symbol contains only one character different from "@", it doesn't seem
> to happen.

`@' has the prefix syntax flag, the elisp manual says `(elisp) Syntax Flags':

   * `p' identifies an additional prefix character for Lisp syntax.
     These characters are treated as whitespace when they appear between
                          ^^^^^^^^^^^^^^^^^^^^^
     expressions.  When they appear within an expression, they are
     handled according to their usual syntax classes.

So (eq element '@) acts the same as (eq element ' ).  This could be
changed with something the following patch, but I'm not sure if it's the
right thing for non-Lisp languages...

diff --git i/src/syntax.c w/src/syntax.c
index 0ee1c74..253d3fb 100644
--- i/src/syntax.c
+++ w/src/syntax.c
@@ -2681,7 +2681,16 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
 	    }
 
 	  if (prefix)
-	    continue;
+            {
+              int next_c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
+              int next_syntax = SYNTAX_WITH_FLAGS (next_c);
+              bool next_prefix = SYNTAX_FLAGS_PREFIX (next_syntax);
+              enum syntaxcode next_code = syntax_multibyte (next_c, multibyte_symbol_p);
+              if (next_prefix
+                  || next_code == Ssymbol
+                  || next_code == Sword)
+                continue;
+            }
 
 	  switch (code)
 	    {





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24542; Package emacs. Full text available.

Message received at 24542 <at> debbugs.gnu.org:


Received: (at 24542) by debbugs.gnu.org; 2 Jan 2017 16:59:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 02 11:59:01 2017
Received: from localhost ([127.0.0.1]:39584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cO5wr-0001kI-0e
	for submit <at> debbugs.gnu.org; Mon, 02 Jan 2017 11:59:01 -0500
Received: from mout.web.de ([212.227.17.12]:61620)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1cO5wo-0001k4-P6
 for 24542 <at> debbugs.gnu.org; Mon, 02 Jan 2017 11:58:59 -0500
Received: from drachen.dragon ([109.43.0.41]) by smtp.web.de (mrweb102
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MDg9K-1cI6D72aRq-00H4jR for
 <24542 <at> debbugs.gnu.org>; Mon, 02 Jan 2017 17:58:52 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: 24542 <at> debbugs.gnu.org
Subject: Re: bug#24542: 25.1.50; The symbol `@' and sexp scanning
References: <8760pj27wm.fsf@HIDDEN>
Date: Mon, 02 Jan 2017 17:58:48 +0100
In-Reply-To: <8760pj27wm.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 25
 Sep 2016 19:42:17 +0200")
Message-ID: <87o9zptn3r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K0:j3DKR4AzWMy0z0GBUNljATnZE3FAZr3N2faXbpFwYu1KcNHSWWi
 O1NVaSdjjp14wMHCnRFU7vMs+VWbzWLe7hl81/zvbbCALoCFO1dD0TGecReSvWSQjcOwPR1
 7ApvPGWGPPscJXWE9lzVArCJYMphtQdSlbuEKsoALSkdckYZ/1J4G4ok1cWEigVESfymqW/
 DHlt78v0r6QvMkRFhXriQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:IXgaBlCf14c=:NpeL6oNWE3RzbxOPCFVIGZ
 oSMn9Gm6aGFs8v49KVS5SNYw2Ev3lY3T2Yf8gWb/zqMhuAUisigo0/USIxYG0T3qtn+uswPrb
 IUj9MkQ+JNNvJFPH5n04f/sfomF2Z+dQbEXZ8Fh9n+6KV2+/6tY9Pfd3gx7bPBE/zMsAML85p
 1SKBYFt6JCnZX0O+U8PbdyDdpafeKs07S/JhECjf9qrapQ7HxDkSoKrnesI4OeJcsf1yDYVC/
 ouhsaCmHCwMfNwvV6cu8mzdbVYGE7bqO9AgSRDxQUwLaf1YI32Vl4da7ITrMA59eMMx3ecaCJ
 OffuYC8Qmr2Uoz1dJRJn84KZleiJNvL6F8EDPwks3v/8UvEVdn04pSZ/9uQS0ur1xFAZfDr3h
 7I4tovUrvqDlNW2mpziMo7m+zusLVo9vqwzBmR2OJgyrEsBQuw0BjEBUgTRGk+sZdfAtsVvzh
 bJ2/d+VrxpdGS4m0XQnGj/B5yfN3eiqqNgLO/FIeS7bn8yi/BLqYJGxcsCzHJdhvXZpp0MeT5
 xopUrudj4sue6LzfewObB7HFbsrm+HHPDhwc8i10S6mpfqSgtSPghbxn3FETJfPdEqjK+jPOa
 O2RdOaEW2kbQC5QvZaKZfWnNd+an6ngR9TCv2hy5d5rif4iYkDMJUfHs+UVg5Ab1tcPGW+rvN
 jTXDTSA3jqE6+4ZY8eATU8CVL1XCWFl9nILF9fBvmsIUc4HuuybXy5zcq1K8xD0i0YSi484ej
 M81YyGZvAEDufs7oMeaYQ9GnDU8u8e1CDnXTk9Gu10V0Hwu7S7b5+bvFdbkZTA0mheF+VmcDM
 IWYA2/zGBKP4K5TQhZGb3zqujqwWA==
X-Spam-Score: -3.9 (---)
X-Debbugs-Envelope-To: 24542
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> insert
>
>     (eq element '@)
>
> in an elisp mode buffer (e.g. scratch).  Put point at the quote or the
> "@".  Eval
>
>     (goto-char (scan-sexps (point) 1))
>
> and you get an error like:
>
>
> Debugger entered--Lisp error: (scan-error "Containing expression ends
> prematurely" 15 16)

It seems that you can replace the symbol `@' in this recipe with any
symbol whose name has the form "@+", i.e. `@@' or `@@@' or...  When the
symbol contains only one character different from "@", it doesn't seem
to happen.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24542; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Sep 2016 17:42:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 25 13:42:37 2016
Received: from localhost ([127.0.0.1]:35763 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1boDRk-00075h-Uj
	for submit <at> debbugs.gnu.org; Sun, 25 Sep 2016 13:42:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43172)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1boDRi-00075V-MI
 for submit <at> debbugs.gnu.org; Sun, 25 Sep 2016 13:42:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1boDRc-00038L-Ey
 for submit <at> debbugs.gnu.org; Sun, 25 Sep 2016 13:42:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57089)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1boDRc-000386-C2
 for submit <at> debbugs.gnu.org; Sun, 25 Sep 2016 13:42:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34133)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1boDRa-0006K9-4P
 for bug-gnu-emacs@HIDDEN; Sun, 25 Sep 2016 13:42:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1boDRV-00034U-V3
 for bug-gnu-emacs@HIDDEN; Sun, 25 Sep 2016 13:42:25 -0400
Received: from mout.web.de ([212.227.15.4]:65311)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1boDRV-00034P-KQ
 for bug-gnu-emacs@HIDDEN; Sun, 25 Sep 2016 13:42:21 -0400
Received: from drachen.dragon ([90.186.2.21]) by smtp.web.de (mrweb004) with
 ESMTPSA (Nemesis) id 0LqXBp-1bJqhR0A9x-00e74t; Sun, 25 Sep 2016 19:42:20
 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.1.50; The symbol `@' and sexp scanning
Date: Sun, 25 Sep 2016 19:42:17 +0200
Message-ID: <8760pj27wm.fsf@HID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uG/PgW/TC7BIULqSYsxxNg9K/VXniFoAgKSXBCqxBnz64NyKQl2B78L
 thi9kDov1XEvLD6PhQss+y0tSHY/xdar4ZnvEM7rSv8Z3Dpq31Yly27C7wREKCfojhBAa0Ncu
 R+A/ICNlIehH5r+AWJQFcSsh7DUUA==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)


Hi,

the following breaks my "el-search" package when searching in
"skeleton.el".  It assumes that calling `scan-sexps' works at the start
of any sexp.

Recipe: in emacs -Q,

insert

    (eq element '@)

in an elisp mode buffer (e.g. scratch).  Put point at the quote or the
"@".  Eval

    (goto-char (scan-sexps (point) 1))

and you get an error like:


Debugger entered--Lisp error: (scan-error "Containing expression ends prematurely" 15 16)
  scan-sexps(13 1)
  (goto-char (scan-sexps (point) 1))
  eval((goto-char (scan-sexps (point) 1)) nil)
  eval-expression((goto-char (scan-sexps (point) 1)) nil)
  funcall-interactively(eval-expression (goto-char (scan-sexps (point) 1)) nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)


I think `scan-sexps' should not error.  FWIW, if I add one more sexp to
the list after "'@" (different from "'@"), there is no error.


TIA,

Michael.




In GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
 of 2016-09-23 built on drachen
Repository revision: 14c36d76df035faa127580d706a0564f4e496991
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp





Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#24542; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.