GNU bug report logs -
#41831
26.3; Customize UI fails for defcustom with standard default of list heterogenous choice types
Previous Next
Reported by: Pierre Rouleau <prouleau001 <at> gmail.com>
Date: Fri, 12 Jun 2020 22:13:01 UTC
Severity: minor
Tags: moreinfo, notabug
Found in version 26.3
Done: Mauro Aranda <maurooaranda <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello Pierre.
Pierre Rouleau <prouleau001 <at> gmail.com> writes:
> (defcustom pel-key-chords
> '((global "<>" ("<>\C-b"))
> (global "[]" ("[]\C-b"))
> (c-mode "{}" ("{\n\n}\C-p"))
> (c++-mode "{}" ("{\n\n}\C-p")))
> ;; (flyspell-mode "4r" flyspell-correct-word-before-point)
> ;; (flyspell-prog-mode "4r" flyspell-correct-word-before-point)
> ;; (global "6y" pel-find-file-at-point-in-window)
> ;; (global ".;" pel-search-word-from-top))
My guess is that the functions you are using here are not known to be
defined by the time you want to customize the variable. In other words,
`functionp' returns nil for these symbols at that time.
I followed this recipe:
1. Start emacs -Q
2. In the *scratch* buffer, I evaluated the following:
(defcustom pel-key-chords
'((global "<>" ("<>\C-b"))
(c-mode "{}" ("{\n\n}\C-p"))
(flyspell-mode "4r" flyspell-correct-word-before-point)
(global ".;" pel-search-word-from-top))
"..."
:type '(repeat
(choice
(list
:tag "expansion-keys"
(symbol :tag "mode" :value global)
(string :tag "chars")
(repeat (key-sequence :tag "key")))
(list
:tag "command"
(symbol :tag "mode" :value global)
(string :tag "chars")
(function :tag "command")))))
3. M-x customize-option RET pel-key-chords
That gives me the mismatch message. At this time, flyspell isn't
loaded, and `pel-search-word-from-top' is not defined.
4. C-x k RET, to kill the customize buffer.
5. Eval:
(require 'flyspell)
(defun pel-search-word-from-top ()
(ignore))
6. Again: M-x customize-option RET pel-key-chords
Now I see the customize buffer as expected, with the state being
STANDARD.
Would you try the above, to check if my guess is correct?
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.