diff options
| author | Paul Eggert | 2020-05-23 10:38:53 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-05-23 10:39:45 -0700 |
| commit | 9e977c497257ff13bfb2579f8a14ca9b43791115 (patch) | |
| tree | 4c80b4cf0d82c6f86a34961d0a60434d71a4ac05 /src | |
| parent | d436e4840a2a99e9717497a7d7dc7a36dbd0ecc9 (diff) | |
| download | emacs-9e977c497257ff13bfb2579f8a14ca9b43791115.tar.gz emacs-9e977c497257ff13bfb2579f8a14ca9b43791115.zip | |
Restore check for Emacs 20.2 bytecodes
* src/eval.c (Ffetch_bytecode): Check for multibyte bytecodes
here too. Problem reported by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg02876.html
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index be2af2d041b..959adea6467 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3202,7 +3202,19 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, | |||
| 3202 | else | 3202 | else |
| 3203 | error ("Invalid byte code"); | 3203 | error ("Invalid byte code"); |
| 3204 | } | 3204 | } |
| 3205 | ASET (object, COMPILED_BYTECODE, XCAR (tem)); | 3205 | |
| 3206 | Lisp_Object bytecode = XCAR (tem); | ||
| 3207 | if (STRING_MULTIBYTE (bytecode)) | ||
| 3208 | { | ||
| 3209 | /* BYTECODE must have been produced by Emacs 20.2 or earlier | ||
| 3210 | because it produced a raw 8-bit string for byte-code and now | ||
| 3211 | such a byte-code string is loaded as multibyte with raw 8-bit | ||
| 3212 | characters converted to multibyte form. Convert them back to | ||
| 3213 | the original unibyte form. */ | ||
| 3214 | bytecode = Fstring_as_unibyte (bytecode); | ||
| 3215 | } | ||
| 3216 | |||
| 3217 | ASET (object, COMPILED_BYTECODE, bytecode); | ||
| 3206 | ASET (object, COMPILED_CONSTANTS, XCDR (tem)); | 3218 | ASET (object, COMPILED_CONSTANTS, XCDR (tem)); |
| 3207 | } | 3219 | } |
| 3208 | } | 3220 | } |