Function: majutsu-blob-edit-exit

majutsu-blob-edit-exit is an interactive and natively compiled function defined in majutsu-file.el.

Signature

(majutsu-blob-edit-exit)

Documentation

Exit editable blob mode.

If there are unsaved changes, prompt to save or abort, like wdired-exit.

Key Bindings

majutsu-blob-edit-mode-map C-x C-q

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-file.el
(defun majutsu-blob-edit-exit ()
  "Exit editable blob mode.
If there are unsaved changes, prompt to save or abort, like `wdired-exit'."
  (interactive)
  (unless majutsu-blob-edit-mode
    (user-error "Blob editable mode is not active"))
  (if (majutsu-blob-edit--changed-p)
      (if (y-or-n-p (format "Buffer %s modified; save changes? "
                            (current-buffer)))
          (majutsu-blob-edit-finish)
        (majutsu-blob-edit-abort))
    (majutsu-blob-edit-mode -1)
    (set-buffer-modified-p nil)
    (setq buffer-undo-list nil)
    (message "(No changes need to be saved)")))