* MIME popup menus
@ 1998-10-24 23:08 Lars Magne Ingebrigtsen
1998-10-26 17:19 ` Michael Welsh Duggan
0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-24 23:08 UTC (permalink / raw)
I don't really use menus and mice and stuff, so could someone (else)
write `gnus-mime-button-menu' for Emacs 20? The stub for this
function is in gnus-art.el, and the XEmacs implementation is
`gnus-xmas-mime-button-menu' in gnus-xmas.el.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@ifi.uio.no * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MIME popup menus
1998-10-24 23:08 MIME popup menus Lars Magne Ingebrigtsen
@ 1998-10-26 17:19 ` Michael Welsh Duggan
1998-10-26 18:34 ` Michael Welsh Duggan
1998-10-26 21:09 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Michael Welsh Duggan @ 1998-10-26 17:19 UTC (permalink / raw)
Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
> I don't really use menus and mice and stuff, so could someone (else)
> write `gnus-mime-button-menu' for Emacs 20? The stub for this
> function is in gnus-art.el, and the XEmacs implementation is
> `gnus-xmas-mime-button-menu' in gnus-xmas.el.
Does the following work?
(defun gnus-mime-button-menu (event)
"Construct a context-sensitive menu of MIME commands."
(interactive "e")
(let ((reponse (x-popup-menu
t `("MIME Part"
("" ,@(mapcar (lambda (c)
(cons (caddr c) (car c)))
gnus-mime-button-commands)))))
(pos (event-start event)))
(set-buffer (window-buffer (posn-window pos)))
(goto-char (posn-point pos))
(funcall response)))
--
Michael Duggan
(md5i@cs.cmu.edu)
.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MIME popup menus
1998-10-26 17:19 ` Michael Welsh Duggan
@ 1998-10-26 18:34 ` Michael Welsh Duggan
1998-10-26 21:09 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Michael Welsh Duggan @ 1998-10-26 18:34 UTC (permalink / raw)
Michael Welsh Duggan <md5i@cs.cmu.edu> writes:
> Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
>
> > I don't really use menus and mice and stuff, so could someone (else)
> > write `gnus-mime-button-menu' for Emacs 20? The stub for this
> > function is in gnus-art.el, and the XEmacs implementation is
> > `gnus-xmas-mime-button-menu' in gnus-xmas.el.
>
> Does the following work?
>
> (defun gnus-mime-button-menu (event)
> "Construct a context-sensitive menu of MIME commands."
> (interactive "e")
> (let ((reponse (x-popup-menu
> t `("MIME Part"
> ("" ,@(mapcar (lambda (c)
> (cons (caddr c) (car c)))
> gnus-mime-button-commands)))))
> (pos (event-start event)))
> (set-buffer (window-buffer (posn-window pos)))
> (goto-char (posn-point pos))
> (funcall response)))
Oops. I just realized this will fail if you cancel the popup-menu.
You need to check and see if result is nil to use this.
--
Michael Duggan
(md5i@cs.cmu.edu)
.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MIME popup menus
1998-10-26 17:19 ` Michael Welsh Duggan
1998-10-26 18:34 ` Michael Welsh Duggan
@ 1998-10-26 21:09 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-26 21:09 UTC (permalink / raw)
Michael Welsh Duggan <md5i@cs.cmu.edu> writes:
> Does the following work?
Yup; thanks. I've installed this in 0.41.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-10-26 21:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-24 23:08 MIME popup menus Lars Magne Ingebrigtsen
1998-10-26 17:19 ` Michael Welsh Duggan
1998-10-26 18:34 ` Michael Welsh Duggan
1998-10-26 21:09 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).