Skip to main content


I just wrote a bunch of #elisp code like this:
(catch :abort
  ;; do something
  (when condition
    (message "A bad thing happened")
    (throw :abort nil))
  ;; do something else
  )

When the functionality I really wanted was:
(progn
  ;; do something
  (when condition
    (user-error "A bad thing happened"))
  ;; do something else
  )

I knew the former felt sketchy, but I couldn't think of a better way to do it until just now.
#emacs #lisp

FOSS Dev reshared this.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.