[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mouse-show-mark bug
From: |
David PONCE |
Subject: |
mouse-show-mark bug |
Date: |
Thu, 28 Oct 2004 13:57:39 +0200 (CEST) |
Hi,
Since this change:
2004-10-27 Richard M. Stallman <address@hidden>
* mouse.el (mouse-show-mark): Do most processing the same
regardless of transient-mark-mode.
Each time I try to delete a selected region with transient-mark-mode
enabled I get this error:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
delete-region(nil nil)
(if (member key mouse-region-delete-keys) (delete-region
(overlay-start mouse-drag-overlay) (overlay-end mouse-drag-overlay))
(setq unread-command-events (nconc events unread-command-events)))
(if ignore nil (if (member key mouse-region-delete-keys)
(delete-region ... ...) (setq unread-command-events ...)))
(let ((inhibit-quit t) (echo-keystrokes 0) event events key ignore
(x-lost-selection-hooks ...)) (add-hook (quote
x-lost-selection-hooks) (lambda ... ...)) (if transient-mark-mode
(delete-overlay mouse-drag-overlay) (move-overlay mouse-drag-overlay
... ...)) (catch (quote mouse-show-mark) (while ... ...)) (if ignore
nil (if ... ... ...)) (setq quit-flag nil) (unless
transient-mark-mode (delete-overlay mouse-drag-overlay)))
mouse-show-mark()
mouse-drag-region-1((double-down-mouse-1 (#<window 22 on *shell*>
127 (215 . 61) 21028920 nil 127 (26 . 2) nil (7 . 9) (8 . 16)) 2))
mouse-drag-region((double-down-mouse-1 (#<window 22 on *shell*> 127
(215 . 61) 21028920 nil 127 (26 . 2) nil (7 . 9) (8 . 16)) 2))
call-interactively(mouse-drag-region)
This is because at this point mouse-drag-overlay has been deleted.
This patch seems to fix the bug for me. Please could someone review
it?
Regards
David
Index: mouse.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mouse.el,v
retrieving revision 1.252
diff -c -r1.252 mouse.el
*** mouse.el 27 Oct 2004 17:44:59 -0000 1.252
--- mouse.el 28 Oct 2004 11:50:55 -0000
***************
*** 1066,1072 ****
(if ignore
nil
;; For certain special keys, delete the region.
! (if (member key mouse-region-delete-keys)
(delete-region (overlay-start mouse-drag-overlay)
(overlay-end mouse-drag-overlay))
;; Otherwise, unread the key so it gets executed normally.
--- 1066,1073 ----
(if ignore
nil
;; For certain special keys, delete the region.
! (if (and (not transient-mark-mode)
! (member key mouse-region-delete-keys))
(delete-region (overlay-start mouse-drag-overlay)
(overlay-end mouse-drag-overlay))
;; Otherwise, unread the key so it gets executed normally.
- mouse-show-mark bug,
David PONCE <=