From elisp Manual:
The text properties `front-sticky' and `rear-nonsticky', when
used, take precedence over the default NONSTICKINESS specified in
`text-property-default-nonsticky'.
but the following snip seems not work for me:
(with-current-buffer (get-buffer-create "aaaaa")
(insert "a")
(save-excursion
(backward-char)
(let ((p (point)))
(setplist 'mycat '(face highlight rear-nonsticky nil))
(setq text-property-default-nonsticky '((category . t)))
(add-text-properties p (1+ p) '(category mycat))))
(insert-and-inherit "b"))
I expect "b" to be highlighted but it is not, why?
> but the following snip seems not work for me:
> (with-current-buffer (get-buffer-create "aaaaa")
> (insert "a")
> (save-excursion
> (backward-char)
> (let ((p (point)))
> (setplist 'mycat '(face highlight rear-nonsticky nil))
A nil property value is the same no property value at all (i.e. it's the
default). So it can't be used to "override" anything.
Stefan