From: Gerd Möllmann Date: Tue, 18 Oct 2022 10:33:35 +0000 (+0200) Subject: DEFVAR some variables X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c98a69d6502310e500bb1ad22ab2dcd58389649f;p=emacs.git DEFVAR some variables * src/lisp.h: Remove extern declarations for some vars. * src/pkg.c (syms_of_pkg): DEFVAR_LISP_NOPRO some variables. *package*, *package-registry*, *emacs-package*, *keyword-package*, package-prefixes --- diff --git a/src/lisp.h b/src/lisp.h index 19c266c64ed..83a4e487176 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2287,12 +2287,6 @@ extern void pkg_break (void); extern void pkg_define_builtin_symbols (void); extern void pkg_map_symbols_c_fn (void (*fn) (Lisp_Object, Lisp_Object), Lisp_Object arg); -extern Lisp_Object Vpackage_registry; -extern Lisp_Object Vemacs_package, Vkeyword_package; -extern Lisp_Object Vearmuffs_package; -extern Lisp_Object Vpackage_prefixes; - - /* Return whether a value might be a valid docstring. Used to distinguish the presence of non-docstring in the docstring slot, diff --git a/src/pkg.c b/src/pkg.c index 04b56073069..59a362f5617 100644 --- a/src/pkg.c +++ b/src/pkg.c @@ -30,23 +30,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" -/* The package registry, a hash-table of package names to package - objects. */ - -Lisp_Object Vpackage_registry; - -/* The two standard packages. */ - -Lisp_Object Vemacs_package, Vkeyword_package; - -/* The current package. */ - -Lisp_Object Vearmuffs_package; - -/* If nil, */ - -Lisp_Object Vpackage_prefixes; - /*********************************************************************** Useless tools ***********************************************************************/ @@ -1249,14 +1232,12 @@ init_pkg_once (void) DEFAULT_REHASH_THRESHOLD, Qnil, false); - Vemacs_package = make_package (build_string ("emacs"), - make_fixnum (20000)); staticpro (&Vemacs_package); - Vkeyword_package = make_package (build_string ("keyword"), - make_fixnum (2000)); + Vemacs_package = make_package (build_string ("emacs"), make_fixnum (20000)); register_package (Vemacs_package); staticpro (&Vkeyword_package); + Vkeyword_package = make_package (build_string ("keyword"), make_fixnum (2000)); XPACKAGE (Vkeyword_package)->nicknames = Fcons (build_string (""), Qnil); register_package (Vkeyword_package); @@ -1276,6 +1257,20 @@ init_pkg_once (void) void syms_of_pkg (void) { + DEFVAR_LISP_NOPRO ("*package-registry*", Vpackage_registry, + doc: /* The package registry. For internal use only. */); + DEFVAR_LISP_NOPRO ("*emacs-package*", Vemacs_package, + doc: /* The Emacs package. For internal use only. */); + DEFVAR_LISP_NOPRO ("*keyword-package*", Vkeyword_package, + doc: /* The keyword package. For internal use only. */); + DEFVAR_LISP_NOPRO ("*package*", Vearmuffs_package, + doc: /* The current package. */); + + DEFVAR_LISP_NOPRO ("package-prefixes", Vpackage_prefixes, + doc: /* */); + Fmake_variable_buffer_local (Qpackage_prefixes); + + Vmacroexp__dynvars = Qnil; defsubr (&Scl_intern); defsubr (&Scl_unintern); defsubr (&Sdelete_package);