Function: forge-post-cancel

forge-post-cancel is an interactive and byte-compiled function defined in forge-post.el.

Signature

(forge-post-cancel)

Documentation

Cancel the post that is being edited in the current buffer.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-post.el
(defun forge-post-cancel ()
  "Cancel the post that is being edited in the current buffer."
  (interactive)
  (save-buffer)
  (let ((winconf forge--pre-post-winconf))
    (when (yes-or-no-p "Also delete draft? ")
      (dired-delete-file buffer-file-name nil magit-delete-by-moving-to-trash))
    (magit-mode-bury-buffer 'kill)
    (forge--maybe-restore-winconf winconf)))