From c025885c33f59f6a42ba899b5bf52ba5a1551769 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Tue, 18 Oct 2022 07:58:45 +0200 Subject: [PATCH] symbol-name returning ':' for keywords * src/data.c (Fsymbol_name): Return a name starting with ':' for keywords. --- src/data.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/data.c b/src/data.c index 34bdb9f4b43..a4e07c8d001 100644 --- a/src/data.c +++ b/src/data.c @@ -767,11 +767,10 @@ DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, doc: /* Return SYMBOL's name, a string. */) (register Lisp_Object symbol) { - register Lisp_Object name; - CHECK_SYMBOL (symbol); - name = SYMBOL_NAME (symbol); - return name; + if (EQ (SYMBOL_PACKAGE (symbol), Vkeyword_package)) + return concat2 (build_string (":"), SYMBOL_NAME (symbol)); + return SYMBOL_NAME (symbol); } DEFUN ("symbol-package", Fsymbol_package, Ssymbol_package, 1, 1, 0, -- 2.39.2