Function: forge-post-cancel
forge-post-cancel is an interactive and natively 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
forge-post-mode-map C-c C-k forge-post-mode-map C-x k
Source Code
;; Defined in /nix/store/923zwib42c4qw6x4xps0cv1wi8qcd6lp-emacs-packages-deps/share/emacs/site-lisp/elpa/forge-20261005.753/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)))