Function: markdown-point-after-unwrap

markdown-point-after-unwrap is a byte-compiled function defined in markdown-mode.el.

Signature

(markdown-point-after-unwrap CUR PREFIX SUFFIX)

Documentation

Return desired position of point after an unwrapping operation.

CUR gives the position of the point before the operation. Additionally, two cons cells must be provided. PREFIX gives the bounds of the prefix string and SUFFIX gives the bounds of the suffix string.

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-point-after-unwrap (cur prefix suffix)
  "Return desired position of point after an unwrapping operation.
CUR gives the position of the point before the operation.
Additionally, two cons cells must be provided.  PREFIX gives the
bounds of the prefix string and SUFFIX gives the bounds of the
suffix string."
  (cond ((< cur (cdr prefix)) (car prefix))
        ((< cur (car suffix)) (- cur (- (cdr prefix) (car prefix))))
        ((<= cur (cdr suffix))
         (- cur (+ (- (cdr prefix) (car prefix))
                   (- cur (car suffix)))))
        (t cur)))