Subject: 31.0.50; Error with describe-variable for options defined in C sources

From: Mauro Aranda <[email-masked]>
Date: Thu, 13 Mar 2025 06:36:31 -0300

After emacs -Q:
C-h v cursor-in-non-selected-windows
help--recommend-setopt: Wrong type argument: stringp, 535053

Backtrace is:

Debugger entered--Lisp error: (wrong-type-argument stringp 535053)
   string-match("\\<setopt\\>" 535053)
   help--recommend-setopt(cursor-in-non-selected-windows)
   apply(help--recommend-setopt cursor-in-non-selected-windows)
   help-fns--run-describe-functions((help-fns--var-bufferlocal 
help-fns--var-aliases help-fns--var-alias help-fns--var-watchpoints 
help-fns--var-file-local help-fns--var-ignored-local help-fns--var-risky 
help-fns--var-safe-local help-fns--customize-variable-version 
help-fns--customize-variable help-fns--mention-first-variable-release 
help--recommend-setopt) cursor-in-non-selected-windows)
   #f(compiled-function () #<bytecode -0x4b6c8828ca5ebe5>)()
   help--window-setup("*Help*" #f(compiled-function () #<bytecode 
-0x4b6c8828ca5ebe5>))
   describe-variable(cursor-in-non-selected-windows)
   funcall-interactively(describe-variable cursor-in-non-selected-windows)
   call-interactively(describe-variable nil nil)
   command-execute(describe-variable)

In GNU Emacs 31.0.50 (build 22, x86_64-pc-linux-gnu, GTK+ Version
  3.24.33, cairo version 1.16.0) of 2025-03-13 built on tbb-desktop
Repository revision: 1528d315643d864204f327acb4ec19dd8d859de8
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201001
System Description: Ubuntu 22.04.5 LTS

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR
GTK3 ZLIB

Important settings:
   value of $LC_MONETARY: es_AR.UTF-8
   value of $LC_NUMERIC: es_AR.UTF-8
   value of $LC_TIME: es_AR.UTF-8
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   minibuffer-regexp-mode: t
   line-number-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug lisp-mnt message mailcap yank-media puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils debug backtrace find-func cus-start cus-load cl-extra
cl-print thingatpt help-fns byte-opt gv bytecomp byte-compile radix-tree
help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
tty-child-frames emacs)

Memory information:
((conses 16 67587 12890) (symbols 48 7662 0) (strings 32 20357 1994)
  (string-bytes 1 462551) (vectors 16 12208)
  (vector-slots 8 135221 8464) (floats 8 28 8) (intervals 56 439 11)
  (buffers 992 13))