summaryrefslogtreecommitdiff
path: root/lisp/thingatpt.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-06-06 12:57:59 +0300
committerDmitry Gutov <dgutov@yandex.ru>2015-06-06 12:57:59 +0300
commit73e6f36ed672edc827621b85dc88b8521030633d (patch)
tree0f73a86fc23ac26b6b6fcce716d6b8ebc27dc63a /lisp/thingatpt.el
parente5108ff1e4ac0c17361a703e565fda78112812db (diff)
downloademacs-73e6f36ed672edc827621b85dc88b8521030633d.tar.gz
Replace uses of in-string-p; make it obsolete
* lisp/thingatpt.el (in-string-p): Declare obsolete (bug#20732). (end-of-sexp, beginning-of-sexp): Use syntax-ppss instead.
Diffstat (limited to 'lisp/thingatpt.el')
-rw-r--r--lisp/thingatpt.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index b3fe1bc7950..7fdb32c1ddf 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -180,6 +180,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'."
(defun in-string-p ()
"Return non-nil if point is in a string.
\[This is an internal function.]"
+ (declare (obsolete "use (nth 3 (syntax-ppss)) instead." "25.1"))
(let ((orig (point)))
(save-excursion
(beginning-of-defun)
@@ -190,7 +191,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'."
\[This is an internal function.]"
(let ((char-syntax (syntax-after (point))))
(if (or (eq char-syntax ?\))
- (and (eq char-syntax ?\") (in-string-p)))
+ (and (eq char-syntax ?\") (nth 3 (syntax-ppss))))
(forward-char 1)
(forward-sexp 1))))
@@ -201,7 +202,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'."
\[This is an internal function.]"
(let ((char-syntax (char-syntax (char-before))))
(if (or (eq char-syntax ?\()
- (and (eq char-syntax ?\") (in-string-p)))
+ (and (eq char-syntax ?\") (nth 3 (syntax-ppss))))
(forward-char -1)
(forward-sexp -1))))