Function: tex--bounds-of-symbol-at-point

tex--bounds-of-symbol-at-point is a byte-compiled function defined in tex-mode.el.gz.

Signature

(tex--bounds-of-symbol-at-point)

Documentation

Simplify bounds-of-thing-at-point for TeX xref backend.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun tex--bounds-of-symbol-at-point ()
  "Simplify `bounds-of-thing-at-point' for TeX `xref' backend."
  (let ((orig (point)))
    (ignore-errors
      (save-excursion
        (tex-thingatpt--end-of-symbol)
        (tex-thingatpt--beginning-of-symbol)
        (let ((beg (point)))
          (if (<= beg orig)
              (let ((real-end
                     (progn
                       (tex-thingatpt--end-of-symbol)
                       (point))))
                (cond ((and (<= orig real-end) (< beg real-end))
                       (cons beg real-end))
                      ((and (= orig real-end) (= beg real-end))
                       (cons beg (1+ beg)))))))))));; For 1-char TeX commands.