summaryrefslogtreecommitdiff
path: root/lisp/play/bubbles.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-06-18 15:38:00 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-06-18 15:38:00 -0400
commitcf10b34945d3be8dcf90d138e825ac4bd430ec24 (patch)
tree5272f733b771c189b4eca29f1f9ca9de4d01931b /lisp/play/bubbles.el
parent382ceb2cdbedc06b06d9fb424d83f531339a3311 (diff)
downloademacs-cf10b34945d3be8dcf90d138e825ac4bd430ec24.tar.gz
* lisp/play/bubbles.el (bubbles--initialize, bubbles--show-scores)
(bubbles--game-over): Don't add `intangible' properties since they didn't work anyway.
Diffstat (limited to 'lisp/play/bubbles.el')
-rw-r--r--lisp/play/bubbles.el36
1 files changed, 15 insertions, 21 deletions
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el
index e7f5725a0f0..cae151f0b33 100644
--- a/lisp/play/bubbles.el
+++ b/lisp/play/bubbles.el
@@ -1005,20 +1005,17 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
(set-buffer-modified-p nil)
(erase-buffer)
(insert " ")
- (add-text-properties
- (point-min) (point) (list 'intangible t 'display
- (cons 'space
- (list :height bubbles--row-offset))))
+ (put-text-property (point-min) (point)
+ 'display
+ (cons 'space (list :height bubbles--row-offset)))
(insert "\n")
(let ((max-char (length (bubbles--colors))))
(dotimes (i (bubbles--grid-height))
(let ((p (point)))
(insert " ")
- (add-text-properties
- p (point) (list 'intangible t
- 'display (cons 'space
- (list :width
- bubbles--col-offset)))))
+ (put-text-property p (point)
+ 'display
+ (cons 'space (list :width bubbles--col-offset))))
(dotimes (j (bubbles--grid-width))
(let* ((index (random max-char))
(char (nth index bubbles-chars)))
@@ -1026,10 +1023,9 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
(add-text-properties (1- (point)) (point) (list 'index index))))
(insert "\n"))
(insert "\n ")
- (add-text-properties
- (1- (point)) (point) (list 'intangible t 'display
- (cons 'space
- (list :width bubbles--col-offset)))))
+ (put-text-property (1- (point)) (point)
+ 'display
+ (cons 'space (list :width bubbles--col-offset))))
(put-text-property (point-min) (point-max) 'pointer 'arrow))
(bubbles-mode)
(bubbles--reset-score)
@@ -1179,10 +1175,9 @@ Use optional parameter POS instead of point if given."
(delete-region (point) (point-max))
(insert (format "Selected: %4d\n" bubbles--neighborhood-score))
(insert " ")
- (add-text-properties (1- (point)) (point)
- (list 'intangible t 'display
- (cons 'space
- (list :width bubbles--col-offset))))
+ (put-text-property (1- (point)) (point)
+ 'display
+ (cons 'space (list :width bubbles--col-offset)))
(insert (format "Score: %4d" bubbles--score))
(put-text-property pos (point) 'status t))))
@@ -1200,10 +1195,9 @@ Use optional parameter POS instead of point if given."
(goto-char (point-max))
(let* ((inhibit-read-only t))
(insert "\n ")
- (add-text-properties (1- (point)) (point)
- (list 'intangible t 'display
- (cons 'space
- (list :width bubbles--col-offset))))
+ (put-text-property (1- (point)) (point)
+ 'display
+ (cons 'space (list :width bubbles--col-offset)))
(insert "Game Over!"))
;; save score
(gamegrid-add-score (format "bubbles-%s-%d-%d-%d-scores"