diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-07-17 23:53:10 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-07-17 23:53:10 +0000 |
commit | 46bb7c2b49a747d2d466fcc979abeab28fd0780d (patch) | |
tree | ee300ed10b7223c997c4551aad222c8fd453fffa /src | |
parent | a6ac02afc3576560cec29672a2d0aa0dd0f74306 (diff) | |
download | emacs-46bb7c2b49a747d2d466fcc979abeab28fd0780d.tar.gz |
(Fget_text_property): Simplify using Ftext_properties_at.
Diffstat (limited to 'src')
-rw-r--r-- | src/textprop.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/textprop.c b/src/textprop.c index 1f8a0503c93..fc09dc41d81 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -501,25 +501,9 @@ OBJECT is optional and defaults to the current buffer.\n\ If POSITION is at the end of OBJECT, the value is nil.") (pos, prop, object) Lisp_Object pos, object; - register Lisp_Object prop; + Lisp_Object prop; { - register INTERVAL i; - register Lisp_Object tail; - - if (NILP (object)) - XSET (object, Lisp_Buffer, current_buffer); - i = validate_interval_range (object, &pos, &pos, soft); - if (NULL_INTERVAL_P (i)) - return Qnil; - - /* If POS is at the end of the interval, - it means it's the end of OBJECT. - There are no properties at the very end, - since no character follows. */ - if (XINT (pos) == LENGTH (i) + i->position) - return Qnil; - - return textget (i->plist, prop); + return textget (Ftext_properties_at (pos, object), prop); } DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, |