From: Eli Zaretskii Date: Sat, 5 Sep 2015 08:22:11 +0000 (+0300) Subject: Avoid errors in thing-at-point with 2nd argument non-nil X-Git-Tag: emacs-25.0.90~1225^2~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec14f087535282c188861815ac806024274185d5;p=emacs.git Avoid errors in thing-at-point with 2nd argument non-nil * lisp/thingatpt.el (thing-at-point): Only call 'length' on sequences. (Bug#21391) --- diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 6e90b265082..a9c539b7b87 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -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))