Function: majutsu-diff--get-hunk-syntax

majutsu-diff--get-hunk-syntax is a natively compiled function defined in majutsu-diff.el.

Signature

(majutsu-diff--get-hunk-syntax SECTION REV FILE FROM)

Documentation

Return syntax fontification props for SECTION side REV FILE.

When FROM is non-nil, fontify the old side; otherwise fontify the new side.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-diff.el
(defun majutsu-diff--get-hunk-syntax (section rev file from)
  "Return syntax fontification props for SECTION side REV FILE.
When FROM is non-nil, fontify the old side; otherwise fontify the new side."
  (with-demoted-errors "Error getting hunk syntax highlighting: %S"
    (let ((args (majutsu-diff--get-hunk-text section from)))
      (when (and args (not (listp (car (cadr args)))))
        (require 'majutsu-file)
        (with-current-buffer (majutsu-find-file-noselect rev file)
          (save-excursion
            (apply #'diff-syntax-fontify-props nil args)))))))