Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. (defun motion-wrapper (motion)
  2. (progn
  3. ;; Attempt a motion command, allowing it to end up inside of an overlay.
  4. (condition-case nil
  5. (funcall motion)
  6. ;; If it fails, remove the overlay at point if any
  7. (error (progn
  8. (message "error happened!")
  9. (function-to-remove-overlay))))
  10. (let ((overlay (function-to-get-overlay-at-point)))
  11. (if overlay
  12. (progn
  13. (setq disable-point-adjustment t)
  14. (setq cursor-type nil))
  15. (setq cursor-type t)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement