From: Lars Ingebrigtsen Date: Mon, 26 Oct 2020 14:14:53 +0000 (+0100) Subject: Make delete-selection-helper more resilient X-Git-Tag: emacs-28.0.90~5420 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e8fb4a7cb7d2e460557dfc88d82b289df809a27;p=emacs.git Make delete-selection-helper more resilient * lisp/delsel.el (delete-selection-helper): Don't bug out on `C-g' (bug#40357). --- diff --git a/lisp/delsel.el b/lisp/delsel.el index 16886dfdb12..df2adc7aeba 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -217,6 +217,10 @@ With ARG, repeat that many times. `C-u' means until end of buffer." (self-insert-command (prefix-numeric-value current-prefix-arg)) (setq this-command 'ignore))))) + ;; If the user has quit here (for instance, if the user is + ;; presented with a "changed on disk; really edit the buffer?" + ;; prompt, but hit `C-g'), just ding. + (quit (ding)) ;; If ask-user-about-supersession-threat signals an error, ;; stop safe_run_hooks from clearing out pre-command-hook. (file-supersession (message "%s" (cadr data)) (ding))