From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18200 Path: main.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.gnus.general Subject: Re: MIME popup menus Date: Mon, 26 Oct 1998 18:34:43 GMT Organization: Carnegie Mellon University : KANTOO Project Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035156766 4921 80.91.224.250 (20 Oct 2002 23:32:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:32:46 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id NAA24714 for ; Mon, 26 Oct 1998 13:36:11 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id MAB03675; Mon, 26 Oct 1998 12:35:48 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 26 Oct 1998 12:35:12 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id MAA25705 for ; Mon, 26 Oct 1998 12:35:03 -0600 (CST) Original-Received: from sunsite.auc.dk (sunsite.auc.dk [130.225.51.30]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id NAA24667 for ; Mon, 26 Oct 1998 13:34:59 -0500 (EST) Original-Received: (qmail 29366 invoked by uid 509); 26 Oct 1998 18:34:58 -0000 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: emacs.ding Original-Lines: 30 User-Agent: Gnus/5.07004 (Pterodactyl Gnus v0.40) Emacs/20.3 Original-NNTP-Posting-Host: 128.2.110.42 Original-X-Complaints-To: news@sunsite.auc.dk Original-X-Trace: sunsite.auc.dk 909426883 128.2.110.42 (Mon, 26 Oct 1998 19:34:43 MET DST) Original-NNTP-Posting-Date: Mon, 26 Oct 1998 19:34:43 MET DST Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18200 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18200 Michael Welsh Duggan writes: > Lars Magne Ingebrigtsen 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) .