Commit 10e922bd authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(delete-selection-pre-hook): Don't set this-command

to `ignore' if the region is empty.
parent b23bad0b
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
......@@ -96,8 +96,10 @@ any selection."
(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))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment