From f54440761b09b9415ac93e81148646d0b25023c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Sat, 22 Oct 2022 15:20:46 +0200 Subject: [PATCH] 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. --- src/pkg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.2