diff options
| author | Tetsurou Okazaki | 2010-07-04 23:49:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-07-04 23:49:48 +0200 |
| commit | 9a39b306d91622792c0483f1f788f96a39f8bdb5 (patch) | |
| tree | 684f10092dfa76a986848695e318d775d10e20ee /src | |
| parent | e6cb2cbb4a9c67ecdeb9ba7f7bdc255cfc878eef (diff) | |
| download | emacs-9a39b306d91622792c0483f1f788f96a39f8bdb5.tar.gz emacs-9a39b306d91622792c0483f1f788f96a39f8bdb5.zip | |
* src/lread.c (read1): Fix up last change to not mess up `c'.
Fixes: debbugs:6490
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lread.c | 51 |
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 @@ | |||
| 1 | 2010-07-04 Tetsurou Okazaki <okazaki@be.to> (tiny change) | ||
| 2 | Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 3 | |||
| 4 | * lread.c (read1): Fix up last change to not mess up `c'. | ||
| 5 | |||
| 1 | 2010-07-04 Juanma Barranquero <lekktu@gmail.com> | 6 | 2010-07-04 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * strftime.c: Revert conversion to standard C (2010-07-04T07:50:25Z!dann@ics.uci.edu). | 8 | * 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) | |||
| 2645 | } | 2645 | } |
| 2646 | 2646 | ||
| 2647 | case '`': | 2647 | case '`': |
| 2648 | /* Transition from old-style to new-style: | 2648 | { |
| 2649 | If we see "(`" it used to mean old-style, which usually works | 2649 | int next_char = READCHAR; |
| 2650 | fine because ` should almost never appear in such a position | 2650 | UNREAD (next_char); |
| 2651 | for new-style. But occasionally we need "(`" to mean new | 2651 | /* Transition from old-style to new-style: |
| 2652 | style, so we try to distinguish the two by the fact that we | 2652 | If we see "(`" it used to mean old-style, which usually works |
| 2653 | can either write "( `foo" or "(` foo", where the first | 2653 | fine because ` should almost never appear in such a position |
| 2654 | intends to use new-style whereas the second intends to use | 2654 | for new-style. But occasionally we need "(`" to mean new |
| 2655 | old-style. For Emacs-25, we should completely remove this | 2655 | style, so we try to distinguish the two by the fact that we |
| 2656 | first_in_list exception (old-style can still be obtained via | 2656 | can either write "( `foo" or "(` foo", where the first |
| 2657 | "(\`" anyway). */ | 2657 | intends to use new-style whereas the second intends to use |
| 2658 | if (first_in_list && (c = READCHAR, UNREAD (c), c == ' ')) | 2658 | old-style. For Emacs-25, we should completely remove this |
| 2659 | { | 2659 | first_in_list exception (old-style can still be obtained via |
| 2660 | Vold_style_backquotes = Qt; | 2660 | "(\`" anyway). */ |
| 2661 | goto default_label; | 2661 | if (first_in_list && next_char == ' ') |
| 2662 | } | 2662 | { |
| 2663 | else | 2663 | Vold_style_backquotes = Qt; |
| 2664 | { | 2664 | goto default_label; |
| 2665 | Lisp_Object value; | 2665 | } |
| 2666 | 2666 | else | |
| 2667 | new_backquote_flag++; | 2667 | { |
| 2668 | value = read0 (readcharfun); | 2668 | Lisp_Object value; |
| 2669 | new_backquote_flag--; | ||
| 2670 | 2669 | ||
| 2671 | return Fcons (Qbackquote, Fcons (value, Qnil)); | 2670 | new_backquote_flag++; |
| 2672 | } | 2671 | value = read0 (readcharfun); |
| 2672 | new_backquote_flag--; | ||
| 2673 | 2673 | ||
| 2674 | return Fcons (Qbackquote, Fcons (value, Qnil)); | ||
| 2675 | } | ||
| 2676 | } | ||
| 2674 | case ',': | 2677 | case ',': |
| 2675 | if (new_backquote_flag) | 2678 | if (new_backquote_flag) |
| 2676 | { | 2679 | { |