From: Gerd Möllmann Date: Sat, 22 Oct 2022 13:20:46 +0000 (+0200) Subject: Improve Lisp interface on the C side of packages X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f54440761b09b9415ac93e81148646d0b25023c6;p=emacs.git Improve Lisp interface on the C side of packages * src/pkg.c (Fpackage_percent_set_name): Allow nil as name. (Fpackage_percent_register): Return the package. --- diff --git a/src/pkg.c b/src/pkg.c index 0222658c5a1..97bf0ea7f37 100644 --- a/src/pkg.c +++ b/src/pkg.c @@ -803,7 +803,8 @@ DEFUN ("package-%set-name", Fpackage_percent_set_name, Spackage_percent_set_name (Lisp_Object package, Lisp_Object name) { CHECK_PACKAGE (package); - CHECK_STRING (name); + if (!NILP (name)) + CHECK_STRING (name); return XPACKAGE (package)->name = name; } @@ -875,7 +876,7 @@ DEFUN ("package-%register", Fpackage_percent_register, (Lisp_Object package) { pkg_register_package (package); - return Qnil; + return package; }