diff options
| author | Po Lu | 2023-05-27 09:49:49 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-27 09:49:49 +0800 |
| commit | cdca0fddcc3352bcd01bec147c264be1b2a04e12 (patch) | |
| tree | 3b15e37936fecc34314883a41a355873c2b9133c /src/lread.c | |
| parent | 0eb1f4e57125117006f109a5549082008fc9fbb1 (diff) | |
| parent | e77e986a9b7d735c0e39198c8b80a34a29005fc5 (diff) | |
| download | emacs-cdca0fddcc3352bcd01bec147c264be1b2a04e12.tar.gz emacs-cdca0fddcc3352bcd01bec147c264be1b2a04e12.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lread.c b/src/lread.c index 3ac5d43a839..43fa23003ca 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -3646,8 +3646,9 @@ read_bool_vector (Lisp_Object readcharfun) | |||
| 3646 | } | 3646 | } |
| 3647 | 3647 | ||
| 3648 | /* Skip (and optionally remember) a lazily-loaded string | 3648 | /* Skip (and optionally remember) a lazily-loaded string |
| 3649 | preceded by "#@". */ | 3649 | preceded by "#@". Return true if this was a normal skip, |
| 3650 | static void | 3650 | false if we read #@00 (which skips to EOB). */ |
| 3651 | static bool | ||
| 3651 | skip_lazy_string (Lisp_Object readcharfun) | 3652 | skip_lazy_string (Lisp_Object readcharfun) |
| 3652 | { | 3653 | { |
| 3653 | ptrdiff_t nskip = 0; | 3654 | ptrdiff_t nskip = 0; |
| @@ -3673,9 +3674,9 @@ skip_lazy_string (Lisp_Object readcharfun) | |||
| 3673 | digits++; | 3674 | digits++; |
| 3674 | if (digits == 2 && nskip == 0) | 3675 | if (digits == 2 && nskip == 0) |
| 3675 | { | 3676 | { |
| 3676 | /* #@00 means "skip to end" */ | 3677 | /* #@00 means "read nil and skip to end" */ |
| 3677 | skip_dyn_eof (readcharfun); | 3678 | skip_dyn_eof (readcharfun); |
| 3678 | return; | 3679 | return false; |
| 3679 | } | 3680 | } |
| 3680 | } | 3681 | } |
| 3681 | 3682 | ||
| @@ -3722,6 +3723,8 @@ skip_lazy_string (Lisp_Object readcharfun) | |||
| 3722 | else | 3723 | else |
| 3723 | /* Skip that many bytes. */ | 3724 | /* Skip that many bytes. */ |
| 3724 | skip_dyn_bytes (readcharfun, nskip); | 3725 | skip_dyn_bytes (readcharfun, nskip); |
| 3726 | |||
| 3727 | return true; | ||
| 3725 | } | 3728 | } |
| 3726 | 3729 | ||
| 3727 | /* Given a lazy-loaded string designator VAL, return the actual string. | 3730 | /* Given a lazy-loaded string designator VAL, return the actual string. |
| @@ -4179,8 +4182,10 @@ read0 (Lisp_Object readcharfun, bool locate_syms) | |||
| 4179 | /* #@NUMBER is used to skip NUMBER following bytes. | 4182 | /* #@NUMBER is used to skip NUMBER following bytes. |
| 4180 | That's used in .elc files to skip over doc strings | 4183 | That's used in .elc files to skip over doc strings |
| 4181 | and function definitions that can be loaded lazily. */ | 4184 | and function definitions that can be loaded lazily. */ |
| 4182 | skip_lazy_string (readcharfun); | 4185 | if (skip_lazy_string (readcharfun)) |
| 4183 | goto read_obj; | 4186 | goto read_obj; |
| 4187 | obj = Qnil; /* #@00 skips to EOB and yields nil. */ | ||
| 4188 | break; | ||
| 4184 | 4189 | ||
| 4185 | case '$': | 4190 | case '$': |
| 4186 | /* #$ -- reference to lazy-loaded string */ | 4191 | /* #$ -- reference to lazy-loaded string */ |