Subject: Re: 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 11:16:05 -0300

Lars Ingebrigtsen <[email-masked]> writes:

> Mauro Aranda <[email-masked]> writes:
>
>> You are right.  So this patch didn't break `C-h S' at all, it just made
>> the bug a lot more visible.
>>
>> Anyway, my lightly testing shows that perhaps relying on the :regexp and
>> not providing :parse-rule could be enough.
>
> Could you whip up a patch for that?

Sure, here is the patch I'm running with
From 54f6295b9180f10216835fbeb91d26031179e93f Mon Sep 17 00:00:00 2001
From: Mauro Aranda <[email-masked]>
Date: Sat, 5 Sep 2020 11:06:36 -0300
Subject: [PATCH] info-lookup-symbol: Fix the suggested default value in Custom
 buffers

* lisp/info-look.el (info-lookup-maybe-add-help 'Custom-mode): Don't
pass info-lookup-guess-custom-symbol as the :parse-rule, since we
don't need it anymore.  (Bug#41905)
(info-lookup-guess-custom-symbol): Now unused, mark as obsolete.
---
 lisp/info-look.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/info-look.el b/lisp/info-look.el
index 4e379cadef..701a7e6014 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -648,6 +648,9 @@ info-lookup-guess-custom-symbol
 		     (> end beg)))
 	    (buffer-substring-no-properties beg end)))))
     (error nil)))
+;; We don't need this anymore, because now Custom inserts the unlispified name
+;; in the buffer.  (Bug#41905)
+(make-obsolete 'info-lookup-guess-custom-symbol nil "28.1")
 
 (defun info-lookup-guess-gdb-script-symbol ()
   "Get symbol at point in GDB script buffers."
@@ -1065,7 +1068,6 @@ info-complete
  :mode 'Custom-mode
  :ignore-case t
  :regexp "[^][()`'‘’,:\" \t\n]+"
- :parse-rule 'info-lookup-guess-custom-symbol
  :other-modes '(emacs-lisp-mode))
 
 (info-lookup-maybe-add-help
-- 
2.28.0