Function: xref-edit--before-change-function

xref-edit--before-change-function is a byte-compiled function defined in xref.el.gz.

Signature

(xref-edit--before-change-function BEG END)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(defun xref-edit--before-change-function (_beg _end)
  (when (and (not (get-text-property (pos-bol) 'occur-target))
             (get-text-property (pos-bol) 'occur-prefix))
    (let ((m (xref-location-marker (xref-item-location
                                    (get-text-property (pos-bol) 'xref-item))))
          (inhibit-read-only t)
          (inhibit-modification-hooks t)
          (buffer-undo-list t))
      (add-text-properties (pos-bol) (pos-eol)
                           `(occur-target ((,m . ,m)))))))