Emacs says Symbol's function definition is void: setopt after updated to the latest version
Closed this issue · 3 comments
maptile commented
After updated to the latest version of .emacs.d, an error shows when start up.
Debugger entered--Lisp error: (void-function setopt)
(setopt use-short-answers t)
(progn (setopt use-short-answers t))
(if (boundp 'use-short-answers) (progn (setopt use-short-answers t)))
load-with-code-conversion("/home/cat/.emacs.d/lisp/init-misc.el" "/home/cat/.emacs.d/lisp/init-misc.el" nil t)
#<subr require>(init-misc)
apply(#<subr require> init-misc nil)
(prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis (current-time) require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t)))))
(let* ((already-loaded (memq feature features)) (require-start-time (and (not already-loaded) (current-time)))) (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis ... require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t))))))
sanityinc/require-times-wrapper(#<subr require> init-misc)
apply(sanityinc/require-times-wrapper #<subr require> init-misc)
require(init-misc)
load-with-code-conversion("/home/cat/.emacs.d/init.el" "/home/cat/.emacs.d/init.el" t t)
load("/home/cat/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1409951b17b9bac2>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
command-line()
normal-top-level()
It seems this error introduced in use-short-answers commit.
Emacs version: 28.2
Platform: Ubuntu 23.04 Gnome Wayland
maptile commented
It seems the 'setopt' command was introduced in Emacs 29. That may be the reason of why it shows an error in Emacs 28
purcell commented
Good catch, thanks — I was a bit surprised this didn't show up in CI...
maptile commented
Thanks. After updated, the problem goes away. XD