From: kenb@dadd.ti.com (Ken Butler)
Subject: Re: Menu and mouse support for News ?
Organization: Texas Instruments, Inc., Dallas, TX
Distribution: alt
Date: Thu, 20 Aug 1992 14:36:21 GMT

Paul,

Regarding "Menu and mouse support for News", you write:

Paul>    Has anyone written some lucid emacs specific code for use with gnus. I
Paul>    like the menu/mouse support someone posted for VM, and am looking for
Paul>    something similar. Is there an FTP site that has all the lucid
Paul>    specific code on it ???? or is it a case of just looking thru the
Paul>    alt.lucid-emacs.help archives ????

Yeah, I did.  Nothing sophisticated, but I guess it was okay since the VM
postings looked similar to what I had posted previously for RMAIL.

Here's what I have so far for RMAIL and GNUS.  The RMAIL I'm using is not
the standard RMAIL but the extended function RMAIL posted by Bob Weiner to
the elisp archive at Ohio State.  It's much better than the old one.

(defun rmail-mouse-summary (event)
  "If no summary buffer exists, make one.  If one exists, delete it."
  (interactive "@e")
  ; (mouse-set-point event)
  (if (not (rmail-summary-displayed))
      (rmail-summary)))

(defun rmail-summary-mouse-goto (event)
  "Set the pointer down, then jump to that message."
  (interactive "@e")
  (mouse-set-point event)
  (rmail-summary-goto-msg)
  (recenter))

(defun rmail-summary-mouse-exit (event)
  "Delete the summary buffer."
  (interactive "@e")
  ; (mouse-set-point event)
  (rmail-summary-exit))

(defun gnus-Subject-mouse-next-page (event)
  "Set the pointer down, then jump to that article if not there."
  (interactive "@e")
  (mouse-set-point event)
  (gnus-Subject-next-page 0)
  (recenter))

(defun gnus-Subject-mouse-catch-up-and-exit (event)
  "Set the pointer down, then catch up the newsgroup and exit."
  (interactive "@e")
  (mouse-set-point event)
  (gnus-Subject-catch-up-and-exit t t))

(defun gnus-Subject-mouse-expand-window (event)
  "Set the pointer down, then catch up the newsgroup and exit."
  (interactive "@e")
  (mouse-set-point event)
  (gnus-Subject-expand-window))

(defun gnus-Group-mouse-select-group (event)
  "Set the pointer down, then jump to that newsgroup if not there."
  (interactive "@e")
  (mouse-set-point event)
  (gnus-Group-select-group nil))

(defun gnus-Group-mouse-catch-up (event)
  "Set the pointer down, then catch up the newsgroup and exit."
  (interactive "@e")
  (mouse-set-point event)
  (gnus-Group-catch-up t t))

Then you'll need something like these in your startup:

(setq gnus-Subject-mode-hook
      (function
       (lambda ()
         (local-set-key 'button1 'gnus-Subject-mouse-next-page)
         (local-set-key 'button2 'gnus-Subject-mouse-catch-up-and-exit)
         (local-set-key 'button3 'gnus-Subject-mouse-expand-window))))
(setq gnus-Group-mode-hook
      (function
       (lambda ()
         (local-set-key 'button1 'gnus-Group-mouse-select-group)
         (local-set-key 'button2 'gnus-Group-mouse-catch-up))))
(setq rmail-summary-mode-hook
      '(lambda ()
         (local-set-key 'button1 'rmail-summary-mouse-goto)
         (local-set-key 'button3 'rmail-summary-mouse-exit)))
(setq rmail-mode-hook
      '(lambda ()
         (local-set-key 'button3 'rmail-mouse-summary)))

Hope that this helps.

Ken
--

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Kenneth M. Butler                           (214) 997-6370 (office)
Texas Instruments                           (214) 997-2049 (FAX)
P.O. Box 655303 MS 3683                     kenb@dadd.ti.com
Dallas, TX 75265
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Newsgroups: alt.lucid-emacs.help