Avoid errors in thing-at-point with 2nd argument non-nil

* lisp/thingatpt.el (thing-at-point): Only call 'length' on
sequences.  (Bug#21391)
This commit is contained in:
Eli Zaretskii 2015-09-05 11:22:11 +03:00
parent 90937cbfe4
commit ec14f08753

View file

@ -145,7 +145,7 @@ a symbol as a valid THING."
(let ((bounds (bounds-of-thing-at-point thing)))
(when bounds
(buffer-substring (car bounds) (cdr bounds)))))))
(when (and text no-properties)
(when (and text no-properties (sequencep text))
(set-text-properties 0 (length text) nil text))
text))