Created
October 4, 2010 10:20
-
-
Save kawaguchi/609482 to your computer and use it in GitHub Desktop.
オーバーレイのバグ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1234567890 | |
(defun overlay-test (begin end text color) | |
(let ((o (make-overlay begin end))) | |
(overlay-put o 'window | |
(selected-window)) | |
(overlay-put o 'face | |
`(background-color . ,color)) | |
(overlay-put o 'display text) | |
o)) | |
;; eval in window 1. expect => bar4567890 | |
(overlay-test 1 4 "bar" "red") | |
;; eval in window 2. expect => fooo567890 | |
(overlay-test 1 5 "fooo" "blue") | |
;; delete overlays | |
(mapcar 'delete-overlay | |
(overlays-in (point-min) | |
(point-max))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment