emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109521: * lisp/delsel.el (delete-sel


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109521: * lisp/delsel.el (delete-selection-pre-hook): Don't propagate the
Date: Wed, 08 Aug 2012 22:18:50 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109521
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12161
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2012-08-08 22:18:50 -0400
message:
  * lisp/delsel.el (delete-selection-pre-hook): Don't propagate the
  file-supersession signals.
modified:
  lisp/ChangeLog
  lisp/delsel.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-08-08 18:56:01 +0000
+++ b/lisp/ChangeLog    2012-08-09 02:18:50 +0000
@@ -1,3 +1,8 @@
+2012-08-09  Stefan Monnier  <address@hidden>
+
+       * delsel.el (delete-selection-pre-hook): Don't propagate the
+       file-supersession signals (bug#12161).
+
 2012-08-08  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/cl.el (cl-map-keymap-recursively, cl-map-intervals)

=== modified file 'lisp/delsel.el'
--- a/lisp/delsel.el    2012-01-19 07:21:25 +0000
+++ b/lisp/delsel.el    2012-08-09 02:18:50 +0000
@@ -89,7 +89,8 @@
                 ;; 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 @@
                     (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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]