diff lisp/mouse.el @ 83559:edf631bdbb7a

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-650 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-651 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-652 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-653 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-654 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-655 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-656 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-657 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-658 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-659 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-203 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-204 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-205 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-599
author Karoly Lorentey <karoly@lorentey.hu>
date Sun, 22 Apr 2007 11:42:03 +0000
parents 2854cd09e515
children 91a6d7f7e1a7 dd7c098af727
line wrap: on
line diff
--- a/lisp/mouse.el	Sat Feb 24 20:29:24 2007 +0000
+++ b/lisp/mouse.el	Sun Apr 22 11:42:03 2007 +0000
@@ -1276,7 +1276,17 @@
     (unless ignore
       ;; For certain special keys, delete the region.
       (if (member key mouse-region-delete-keys)
-	  (delete-region (mark t) (point))
+	  (progn
+	    ;; Since notionally this is a separate command,
+	    ;; run all the hooks that would be run if it were
+	    ;; executed separately.
+	    (run-hooks 'post-command-hook)
+	    (setq last-command this-command)
+	    (setq this-original-command 'delete-region)
+	    (setq this-command (or (command-remapping this-original-command)
+				   this-original-command))
+	    (run-hooks 'pre-command-hook)
+	    (call-interactively this-command))
 	;; Otherwise, unread the key so it gets executed normally.
 	(setq unread-command-events
 	      (nconc events unread-command-events))))