emacs-devel
[Top][All Lists]
Advanced

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

Re: text_property_stickiness() ignores `text-property-default-nonsticky'


From: Dmitry Kurochkin
Subject: Re: text_property_stickiness() ignores `text-property-default-nonsticky'
Date: Tue, 05 Jul 2011 08:13:27 +0400
User-agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

On Mon, 04 Jul 2011 23:50:41 -0400, Stefan Monnier <address@hidden> wrote:
> > The patch below would not work because it checks for nil in
> > `text-property-default-nonsticky' instead of 't.
> 
> Yes, as you noticed, I caught it before committing.
> 
> > But your commit r104949 fixes the issue.  Thank you!  Will it get
> > included in some bugfix emacs release anytime soon?  Or only Emacs24?
> 
> The next Emacs release should be 24.1 (there are no more planned 23.N).
> 
> > It seems that text_property_stickiness() or get_pos_property() or some
> > other elisp interface to get "what inherited property value for PROP is
> > at this POS" would be useful.  For example, `widget-field-activate'
> > should work at the end of widget.  Currently, `widget-field-activate' is
> > called at the end of widget, because keymap is rear-sticky but it does
> > not call widget's action because `widget-field-at' does not respect
> > stickiness.  What do you think?
> 
> At the C level, we have `get_pos_property' which returns the value of
> a property at that position (i.e. between the char before the position
> and the char after that position).  Note that since stickiness can vary
> between properties, get_pos_property could still return a value
> inconsistent with the keymap used.

Hm... I guess I miss something here.  Can you provide an example here?

> But I guess we could export get_pos_property to Elisp.
> 

Perhaps there should be `get-char-property-sticky' (and similar)
functions that do the same as non-sticky counterparts but check for
sticky properties additionally.

Then `widget-field-at' would use such function to get the `field'
property instead of `get-char-property'.  That should fix the issue with
`widget-field-activate' I described above.

Regards,
  Dmitry

> 
>         Stefan



reply via email to

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