From: Gerd Möllmann Date: Tue, 18 Oct 2022 05:58:45 +0000 (+0200) Subject: symbol-name returning ':' for keywords X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c025885c33f59f6a42ba899b5bf52ba5a1551769;p=emacs.git symbol-name returning ':' for keywords * src/data.c (Fsymbol_name): Return a name starting with ':' for keywords. --- 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,