Make delete-selection-helper more resilient

* lisp/delsel.el (delete-selection-helper): Don't bug out on `C-g'
(bug#40357).
This commit is contained in:
Lars Ingebrigtsen 2020-10-26 15:14:53 +01:00
parent d23e483cfb
commit 9e8fb4a7cb

View file

@ -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))