summaryrefslogtreecommitdiff
path: root/lisp/delsel.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-08-26 09:51:52 +0000
committerMiles Bader <miles@gnu.org>2005-08-26 09:51:52 +0000
commitd4cccb140682cfa548a8658f905764ceb4a38cb2 (patch)
tree5230af18ee25b37efed50fa38cac1eefb47d03fc /lisp/delsel.el
parent5e10f34207ff594cd6570928bc0292a7b53297b8 (diff)
parentf3f01d5df3156fb408b43da0c670796c37ed084f (diff)
downloademacs-d4cccb140682cfa548a8658f905764ceb4a38cb2.tar.gz
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 514-518) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 104-105) - Update from CVS
Diffstat (limited to 'lisp/delsel.el')
-rw-r--r--lisp/delsel.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 483c2e2c599..d7a3d90e969 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -1,6 +1,7 @@
;;; delsel.el --- delete selection if you insert
-;; Copyright (C) 1992, 1997, 1998, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1997, 1998, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Matthieu Devin <devin@lucid.com>
;; Maintainer: FSF
@@ -100,7 +101,11 @@ any selection."
(unless empty-region
(setq this-command 'ignore))))
(type
- (delete-active-region)))
+ (delete-active-region)
+ (if (and overwrite-mode (eq this-command 'self-insert-command))
+ (let ((overwrite-mode nil))
+ (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.