home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!jvnc.net!darwin.sura.net!zaphod.mps.ohio-state.edu!rphroy!kocrsv01!c23mts
- From: c23mts@kocrsv01.delcoelect.com (Mike Scheidler)
- Newsgroups: alt.lucid-emacs.help
- Subject: Mouse enhancements for buffer-menu mode
- Message-ID: <1992Aug26.165853.22947@kocrsv01.delcoelect.com>
- Date: 26 Aug 92 16:58:53 GMT
- Sender: news@kocrsv01.delcoelect.com (Usenet News Account)
- Reply-To: c23mts@kocrsv01.delcoelect.com
- Organization: Delco Electronics Corp.
- Lines: 39
- Originator: c23mts@kocrsw12
-
-
- Here are a couple of mouse-based functions I use with buffer menu mode.
- They're not elegant or complicated, but they make my life a little easier.
-
- I have these new functions mapped to buttons 2 and 3, keeping the default
- mapping for button 1. This lets me switch to the buffer menu window with a
- click of button 1 whenever I want to do other buffer menu operations.
-
- Clicking button 2 on a buffer menu line will switch to that buffer, closing
- all other windows on that screen. (This is just like pressing '1' on the
- line). Clicking button 3 in a similar manner will cause the selected buffer
- to come up in a new screen and switch focus there.
-
-
- (defun Buffer-mouse-1-window (event)
- "Switch to buffer in 1 window using mouse."
- (interactive "@e")
- (select-window (event-window event))
- (mouse-set-point event)
- (switch-to-buffer (Buffer-menu-buffer t))
- (bury-buffer (other-buffer))
- (delete-other-windows))
-
- (defun Buffer-mouse-new-screen (event)
- "Switch to buffer in a new screen using mouse."
- (interactive "@e")
- (select-window (event-window event))
- (mouse-set-point event)
- (select-screen (new-screen))
- (switch-to-buffer (Buffer-menu-buffer t)))
-
- (define-key Buffer-menu-mode-map 'button2 'Buffer-mouse-1-window)
- (define-key Buffer-menu-mode-map 'button3 'Buffer-mouse-new-screen)
-
- --
- Mike Scheidler INTERNET: c23mts@kocrsv01.delcoelect.com
- Software Technology UUCP: deaes!c23mts
- Delco Electronics Corporation PHONE: (317) 451-0642
- Kokomo, IN 46904 GMNET: 8-322-0642
-