🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Scott Reed Fri, 15 Feb 1991 16:26
Cut & paste with mouse?
#2182
Author: Scott Reed
Date: Fri, 15 Feb 1991 16:26
9 lines
774 bytes
I would like to be able to cut and paste with the mouse. I can
paste but cannot cut. 

I'd like to be able to drag with the left button to mark text, 
cut with the right button, and paste with the middle one.

Anyone able to help me?

               - scott
Re: Cut & paste with mouse?
#2189
Author: Alan M. Carroll
Date: Sat, 16 Feb 1991 02:26
28 lines
1772 bytes
In article <1991Feb15.162629.3180@vicorp.com>, scott@vicorp.com (Scott Reed) writes:
> I would like to be able to cut and paste with the mouse. I can
> paste but cannot cut. 
> 
> I'd like to be able to drag with the left button to mark text, 
> cut with the right button, and paste with the middle one.

I'm not sure what exactly you want, but the following code will cause
the mouse right button to cut (and put in the cut buffer) the
currently swept region.

(defun mouse::cut-region (marg)
  (when (buttonp drag-button)
    (mouse::copy-button drag-button)
    (save-excursion (set-buffer (button-buffer drag-button))
      (delete-region (button-start drag-button) (button-end drag-button))
    )
    (delete-button drag-button)
    (setq drag-button nil)
))
(local-set-mouse mouse-right mouse-down 'mouse::cut-region)
(local-set-mouse mouse-right mouse-up nil)


-- 
Alan M. Carroll                "I hate shopping with the reality-impaired"
Epoch Development Team                 - Susan
CS Grad / U of Ill @ Urbana    ...{ucbvax,pur-ee,convex}!cs.uiuc.edu!carroll
Re: Cut & paste with mouse?
#2211
Author: Martin Green KR260_x7060
Date: Mon, 18 Feb 1991 14:52
60 lines
2778 bytes
In article <1991Feb15.162629.3180@vicorp.com> scott@vicorp.com (Scott Reed) writes:
>I would like to be able to cut and paste with the mouse. I can
>paste but cannot cut. 
>
>I'd like to be able to drag with the left button to mark text, 
>cut with the right button, and paste with the middle one.

The mouse can invoke a wide range of functions.  I load the following when
starting epoch:

(setq auto-raise-screen nil)
(require 'mini-cl)
(require 'wrapper)
(require 'epoch-util)
(require 'epoch)	
(require 'event)
(require 'button)
(require 'mouse)
(require 'motion)
(require 'property)
(require 'message)
(require 'server)		;; not dumped - this will always load
(defun mouse-buffer-other-screen (arg)
  (call-interactively 'find-buffer-other-screen)
  (title (concat (buffer-name (current-buffer)) (sys-name)) (current-screen))
  (icon-name (title) (current-screen))
  (epoch::raise-screen (current-screen))
  )
(defun mouse-file-other-screen (arg)
  (call-interactively 'find-file-other-screen)
  )
(defun mouse-remove-screen (arg)
  (call-interactively 'remove-screen)
  )
(defun mouse-switch-screen (arg)
  (call-interactively 'switch-screen)
  (epoch::raise-screen (current-screen))
  )
(defun mouse-duplicate-screen (arg)
  (call-interactively 'duplicate-screen)
  )
(defun mouse-iconify-screen (arg)
  (call-interactively 'iconify-screen)
  )
(defun mouse-delete-region (arg)
  (call-interactively 'delete-region)
  )
(global-set-mouse mouse-middle mouse-shift 'mouse-delete-region)
(global-set-mouse mouse-left mouse-shift 'mouse-buffer-other-screen)
(global-set-mouse mouse-left mouse-control 'mouse-file-other-screen)
(global-set-mouse mouse-left mouse-control-shift 'mouse-remove-screen)
(global-set-mouse mouse-right mouse-shift 'mouse-switch-screen)
(global-set-mouse mouse-right mouse-control 'mouse-duplicate-screen)
(global-set-mouse mouse-right mouse-control-shift 'mouse-iconify-screen)

-- 
Martin Green                        UUCP     :  ..!torsqnt!ohrd!green
Ontario Hydro Research Division     Telephone:  (416)231-4111 Ext7060
800 Kipling Ave
Toronto, Ontario, CANADA, M8Z5S4
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads