Add aliases for the old x-FOO commands.
authorChris Hanson <org/chris-hanson/cph>
Wed, 26 Oct 1994 01:33:47 +0000 (01:33 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 26 Oct 1994 01:33:47 +0000 (01:33 +0000)
v7/src/edwin/xcom.scm

index 737455a20c1ba95f6af6d9be44d15221e15a0b36..9c91f46532f15414f2cb1a3e447699bce03e6ec6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: xcom.scm,v 1.11 1994/10/25 01:46:12 adams Exp $
+;;;    $Id: xcom.scm,v 1.12 1994/10/26 01:33:47 cph Exp $
 ;;;
 ;;;    Copyright (c) 1989-94 Massachusetts Institute of Technology
 ;;;
@@ -314,88 +314,36 @@ When called interactively, completion is available on the input."
      "xterm"))
 
 \f
-;;;;;; Mouse Commands
-;;
-;;  Now taken care of in mousecom.scm
-;;
-;;(define-command x-mouse-select
-;;  "Select window the mouse is on."
-;;  ()
-;;  (lambda ()
-;;    (select-window (button-event/window (current-button-event)))))
-;;
-;;(define-command x-mouse-keep-one-window
-;;  "Select window mouse is on, then kill all other windows."
-;;  ()
-;;  (lambda ()
-;;    ((ref-command x-mouse-select))
-;;    ((ref-command delete-other-windows))))
-;;
-;;(define-command x-mouse-select-and-split
-;;  "Select window mouse is on, then split it vertically in half."
-;;  ()
-;;  (lambda ()
-;;    ((ref-command x-mouse-select))
-;;    ((ref-command split-window-vertically) false)))
-;;
-;;(define-command x-mouse-set-point
-;;  "Select window mouse is on, and move point to mouse position."
-;;  ()
-;;  (lambda ()
-;;    (let ((button-event (current-button-event)))
-;;      (let ((window (button-event/window button-event)))
-;;     (select-window window)
-;;     (set-current-point!
-;;      (or (window-coordinates->mark window
-;;                                    (button-event/x button-event)
-;;                                    (button-event/y button-event))
-;;          (buffer-end (window-buffer window))))))))
-;;
-;;(define-command x-mouse-set-mark
-;;  "Select window mouse is on, and set mark at mouse position.
-;;Display cursor at that position for a second."
-;;  ()
-;;  (lambda ()
-;;    (let ((button-event (current-button-event)))
-;;      (let ((window (button-event/window button-event)))
-;;     (select-window window)
-;;     (let ((mark
-;;            (or (window-coordinates->mark window
-;;                                          (button-event/x button-event)
-;;                                          (button-event/y button-event))
-;;                (buffer-end (window-buffer window)))))
-;;       (push-current-mark! mark)
-;;       (mark-flash mark))))))
-;;
-;;(define-command x-mouse-show-event
-;;  "Show the mouse position in the minibuffer."
-;;  ()
-;;  (lambda ()
-;;    (let ((button-event (current-button-event)))
-;;      (message "window: " (button-event/window button-event)
-;;            " x: " (button-event/x button-event)
-;;            " y: " (button-event/y button-event)))))
-;;
-;;(define-command x-mouse-ignore
-;;  "Don't do anything."
-;;  ()
-;;  (lambda () unspecific))
-;;
-;;(define x-button1-down (make-down-button 0))
-;;(define x-button2-down (make-down-button 1))
-;;(define x-button3-down (make-down-button 2))
-;;(define x-button4-down (make-down-button 3))
-;;(define x-button5-down (make-down-button 4))
-;;(define x-button1-up (make-up-button 0))
-;;(define x-button2-up (make-up-button 1))
-;;(define x-button3-up (make-up-button 2))
-;;(define x-button4-up (make-up-button 3))
-;;(define x-button5-up (make-up-button 4))
-;;
-;;(define-key 'fundamental x-button1-down 'x-mouse-set-point)
-
-
-;; X compatibility
+;;;; Mouse Commands
+;;; (For compatibility with old code.)
+
+(define edwin-command$x-mouse-select
+  (copy-command 'X-MOUSE-SELECT
+               (ref-command-object mouse-select)))
+
+(define edwin-command$x-mouse-keep-one-window
+  (copy-command 'X-MOUSE-KEEP-ONE-WINDOW
+               (ref-command-object mouse-keep-one-window)))
+
+(define edwin-command$x-mouse-select-and-split
+  (copy-command 'X-MOUSE-SELECT-AND-SPLIT
+               (ref-command-object mouse-select-and-split)))
+
+(define edwin-command$x-mouse-set-point
+  (copy-command 'X-MOUSE-SET-POINT
+               (ref-command-object mouse-set-point)))
+
+(define edwin-command$x-mouse-set-mark
+  (copy-command 'X-MOUSE-SET-MARK
+               (ref-command-object mouse-set-mark)))
+
+(define edwin-command$x-mouse-show-event
+  (copy-command 'X-MOUSE-SHOW-EVENT
+               (ref-command-object mouse-show-event)))
+
+(define edwin-command$x-mouse-ignore
+  (copy-command 'X-MOUSE-IGNORE
+               (ref-command-object mouse-ignore)))
 
 (define x-button1-down button1-down)
 (define x-button2-down button2-down)
@@ -406,4 +354,4 @@ When called interactively, completion is available on the input."
 (define x-button2-up button2-up)
 (define x-button3-up button3-up)
 (define x-button4-up button4-up)
-(define x-button5-up button5-up)
+(define x-button5-up button5-up)
\ No newline at end of file