I just wrote a bunch of #elisp code like this:
When the functionality I really wanted was:
I knew the former felt sketchy, but I couldn't think of a better way to do it until just now.
#emacs #lisp
(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.