aboutsummaryrefslogtreecommitdiffhomepage
path: root/etc/emacsbugs/visiblity-attempt.el
blob: ad88799cfe00822bf855405974248d8d3658f8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;;;
;;; === Test area for invisibility ===
;;;
(defvar vis nil)

(overlay-put (make-overlay 18 22) 'invisible 'smaller)
(overlay-put (make-overlay 9 43) 'invisible 'larger)

(defun toggle-invis ()
  (interactive)
  (if vis 
      (add-to-invisibility-spec '(larger . t))
    (remove-from-invisibility-spec '(larger . t)))
  (setq vis (not vis)))


;; In this buffer:

;;    M-x eval-buffer RET
;;    M-x toggle-invis

;; The smaller area remains visible, although there is a surrounding
;; overlay which has an invisibility spec which should cover the
;; revealed characters.  Arguably a bug.