summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTetsurou Okazaki <okazaki@be.to>2010-07-04 23:49:48 +0200
committerStefan Monnier <monnier@iro.umontreal.ca>2010-07-04 23:49:48 +0200
commit9a39b306d91622792c0483f1f788f96a39f8bdb5 (patch)
tree684f10092dfa76a986848695e318d775d10e20ee /src
parente6cb2cbb4a9c67ecdeb9ba7f7bdc255cfc878eef (diff)
downloademacs-9a39b306d91622792c0483f1f788f96a39f8bdb5.tar.gz
* src/lread.c (read1): Fix up last change to not mess up `c'.
Fixes: debbugs:6490
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/lread.c51
2 files changed, 32 insertions, 24 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6364deb2db1..7c7ee7aeaa0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-04 Tetsurou Okazaki <okazaki@be.to> (tiny change)
+ Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lread.c (read1): Fix up last change to not mess up `c'.
+
2010-07-04 Juanma Barranquero <lekktu@gmail.com>
* strftime.c: Revert conversion to standard C (2010-07-04T07:50:25Z!dann@ics.uci.edu).
diff --git a/src/lread.c b/src/lread.c
index 6962485eabd..8f9667f172d 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2645,32 +2645,35 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
}
case '`':
- /* Transition from old-style to new-style:
- If we see "(`" it used to mean old-style, which usually works
- fine because ` should almost never appear in such a position
- for new-style. But occasionally we need "(`" to mean new
- style, so we try to distinguish the two by the fact that we
- can either write "( `foo" or "(` foo", where the first
- intends to use new-style whereas the second intends to use
- 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--;
+ {
+ int next_char = READCHAR;
+ UNREAD (next_char);
+ /* Transition from old-style to new-style:
+ If we see "(`" it used to mean old-style, which usually works
+ fine because ` should almost never appear in such a position
+ for new-style. But occasionally we need "(`" to mean new
+ style, so we try to distinguish the two by the fact that we
+ can either write "( `foo" or "(` foo", where the first
+ intends to use new-style whereas the second intends to use
+ 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 && next_char == ' ')
+ {
+ Vold_style_backquotes = Qt;
+ goto default_label;
+ }
+ else
+ {
+ Lisp_Object value;
- return Fcons (Qbackquote, Fcons (value, Qnil));
- }
+ new_backquote_flag++;
+ value = read0 (readcharfun);
+ new_backquote_flag--;
+ return Fcons (Qbackquote, Fcons (value, Qnil));
+ }
+ }
case ',':
if (new_backquote_flag)
{