2001-07-31 Gerd Moellmann <gerd@gnu.org>
+ * delsel.el (delete-selection-pre-hook): Don't set this-command
+ to `ignore' if the region is empty.
+
* international/mule.el (set-keyboard-coding-system): Set
keyboard-coding-system.
;;; delsel.el --- delete selection if you insert
-;; Copyright (C) 1992, 1997, 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1997, 1998, 2001 Free Software Foundation, Inc.
;; Author: Matthieu Devin <devin@lucid.com>
;; Maintainer: FSF
(current-kill 1))
(delete-active-region))
((eq type 'supersede)
- (delete-active-region)
- (setq this-command 'ignore))
+ (let ((empty-region (= (point) (mark))))
+ (delete-active-region)
+ (unless empty-region
+ (setq this-command 'ignore))))
(type
(delete-active-region))))))