]> git.eshelyaron.com Git - emacs.git/commitdiff
Create mouse-drag-overlay as a dead overlay, instead
authorKarl Heuer <kwzh@gnu.org>
Fri, 14 Apr 1995 22:39:19 +0000 (22:39 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 14 Apr 1995 22:39:19 +0000 (22:39 +0000)
of having it live in the *scratch* buffer until first used.

lisp/mouse.el

index d75ee90b40c458cc2e25f5508fa194484d42b5f4..a889706f3f71933bf64bc668ed7853523d5d8075 100644 (file)
@@ -371,7 +371,9 @@ Upon exit, point is at the far edge of the newly visible text."
     (or (eq window (selected-window))
        (goto-char opoint))))
 
+;; Create an overlay and immediately delete it, to get "overlay in no buffer".
 (defvar mouse-drag-overlay (make-overlay 1 1))
+(delete-overlay mouse-drag-overlay)
 (overlay-put mouse-drag-overlay 'face 'region)
 
 (defvar mouse-selection-click-count 0)