Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun motion-wrapper (motion)
- (progn
- ;; Attempt a motion command, allowing it to end up inside of an overlay.
- (condition-case nil
- (funcall motion)
- ;; If it fails, remove the overlay at point if any
- (error (progn
- (message "error happened!")
- (function-to-remove-overlay))))
- (let ((overlay (function-to-get-overlay-at-point)))
- (if overlay
- (progn
- (setq disable-point-adjustment t)
- (setq cursor-type nil))
- (setq cursor-type t)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement