Function: markdown-check-change-for-wiki-link

markdown-check-change-for-wiki-link is an interactive and byte-compiled function defined in markdown-mode.el.

This command is obsolete since 2.8.

Signature

(markdown-check-change-for-wiki-link FROM TO)

Documentation

Check region between FROM and TO for wiki links and re-fontify as needed.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-check-change-for-wiki-link (from to)
  "Check region between FROM and TO for wiki links and re-fontify as needed."
  (interactive "*r")
  (let* ((modified (buffer-modified-p))
         (buffer-undo-list t)
         (inhibit-read-only t)
         deactivate-mark
         buffer-file-truename)
    (unwind-protect
        (save-excursion
          (save-match-data
            (save-restriction
              (cursor-intangible-mode +1) ;; inhibit-point-motion-hooks is obsoleted since Emacs 29
              ;; Extend the region to fontify so that it starts
              ;; and ends at safe places.
              (cl-multiple-value-bind (new-from new-to)
                  (with-no-warnings
                    (markdown-extend-changed-region from to))
                (goto-char new-from)
                ;; Only refontify when the range contains text with a
                ;; wiki link face or if the wiki link regexp matches.
                (when (or (markdown-range-property-any
                           new-from new-to 'font-lock-face
                           '(markdown-link-face markdown-missing-link-face))
                          (re-search-forward
                           markdown-regex-wiki-link new-to t))
                  (with-no-warnings
                   ;; Unfontify existing fontification (start from scratch)
                   (markdown-unfontify-region-wiki-links new-from new-to)
                   ;; Now do the fontification.
                   (markdown-fontify-region-wiki-links new-from new-to)))))))
      (cursor-intangible-mode -1)
      (and (not modified)
           (buffer-modified-p)
           (set-buffer-modified-p nil)))))