devdocs-browser-major-mode-docs-alist uses function as the :key-type for the alist. However, if a mode in that alist is not loaded when setopt is called to set the option, it will warn the user that the value of the option does not match its type. This is because functionp` only returns non-nil when that major mode is loaded.
You'll see this error, for instance, in a fresh emacs -q: load devdocs-browser.el, then call setopt on the default value of devdocs-browser-major-mode-docs-alist:
(setopt devdocs-browser-major-mode-docs-alist
'((c++-mode . ("cpp"))
(c-mode . ("c"))
(go-mode . ("go"))
(python-mode . ("Python"))
(emacs-lisp-mode . ("elisp"))
(rust-mode . ("rust"))
(cmake-mode . ("CMake"))))
You'll see the warning.
Instead, I think symbol is more appropriate as the :key-type.
devdocs-browser-major-mode-docs-alistusesfunctionas the:key-typefor the alist. However, if a mode in that alist is not loaded whensetoptis called to set the option, it will warn the user that the value of the option does not match its type. This is becausefunctionp` only returns non-nil when that major mode is loaded.You'll see this error, for instance, in a fresh emacs -q: load devdocs-browser.el, then call
setopton the default value ofdevdocs-browser-major-mode-docs-alist:You'll see the warning.
Instead, I think
symbolis more appropriate as the:key-type.