From: Tetsurou Okazaki <okazaki@be.to>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tetsurou Okazaki <okazaki@be.to>, 6490@debbugs.gnu.org
Subject: bug#6490: 24.0.50; src/lread.c: old style backquote bug?
Date: Thu, 01 Jul 2010 14:41:49 +0900 [thread overview]
Message-ID: <8639w3vjvm.wl%%cc9230e4f6b11649d75e8c3813911dbe1dd37419@be.to> (raw)
In-Reply-To: <jwv8w66btf6.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]
At Wed, 23 Jun 2010 00:23:15 +0200,
Stefan Monnier wrote:
>
> > Attached patch for Emacs fixes this error.
>
> I'm glad the patch fixes things for you, since this patch indeed looks
> perfectly harmless, but I'm a bit puzzled because it doesn't just look
> harmless: it looks to me like the patch does change anything to the way
> the code works. So could you explain to me how&why the patch fixes
> the problem? I'm probably just overlooking some "obvious" detail,
The changes committed in rev:100605 reassigns the next character to the variable `c'.
When the next character is SPC (32, #o40, #x20), old style backquote is detected.
if (first_in_list && (c = READCHAR, UNREAD (c), c == ' '))
{
Vold_style_backquotes = Qt;
goto default_label;
}
But backquote handling is skipped because `c' is SPC.
default_label:
if (c <= 040) goto retry;
... old style backquote handling ...
My patch avoids reassignment of `c' not to skip old style backquote handling.
To keep more compatibility with released Emacs, it is preferable to
allow a character such as \r or \n after the old style backquote.
[-- Attachment #2: src-lread-old-backquote2.diff --]
[-- Type: text/plain, Size: 1078 bytes --]
=== modified file 'src/lread.c'
--- src/lread.c 2010-06-16 14:10:02 +0000
+++ src/lread.c 2010-06-27 11:48:20 +0000
@@ -2693,21 +2693,26 @@
old-style. For Emacs-25, we should completely remove this
first_in_list exception (old-style can still be obtained via
"(\`" anyway). */
- if (first_in_list && (c = READCHAR, UNREAD (c), c == ' '))
- {
- Vold_style_backquotes = Qt;
- goto default_label;
- }
- else
- {
- Lisp_Object value;
-
- new_backquote_flag++;
- value = read0 (readcharfun);
- new_backquote_flag--;
-
- return Fcons (Qbackquote, Fcons (value, Qnil));
- }
+ {
+ int ch = READCHAR;
+ UNREAD (ch);
+
+ if (first_in_list && (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' || ch == '\f'))
+ {
+ Vold_style_backquotes = Qt;
+ goto default_label;
+ }
+ else
+ {
+ Lisp_Object value;
+
+ new_backquote_flag++;
+ value = read0 (readcharfun);
+ new_backquote_flag--;
+
+ return Fcons (Qbackquote, Fcons (value, Qnil));
+ }
+ }
case ',':
if (new_backquote_flag)
next prev parent reply other threads:[~2010-07-01 5:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 9:16 bug#6490: 24.0.50; src/lread.c: old style backquote bug? Tetsurou Okazaki
2010-06-22 22:23 ` Stefan Monnier
2010-07-01 4:14 ` Makoto Fujiwara
2010-07-01 5:41 ` Tetsurou Okazaki [this message]
2010-07-04 21:50 ` Stefan Monnier
2010-07-04 23:58 ` Makoto Fujiwara
2011-09-21 20:54 ` Lars Magne Ingebrigtsen
2011-09-22 1:43 ` Stefan Monnier
2010-07-05 1:51 ` Makoto Fujiwara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8639w3vjvm.wl%%cc9230e4f6b11649d75e8c3813911dbe1dd37419@be.to \
--to=okazaki@be.to \
--cc=6490@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.