[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/command 4e35e21: Make the new bytecode format distinguishable fr
From: |
Lars Ingebrigtsen |
Subject: |
scratch/command 4e35e21: Make the new bytecode format distinguishable from the old |
Date: |
Thu, 11 Feb 2021 10:51:00 -0500 (EST) |
branch: scratch/command
commit 4e35e212fc546727742eb66f5c7bd457c75c005c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make the new bytecode format distinguishable from the old
This allows newer Emacsen to load older bytecode files
---
lisp/emacs-lisp/bytecomp.el | 4 ++--
src/data.c | 15 ++++++++++++---
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index e59a1f5..ecdf1df 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3016,8 +3016,8 @@ for symbols generated by the byte compiler itself."
(list doc)))
;; optionally, the interactive spec (and the modes the
;; command applies to).
- (if int
- (list (cons (nth 1 int) command-modes))))))))
+ (and int
+ (list (vector (nth 1 int) command-modes))))))))
(defvar byte-compile-reserved-constants 0)
diff --git a/src/data.c b/src/data.c
index eac2488..ad5ee66 100644
--- a/src/data.c
+++ b/src/data.c
@@ -904,7 +904,13 @@ Value, if non-nil, is a list (interactive SPEC). */)
else if (COMPILEDP (fun))
{
if (PVSIZE (fun) > COMPILED_INTERACTIVE)
- return list2 (Qinteractive, Fcar (AREF (fun, COMPILED_INTERACTIVE)));
+ {
+ Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE);
+ if (VECTORP (form))
+ return list2 (Qinteractive, AREF (form, 0));
+ else
+ return list2 (Qinteractive, form);
+ }
}
#ifdef HAVE_MODULES
else if (MODULE_FUNCTIONP (fun))
@@ -958,8 +964,11 @@ The value, if non-nil, is a list of mode name symbols. */)
}
else if (COMPILEDP (fun))
{
- if (PVSIZE (fun) > COMPILED_INTERACTIVE)
- return Fcdr (AREF (fun, COMPILED_INTERACTIVE));
+ Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE);
+ if (VECTORP (form))
+ return AREF (form, 1);
+ else
+ return Qnil;
}
#ifdef HAVE_MODULES
else if (MODULE_FUNCTIONP (fun))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/command 4e35e21: Make the new bytecode format distinguishable from the old,
Lars Ingebrigtsen <=