Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
97a1bc63
Commit
97a1bc63
authored
Nov 30, 2003
by
Luc Teirlinck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fget_char_property_and_overlay): New function.
(syms_of_textprop): Defsubr it.
parent
9f8a930d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
src/textprop.c
src/textprop.c
+25
-0
No files found.
src/textprop.c
View file @
97a1bc63
...
...
@@ -703,6 +703,30 @@ overlays are considered only if they are associated with OBJECT. */)
{
return
get_char_property_and_overlay
(
position
,
prop
,
object
,
0
);
}
DEFUN
(
"get-char-property-and-overlay"
,
Fget_char_property_and_overlay
,
Sget_char_property_and_overlay
,
2
,
3
,
0
,
doc
:
/* Like `get-char-property', but with extra overlay information.
Return a cons whose car is the return value of `get-char-property'
with the same arguments, that is, the value of POSITION's property
PROP in OBJECT, and whose cdr is the overlay in which the property was
found, or nil, if it was found as a text property or not found at all.
OBJECT is optional and defaults to the current buffer. OBJECT may be
a string, a buffer or a window. For strings, the cdr of the return
value is always nil, since strings do not have overlays. If OBJECT is
a window, then that window's buffer is used, but window-specific
overlays are considered only if they are associated with OBJECT. If
POSITION is at the end of OBJECT, both car and cdr are nil. */
)
(
position
,
prop
,
object
)
Lisp_Object
position
,
object
;
register
Lisp_Object
prop
;
{
Lisp_Object
overlay
;
Lisp_Object
val
=
get_char_property_and_overlay
(
position
,
prop
,
object
,
&
overlay
);
return
Fcons
(
val
,
overlay
);
}
DEFUN
(
"next-char-property-change"
,
Fnext_char_property_change
,
Snext_char_property_change
,
1
,
2
,
0
,
...
...
@@ -2277,6 +2301,7 @@ rear-nonsticky properties of the character overrides NONSTICKINESS. */);
defsubr
(
&
Stext_properties_at
);
defsubr
(
&
Sget_text_property
);
defsubr
(
&
Sget_char_property
);
defsubr
(
&
Sget_char_property_and_overlay
);
defsubr
(
&
Snext_char_property_change
);
defsubr
(
&
Sprevious_char_property_change
);
defsubr
(
&
Snext_single_char_property_change
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment