Subject: bug#49869: Revert buffer? Yes/No/Maybe

From: Gregory Heytings <[email-masked]>
Date: Thu, 05 Aug 2021 11:08:12 +0000

>
> Perhaps there should be a user option to customise the level of 
> prompting here.
>

Like this:

(defcustom revert-buffer-short-answer nil "")

(defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes)
   (interactive (list (not current-prefix-arg)))
   (if revert-buffer-short-answer
       (let ((use-short-answers t)
 	    (noconfirm (not (buffer-modified-p))))
 	(revert-buffer ignore-auto noconfirm preserve-modes))
     (revert-buffer ignore-auto noconfirm preserve-modes)))

(global-set-key (kbd "C-x x g") 'revert-buffer-short-answer)

?