Subject: bug#41905: Small change: In Customize, display name with with spaces, but keep symbol name underneath.

From: Mauro Aranda <[email-masked]>
Date: Sat, 5 Sep 2020 09:00:45 -0300

Juri Linkov <[email-masked]> writes:

>>> This patch changes custom-unlispify-menu-entry to display symbols names
>>> with the "display" text property, but to keep the symbol name
underneath.
>>> This is good when using try-expand-dabbrev-all-buffers, such as when
>>> writing the init file.
>>
>> Thanks, this is a nice idea.  Your patch allows to copy the symbol by M-w
>> and paste into a program as a symbol.
>
> But what happens when a variable name is expanded in the customization
buffer?
> (expanded in the sense that the down arrow is displayed before it)
> It seems the name displayed as a symbol, not as a human-readable string.

Hello Juri.

I think the problem you see is easily fixed with the attached patch.
From ea2b85184b7e4fde1cf3e3ba680095177ffed29a Mon Sep 17 00:00:00 2001
From: Mauro Aranda <[email-masked]>
Date: Fri, 4 Sep 2020 18:48:27 -0300
Subject: [PATCH] Improve call to widget-create-child-and-convert in cus-edit

* lisp/cus-edit.el (custom-variable-value-create): Pass tag as the
  :tag property value.
---
 lisp/cus-edit.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 23ceb3a857..7153ba40e1 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2685,7 +2685,7 @@ custom-variable-value-create
 		    :sample-face (if obsolete
 				     'custom-variable-obsolete
 				   'custom-variable-tag)
-		    tag)
+		    :tag tag)
 		   buttons)
 	     (push (widget-create-child-and-convert
 		    widget type
-- 
2.28.0