diff options
| author | Chong Yidong | 2009-04-29 03:02:54 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-04-29 03:02:54 +0000 |
| commit | 91f68422d65d4fe746e4cd89cd274636a097c4ff (patch) | |
| tree | 1b8e00eeef766bcfa1827f55bd936addd6c1fb58 /src | |
| parent | ee87c5499807d57d19f95939e79cde34e22bc90d (diff) | |
| download | emacs-91f68422d65d4fe746e4cd89cd274636a097c4ff.tar.gz emacs-91f68422d65d4fe746e4cd89cd274636a097c4ff.zip | |
* files.el (hack-local-variables-prop-line)
(hack-local-variables, dir-locals-read-from-file): Bind
read-circle to nil before reading.
* lread.c (Vread_circle): New variable.
(read1): Disable recursive read if Vread_circle is nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lread.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d47f354ba6a..760795f1870 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-04-29 Ulrich Mueller <ulm@gentoo.org> | ||
| 2 | |||
| 3 | * lread.c (Vread_circle): New variable. | ||
| 4 | (read1): Disable recursive read if Vread_circle is nil. | ||
| 5 | |||
| 1 | 2009-04-29 Kenichi Handa <handa@m17n.org> | 6 | 2009-04-29 Kenichi Handa <handa@m17n.org> |
| 2 | 7 | ||
| 3 | * fontset.h (set_default_ascii_font): Delete extern. | 8 | * fontset.h (set_default_ascii_font): Delete extern. |
diff --git a/src/lread.c b/src/lread.c index 8a4b96874ce..cb3f5b04633 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -125,6 +125,9 @@ Lisp_Object Vload_file_name; | |||
| 125 | /* Function to use for reading, in `load' and friends. */ | 125 | /* Function to use for reading, in `load' and friends. */ |
| 126 | Lisp_Object Vload_read_function; | 126 | Lisp_Object Vload_read_function; |
| 127 | 127 | ||
| 128 | /* Non-nil means read recursive structures using #n= and #n# syntax. */ | ||
| 129 | Lisp_Object Vread_circle; | ||
| 130 | |||
| 128 | /* The association list of objects read with the #n=object form. | 131 | /* The association list of objects read with the #n=object form. |
| 129 | Each member of the list has the form (n . object), and is used to | 132 | Each member of the list has the form (n . object), and is used to |
| 130 | look up the object for the corresponding #n# construct. | 133 | look up the object for the corresponding #n# construct. |
| @@ -2558,7 +2561,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2558 | c = READCHAR; | 2561 | c = READCHAR; |
| 2559 | } | 2562 | } |
| 2560 | /* #n=object returns object, but associates it with n for #n#. */ | 2563 | /* #n=object returns object, but associates it with n for #n#. */ |
| 2561 | if (c == '=') | 2564 | if (c == '=' && !NILP (Vread_circle)) |
| 2562 | { | 2565 | { |
| 2563 | /* Make a placeholder for #n# to use temporarily */ | 2566 | /* Make a placeholder for #n# to use temporarily */ |
| 2564 | Lisp_Object placeholder; | 2567 | Lisp_Object placeholder; |
| @@ -2580,7 +2583,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2580 | return tem; | 2583 | return tem; |
| 2581 | } | 2584 | } |
| 2582 | /* #n# returns a previously read object. */ | 2585 | /* #n# returns a previously read object. */ |
| 2583 | if (c == '#') | 2586 | if (c == '#' && !NILP (Vread_circle)) |
| 2584 | { | 2587 | { |
| 2585 | tem = Fassq (make_number (n), read_objects); | 2588 | tem = Fassq (make_number (n), read_objects); |
| 2586 | if (CONSP (tem)) | 2589 | if (CONSP (tem)) |
| @@ -4215,6 +4218,10 @@ read multiple times. The list is in the same order as the symbols | |||
| 4215 | were read in. */); | 4218 | were read in. */); |
| 4216 | Vread_symbol_positions_list = Qnil; | 4219 | Vread_symbol_positions_list = Qnil; |
| 4217 | 4220 | ||
| 4221 | DEFVAR_LISP ("read-circle", &Vread_circle, | ||
| 4222 | doc: /* Non-nil means read recursive structures using #N= and #N# syntax. */); | ||
| 4223 | Vread_circle = Qt; | ||
| 4224 | |||
| 4218 | DEFVAR_LISP ("load-path", &Vload_path, | 4225 | DEFVAR_LISP ("load-path", &Vload_path, |
| 4219 | doc: /* *List of directories to search for files to load. | 4226 | doc: /* *List of directories to search for files to load. |
| 4220 | Each element is a string (directory name) or nil (try default directory). | 4227 | Each element is a string (directory name) or nil (try default directory). |