# HG changeset patch # User Gerd Moellmann # Date 996579369 0 # Node ID 3dbecf5d82d865178ffbf565b43f7ef8beb7e15d # Parent 4c230c64c6df5ad6eb57bf9fb6f28f7d50fe5ec8 (delete-selection-pre-hook): Don't set this-command to `ignore' if the region is empty. diff -r 4c230c64c6df -r 3dbecf5d82d8 lisp/delsel.el --- a/lisp/delsel.el Tue Jul 31 09:50:56 2001 +0000 +++ b/lisp/delsel.el Tue Jul 31 11:36:09 2001 +0000 @@ -1,6 +1,6 @@ ;;; 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 ;; Maintainer: FSF @@ -96,8 +96,10 @@ (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))))))