]> code.delx.au - gnu-emacs/blobdiff - lisp/delsel.el
(normal-splash-screen, fancy-splash-screens-1): Add a reference to the Lisp
[gnu-emacs] / lisp / delsel.el
index 74ef011d47797bd583bdd68fbd0eb5730cea5320..278849233b71aede823040f6607c340fd6cf422a 100644 (file)
@@ -1,7 +1,7 @@
 ;;; delsel.el --- delete selection if you insert
 
 ;; Copyright (C) 1992, 1997, 1998, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Matthieu Devin <devin@lucid.com>
 ;; Maintainer: FSF
@@ -101,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.