aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-09-05 11:22:11 +0300
committerEli Zaretskii2015-09-05 11:22:11 +0300
commitec14f087535282c188861815ac806024274185d5 (patch)
treef05e2db0489a1033b9aef5d4bfbfdc89ef40c885
parent90937cbfe48229028d839a5e8c5815020e84b235 (diff)
downloademacs-ec14f087535282c188861815ac806024274185d5.tar.gz
emacs-ec14f087535282c188861815ac806024274185d5.zip
Avoid errors in thing-at-point with 2nd argument non-nil
* lisp/thingatpt.el (thing-at-point): Only call 'length' on sequences. (Bug#21391)
-rw-r--r--lisp/thingatpt.el2
1 files changed, 1 insertions, 1 deletions
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."
145 (let ((bounds (bounds-of-thing-at-point thing))) 145 (let ((bounds (bounds-of-thing-at-point thing)))
146 (when bounds 146 (when bounds
147 (buffer-substring (car bounds) (cdr bounds))))))) 147 (buffer-substring (car bounds) (cdr bounds)))))))
148 (when (and text no-properties) 148 (when (and text no-properties (sequencep text))
149 (set-text-properties 0 (length text) nil text)) 149 (set-text-properties 0 (length text) nil text))
150 text)) 150 text))
151 151