diff options
| author | Dmitry Gutov | 2015-06-06 12:57:59 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2015-06-06 12:57:59 +0300 |
| commit | 73e6f36ed672edc827621b85dc88b8521030633d (patch) | |
| tree | 0f73a86fc23ac26b6b6fcce716d6b8ebc27dc63a | |
| parent | e5108ff1e4ac0c17361a703e565fda78112812db (diff) | |
| download | emacs-73e6f36ed672edc827621b85dc88b8521030633d.tar.gz emacs-73e6f36ed672edc827621b85dc88b8521030633d.zip | |
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.
| -rw-r--r-- | lisp/thingatpt.el | 5 |
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'." | |||
| 180 | (defun in-string-p () | 180 | (defun in-string-p () |
| 181 | "Return non-nil if point is in a string. | 181 | "Return non-nil if point is in a string. |
| 182 | \[This is an internal function.]" | 182 | \[This is an internal function.]" |
| 183 | (declare (obsolete "use (nth 3 (syntax-ppss)) instead." "25.1")) | ||
| 183 | (let ((orig (point))) | 184 | (let ((orig (point))) |
| 184 | (save-excursion | 185 | (save-excursion |
| 185 | (beginning-of-defun) | 186 | (beginning-of-defun) |
| @@ -190,7 +191,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." | |||
| 190 | \[This is an internal function.]" | 191 | \[This is an internal function.]" |
| 191 | (let ((char-syntax (syntax-after (point)))) | 192 | (let ((char-syntax (syntax-after (point)))) |
| 192 | (if (or (eq char-syntax ?\)) | 193 | (if (or (eq char-syntax ?\)) |
| 193 | (and (eq char-syntax ?\") (in-string-p))) | 194 | (and (eq char-syntax ?\") (nth 3 (syntax-ppss)))) |
| 194 | (forward-char 1) | 195 | (forward-char 1) |
| 195 | (forward-sexp 1)))) | 196 | (forward-sexp 1)))) |
| 196 | 197 | ||
| @@ -201,7 +202,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." | |||
| 201 | \[This is an internal function.]" | 202 | \[This is an internal function.]" |
| 202 | (let ((char-syntax (char-syntax (char-before)))) | 203 | (let ((char-syntax (char-syntax (char-before)))) |
| 203 | (if (or (eq char-syntax ?\() | 204 | (if (or (eq char-syntax ?\() |
| 204 | (and (eq char-syntax ?\") (in-string-p))) | 205 | (and (eq char-syntax ?\") (nth 3 (syntax-ppss)))) |
| 205 | (forward-char -1) | 206 | (forward-char -1) |
| 206 | (forward-sexp -1)))) | 207 | (forward-sexp -1)))) |
| 207 | 208 | ||