diff options
| -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\ | |||
| 501 | If POSITION is at the end of OBJECT, the value is nil.") | 501 | If POSITION is at the end of OBJECT, the value is nil.") |
| 502 | (pos, prop, object) | 502 | (pos, prop, object) |
| 503 | Lisp_Object pos, object; | 503 | Lisp_Object pos, object; |
| 504 | register Lisp_Object prop; | 504 | Lisp_Object prop; |
| 505 | { | 505 | { |
| 506 | register INTERVAL i; | 506 | return textget (Ftext_properties_at (pos, object), prop); |
| 507 | register Lisp_Object tail; | ||
| 508 | |||
| 509 | if (NILP (object)) | ||
| 510 | XSET (object, Lisp_Buffer, current_buffer); | ||
| 511 | i = validate_interval_range (object, &pos, &pos, soft); | ||
| 512 | if (NULL_INTERVAL_P (i)) | ||
| 513 | return Qnil; | ||
| 514 | |||
| 515 | /* If POS is at the end of the interval, | ||
| 516 | it means it's the end of OBJECT. | ||
| 517 | There are no properties at the very end, | ||
| 518 | since no character follows. */ | ||
| 519 | if (XINT (pos) == LENGTH (i) + i->position) | ||
| 520 | return Qnil; | ||
| 521 | |||
| 522 | return textget (i->plist, prop); | ||
| 523 | } | 507 | } |
| 524 | 508 | ||
| 525 | DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, | 509 | DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, |