Skip to content

Commit

Permalink
remove, don't delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockway committed May 16, 2009
1 parent d6a6b46 commit 9d0b9a5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions _local/colorful-points.el
Expand Up @@ -5,17 +5,13 @@
(defvar colorful-points-colors '("blue" "purple" "green" "orange" "yellow" "red")
"Colors that the points can be. Chosen in order.")

(define-minor-mode colorful-points-mode
"Give each point in buffer a unique color."
nil
" Colorful"
nil
(define-minor-mode colorful-points-mode "Give each point in buffer a unique color." nil
" Colorful" nil
(if colorful-points-mode
(progn ;; turning on
(make-variable-buffer-local 'after-change-functions)
(setq after-change-functions (cons #'colorful-points-after-change after-change-functions))
(colorful-points-after-change))

(progn ;; turning off
(mapc #'delete-overlay (mapcar #'cdr colorful-points))
(setq after-change-functions
Expand All @@ -26,8 +22,7 @@
(let ((colors colorful-points-colors))
(loop for color in
(mapcar (lambda (cell) (getf (overlay-get (cdr cell) 'face) :background)) colorful-points)
do (progn
(setq colors (delete color colors))))
do (setq colors (remove color colors))))
(or (car colors) (nth (random (length colorful-points-colors)) colorful-points-colors))))

(defun colorful-points--overlay-for-window (win)
Expand Down

0 comments on commit 9d0b9a5

Please sign in to comment.