Function: majutsu-blob-edit-abort

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

Signature

(majutsu-blob-edit-abort)

Documentation

Abort editable blob changes and restore snapshot.

Key Bindings

majutsu-blob-edit-mode-map C-c C-k

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-file.el
(defun majutsu-blob-edit-abort ()
  "Abort editable blob changes and restore snapshot."
  (interactive)
  (unless majutsu-blob-edit-mode
    (user-error "Blob editable mode is not active"))
  (let ((inhibit-read-only t)
        (restore-point (or majutsu-blob-edit--original-point (point-min))))
    (erase-buffer)
    (insert (or majutsu-blob-edit--original-content ""))
    (goto-char (min restore-point (point-max)))
    (set-buffer-modified-p nil))
  (majutsu-blob-edit-mode -1)
  (message "Blob edits aborted"))