I am writing an emacs package which provides some commands to the user. The user can run things like
M-x foobar and
M-x eggsspam. However, some of these commands can fail. As an example, without running
M-x foobar once,
M-x spameggs will make no sense and has to report an error.
What's the right way to signal such errors to the user? Should I use
(user-error ...) or something else?