Function: majutsu-refresh-buffer-internal
majutsu-refresh-buffer-internal is a natively compiled function
defined in majutsu-mode.el.
Signature
(majutsu-refresh-buffer-internal &optional CREATED &key INITIAL-SECTION SELECT-SECTION)
Documentation
Refresh the current Majutsu buffer.
CREATED, INITIAL-SECTION, and SELECT-SECTION are for internal use.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-mode.el
(cl-defun majutsu-refresh-buffer-internal (&optional created &key initial-section select-section)
"Refresh the current Majutsu buffer.
CREATED, INITIAL-SECTION, and SELECT-SECTION are for internal use."
(when-let* ((refresh (majutsu--refresh-buffer-function)))
(let ((action (if created "Creating" "Refreshing")))
(when (eq major-mode 'majutsu-mode)
(majutsu--debug "%s buffer `%s'..." action (buffer-name)))
(cond
(created
(funcall refresh)
(cond (initial-section (funcall initial-section))
(select-section (funcall select-section))))
(t
(deactivate-mark)
(setq magit-section-pre-command-section nil)
(setq magit-section-highlight-overlays nil)
(setq magit-section-selection-overlays nil)
(setq magit-section-highlighted-sections nil)
(setq magit-section-focused-sections nil)
(let ((positions (majutsu--refresh-buffer-get-positions)))
(funcall refresh)
(cond (select-section (funcall select-section))
((majutsu--refresh-buffer-set-positions positions))))))
(let ((magit-section-cache-visibility nil))
(when (bound-and-true-p magit-root-section)
(majutsu-section-show magit-root-section)))
(run-hooks 'majutsu-refresh-buffer-hook)
(magit-section-update-highlight)
(set-buffer-modified-p nil))))