Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; -- nonlocal-exit-demo.el
- (defvar --nonlocal-exit-- t)
- (princ "pre.exit\n")
- (condition-case err
- (when --nonlocal-exit--
- (let ((--nonlocal-exit-- nil))
- (load-file load-file-name)
- (with-current-buffer " *load*" (goto-char (point-max)))))
- (error (princ (format "%S\n" err))))
- (princ "post.exit\n")
- ;; -- Shell session
- >>> emacs --batch --eval '(byte-compile-file "nonlocal-exit-demo.el")'
- >>> emacs --batch --load nonlocal-exit-demo.el
- pre.exit
- Loading /tmp/nonlocal-exit-demo.el (source)...
- pre.exit
- post.exit
- >>> emacs --batch --load nonlocal-exit-demo.elc
- pre.exit
- Loading /tmp/nonlocal-exit-demo.elc...
- pre.exit
- post.exit
- (error "No buffer named *load*")
- post.exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement