help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example using x-popup-menu needed


From: Martin Stemplinger
Subject: Re: Example using x-popup-menu needed
Date: Sat, 18 Oct 2003 15:45:39 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (windows-nt)

On Fr Okt 17 2003 at 22:14, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> You mean (x-popup-menu
>           t (list menu-title
>                   (cons menu-title
>                         (mapcar (lambda (item)
>                                   (if (consp item) item
>                                     (cons item item)))
>                                 item-list))))
>
>
> You mean
>
>   (call-interactively
>    (choose-from-menu "Commands"
>                      '(("Copy             C-insert" . copy-region-as-kill)
>                        ("Goto Line"                 . goto-line)
>                        ("Paste/Yank       S-insert" . yank)
>                        ("Redo"                      . redo)
>                        ("Search Files"              . grep)
>                        ("Undo             C-_"      . undo)
>                        ("Word Completion  M-/"      . dabbrev-expand))))
>
>>    (global-set-key [mouse-3] 'right-popup)
>
> If you define `right-popup' as a menu keymap, you'll save yourself
> the trouble of calling the commands and you'll get the hotkeys for free.
>
>
>         Stefan

Would you mind to post a complete example? I tried to insert your code
but obviously made some mistake :-(

Thanks
Martin
-- 
Remove NOSPAM to reply by mail


reply via email to

[Prev in Thread] Current Thread [Next in Thread]