emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read-only overlays (was: 23.0.50; delete-seletion-mode and read-only tex


From: Johan Bockgård
Subject: read-only overlays (was: 23.0.50; delete-seletion-mode and read-only text)
Date: Tue, 22 Jan 2008 14:20:35 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>  (not (or (get-text-property from 'read-only)
>           (< (next-single-property-change from 'read-only nil to) to)))))

At first I was going to suggest that this should use get-char-property
and next-single-char-property-change, to include read-only overlays.
But on closer look, it seems that those beasts don't exist.

The manual's description of `inhibit-read-only'[1] does say that

    "Read-only characters in a buffer are those that have non-`nil'
     `read-only' properties (either text properties or overlay
     properties)."

But (overlay-put o 'read-only t) has no effect.

(`read-only' is indeed not listed in "Overlay Properties"[2].  OTOH, of
the properties in "Special Properties"[3] that are not listed in
"Overlay Properties", `pointer', `field', `line-spacing' and
`line-height' all have effect as property of an overlay, but maybe that
is just luck.  (`syntax-table' and `read-only' don't.))


[1] (info "(elisp) Read Only Buffers")
[2] (info "(elisp) Overlay Properties")
[3] (info "(elisp) Special Properties")

-- 
Johan Bockgård





reply via email to

[Prev in Thread] Current Thread [Next in Thread]