Xref: utzoo comp.emacs:9900 gnu.emacs.sources:148 Path: utzoo!utgpu!watserv1!watmath!uunet!samsung!uakari.primate.wisc.edu!crdgw1!news From: news@crdgw1.crd.ge.com (USENET News System) Newsgroups: comp.emacs,gnu.emacs.sources Subject: HERE IT IS: Double-click capabilities for GNU Emacs and Epoch Keywords: double click Emacs Epoch Message-ID: <15917@crdgw1.crd.ge.com> Date: 21 Jan 91 21:06:20 GMT Reply-To: kinstrey@wsqtba.crd.ge.com (M. A. Kinstrey) Followup-To: comp.emacs Distribution: na Organization: General Electric Corp. R&D, Schenectady, NY Lines: 41 From: kinstrey@wsqtba.crd.ge.com (M. A. Kinstrey) Path: wsqtba!kinstrey Several people have posted requests for double-click capabilities in GNU Emacs and Epoch, and since I had written a library to do this last year, I decided to post it. The code works with Epoch 3.2, and GNU "XEmacs" 18.55. Here's a summary of what's available: A "double-click" handler determines whether 2 clicks within 1 second of each other, at the same point location in a buffer, have occurred. Functions can be assigned to the double-click map, as well as "before" and "after" mouse-click hooks. For Epoch, the functions can be executed on mouse-down or mouse-up. I tried to make everything user-configurable. There are 2 .el files: 1) mouse-double-click-functions.el : contains the function definitions and support variable declarations. 2) mouse-double-click.el : this is the front-end for the .el above. To use double-clicks, do a (load-library "mouse-double-click"). The variables are all buffer-local-variables, so you can control which buffers are double-click capable. In addition, you can disable the double-click at any time by turning off the double-clicks-allowed flag. This was initially developed to duplicate the Macintosh MORE II outliner. A double-click on a section of text caused the outline body to "hide". Outline-mode functions in Emacs were tied to the double-click handler, and off I went. Any questions, comments, etc. can be sent to: kinstrey@wsqtba.crd.ge.com kinstrey@crd.ge.com ----------------------------------------------------------------------------- kinstrey@wsqtba.crd.ge.com | Sattinger's Law: uunet!crdgw1!wsqtba!kinstrey| It works better if you plug it in. ____________________________|________________________________________________