From 7582a497473d4c00e91f1bd89392a8c030d26816 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Mon, 6 Jun 2011 13:22:41 +0000 Subject: *** empty log message *** --- etc/emacsbugs/visiblity-attempt.el | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'etc/emacsbugs') diff --git a/etc/emacsbugs/visiblity-attempt.el b/etc/emacsbugs/visiblity-attempt.el index e6cc8c07..ad88799c 100644 --- a/etc/emacsbugs/visiblity-attempt.el +++ b/etc/emacsbugs/visiblity-attempt.el @@ -1,14 +1,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 'myvis . t)) - (remove-from-invisibility-spec '(myvis . t))) - (setq vis (not vis))) -(overlay-put (make-overlay (point-min) (point)) 'invisible 'myvis)(defvar vis nil) -(defun toggle-invis () - (interactive) - (if vis (add-to-invisibility-spec '(myvis . t)) - (remove-from-invisibility-spec '(myvis . t))) + (if vis + (add-to-invisibility-spec '(larger . t)) + (remove-from-invisibility-spec '(larger . t))) (setq vis (not vis))) -(overlay-put (make-overlay (point-min) (point)) 'invisible 'myvis) + + +;; 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. + + + + + -- cgit v1.2.3