[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/delsel.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/delsel.el |
Date: |
Mon, 19 Nov 2001 01:21:12 -0500 |
Index: emacs/lisp/delsel.el
diff -u emacs/lisp/delsel.el:1.28 emacs/lisp/delsel.el:1.29
--- emacs/lisp/delsel.el:1.28 Tue Jul 31 07:36:09 2001
+++ emacs/lisp/delsel.el Mon Nov 19 01:21:11 2001
@@ -84,24 +84,31 @@
(not buffer-read-only))
(let ((type (and (symbolp this-command)
(get this-command 'delete-selection))))
- (cond ((eq type 'kill)
- (delete-active-region t))
- ((eq type 'yank)
- ;; Before a yank command,
- ;; make sure we don't yank the same region
- ;; that we are going to delete.
- ;; That would make yank a no-op.
- (when (string= (buffer-substring-no-properties (point) (mark))
- (car kill-ring))
- (current-kill 1))
- (delete-active-region))
- ((eq type 'supersede)
- (let ((empty-region (= (point) (mark))))
- (delete-active-region)
- (unless empty-region
- (setq this-command 'ignore))))
- (type
- (delete-active-region))))))
+ (condition-case data
+ (cond ((eq type 'kill)
+ (delete-active-region t))
+ ((eq type 'yank)
+ ;; Before a yank command,
+ ;; make sure we don't yank the same region
+ ;; that we are going to delete.
+ ;; That would make yank a no-op.
+ (when (string= (buffer-substring-no-properties (point) (mark))
+ (car kill-ring))
+ (current-kill 1))
+ (delete-active-region))
+ ((eq type 'supersede)
+ (let ((empty-region (= (point) (mark))))
+ (delete-active-region)
+ (unless empty-region
+ (setq this-command 'ignore))))
+ (type
+ (delete-active-region)))
+ (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)))))))
(put 'self-insert-command 'delete-selection t)
(put 'self-insert-iso 'delete-selection t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/delsel.el,
Richard M. Stallman <=