]> code.delx.au - gnu-emacs/blobdiff - lisp/mouse.el
(idl-mode-hook): New variable.
[gnu-emacs] / lisp / mouse.el
index 29bc077218d9e6b23b81e1c0eb64b65fea941418..d760c437bf74f1da6d72d6894b26a9ae8d252260 100644 (file)
@@ -726,7 +726,9 @@ If DIR is positive skip forward; if negative, skip backward."
         (modifiers (delq 'double (delq 'triple (copy-sequence old-modifiers))))
         (new
          (if (consp event)
-             (cons (event-convert-list (nreverse (cons basic old-modifiers)))
+             ;; Use reverse, not nreverse, since event-modifiers
+             ;; does not copy the list it returns.
+             (cons (event-convert-list (reverse (cons basic modifiers)))
                    (cdr event))
            event)))
     (setcar last new)
@@ -757,12 +759,14 @@ If DIR is positive skip forward; if negative, skip backward."
                                  (throw 'mouse-show-mark t)))))
          (move-overlay mouse-drag-overlay (point) (mark t))
          (catch 'mouse-show-mark
-           ;; In this loop, read and execute scroll bar events.
-           ;; Otherwise, if we 
+           ;; In this loop, execute scroll bar and switch-frame events.
+           ;; Also ignore down-events that are undefined.
            (while (progn (setq event (read-event))
                          (setq events (append events (list event)))
                          (setq key (apply 'vector events))
                          (or (and (consp event)
+                                  (eq (car event) 'switch-frame))
+                             (and (consp event)
                                   (eq (posn-point (event-end event))
                                       'vertical-scroll-bar))
                              (and (memq 'down (event-modifiers event))
@@ -770,8 +774,9 @@ If DIR is positive skip forward; if negative, skip backward."
                                   (not (mouse-undouble-last-event events))
                                   (not (member key mouse-region-delete-keys)))))
              (and (consp event)
-                  (eq (posn-point (event-end event))
-                      'vertical-scroll-bar)
+                  (or (eq (car event) 'switch-frame)
+                      (eq (posn-point (event-end event))
+                          'vertical-scroll-bar))
                   (let ((keys (vector 'vertical-scroll-bar event)))
                     (and (key-binding keys)
                          (progn