]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/delsel.el (delete-selection-pre-hook): Don't propagate the
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 9 Aug 2012 02:18:50 +0000 (22:18 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 9 Aug 2012 02:18:50 +0000 (22:18 -0400)
file-supersession signals.

Fixes: debbugs:12161
lisp/ChangeLog
lisp/delsel.el

index f1039adc1116a74aa33d95d5f9ca7b0d2e90b4cd..5edb41db10079577d4429613b00f0cbc83e4e98c 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * delsel.el (delete-selection-pre-hook): Don't propagate the
+       file-supersession signals (bug#12161).
+
 2012-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/cl.el (cl-map-keymap-recursively, cl-map-intervals)
index d6441123e04f573330a254243d8024062cb5a6ab..a6435672201866ac4e6467adcbccfa0642508dea 100644 (file)
@@ -89,7 +89,8 @@ any selection."
                 ;; head of the kill-ring that really comes from the
                 ;; currently active region we are going to delete.
                 ;; That would make yank a no-op.
-                (when (and (string= (buffer-substring-no-properties (point) (mark))
+                (when (and (string= (buffer-substring-no-properties
+                                      (point) (mark))
                                     (car kill-ring))
                            (fboundp 'mouse-region-match)
                            (mouse-region-match))
@@ -102,16 +103,15 @@ any selection."
                     (setq this-command 'ignore))))
                (type
                 (delete-active-region)
-                (if (and overwrite-mode (eq this-command 'self-insert-command))
+                (if (and overwrite-mode
+                          (eq this-command 'self-insert-command))
                   (let ((overwrite-mode nil))
-                    (self-insert-command (prefix-numeric-value current-prefix-arg))
+                    (self-insert-command
+                      (prefix-numeric-value current-prefix-arg))
                     (setq this-command 'ignore)))))
-       (file-supersession
         ;; If ask-user-about-supersession-threat signals an error,
         ;; stop safe_run_hooks from clearing out pre-command-hook.
-        (and (eq inhibit-quit 'pre-command-hook)
-             (setq inhibit-quit 'delete-selection-dummy))
-        (signal 'file-supersession (cdr data)))
+       (file-supersession (message "%s" (cadr data)) (ding))
        (text-read-only
         ;; This signal may come either from `delete-active-region' or
         ;; `self-insert-command' (when `overwrite-mode' is non-nil).