Function: markdown-ts--table-abutting-pos

markdown-ts--table-abutting-pos is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts--table-abutting-pos POS)

Documentation

Adjust POS to abut its closest text.

Return pos adjusted to the position of the nearest non-blank character. Otherwise, return nil, for example, if the line is empty.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts--table-abutting-pos (pos)
  "Adjust POS to abut its closest text.
Return pos adjusted to the position of the nearest non-blank character.
Otherwise, return nil, for example, if the line is empty."
  (save-excursion
    (goto-char pos)
    (skip-chars-forward "[[:blank:]]" (pos-eol))
    (if (eq pos (pos-eol))
        (progn
          (goto-char pos)
          (skip-chars-backward "[[:blank:]]" (pos-bol))
          (unless (eq pos (pos-bol))
            (max (point-min) (1- (point)))))
      (min (point-max) (1+ (point))))))