Function: thing-at-point-bounds-of-string-at-point
thing-at-point-bounds-of-string-at-point is a byte-compiled function
defined in thingatpt.el.gz.
Signature
(thing-at-point-bounds-of-string-at-point)
Documentation
Return the bounds of the string at point.
Prefer the enclosing string with fallback on sexp at point.
[Internal function used by bounds-of-thing-at-point.]
Source Code
;; Defined in /usr/src/emacs/lisp/thingatpt.el.gz
(defun thing-at-point-bounds-of-string-at-point ()
"Return the bounds of the string at point.
Prefer the enclosing string with fallback on sexp at point.
\[Internal function used by `bounds-of-thing-at-point'.]"
(save-excursion
(let ((ppss (syntax-ppss)))
(if (nth 3 ppss)
;; Inside the string
(ignore-errors
(goto-char (nth 8 ppss))
(cons (point) (progn (forward-sexp) (point))))
;; At the beginning of the string
(if (eq (char-syntax (char-after)) ?\")
(let ((bound (bounds-of-thing-at-point 'sexp)))
(and bound
(<= (car bound) (point)) (< (point) (cdr bound))
bound)))))))