Created
October 22, 2012 08:30
-
-
Save hidsh/3930335 to your computer and use it in GitHub Desktop.
elisp: set-mark w/ fringe-indicator (like xyzzy)
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
(defvar fringe-indicator-ol nil) | |
(defun fringe-indicator (pt bitmap) | |
(let ((s (make-string 1 ?x))) | |
(when fringe-indicator-ol (delete-overlay fringe-indicator-ol)) | |
(setq fringe-indicator-ol (make-overlay pt (1+ pt))) | |
(put-text-property 0 1 'display (list 'left-fringe bitmap) s) | |
(overlay-put fringe-indicator-ol 'before-string s))) | |
(defadvice set-mark-command (after fringe-indicator-adv activate) | |
"indicate mark-position at fringe." | |
(fringe-indicator (point) 'right-triangle)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment