]> git.eshelyaron.com Git - emacs.git/commitdiff
Make delete-selection-helper more resilient
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 26 Oct 2020 14:14:53 +0000 (15:14 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 26 Oct 2020 18:15:36 +0000 (19:15 +0100)
* lisp/delsel.el (delete-selection-helper): Don't bug out on `C-g'
(bug#40357).

lisp/delsel.el

index 16886dfdb1256966c8813dc4138dd743a347be53..df2adc7aebab64b72f15e34c877abd8a77d23128 100644 (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))