🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2189

Re: Cut & paste with mouse?

#2189
From: 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
Technical Details
Message-ID: <1991Feb16.022636.8144@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!uiucdcs!carroll
References: <1991Feb15.162629.3180@vicorp.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,491ee495170dd2cc
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-02-15 19:20:33 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!uiucdcs!carroll
From: carroll@cs.uiuc.edu (Alan M. Carroll)
Newsgroups: gnu.epoch.misc
Subject: Re: Cut & paste with mouse?
Message-ID: <1991Feb16.022636.8144@ux1.cso.uiuc.edu>
Date: 16 Feb 91 02:26:36 GMT
References: <1991Feb15.162629.3180@vicorp.com>
Sender: news@ux1.cso.uiuc.edu (News)
Reply-To: carroll@cs.uiuc.edu (Alan M. Carroll)
Distribution: gnu
Organization: Technophiles Inc. - Engineers with Attitude
Lines: 28