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

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

Trapping Quit from x-popup-menu


From: Tim Johnson
Subject: Trapping Quit from x-popup-menu
Date: Fri, 27 Jun 2014 14:44:03 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

Using 
GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
on Ubuntu 12.04

Here is a code snippet :

;; ---------------------------------------------------------
(let ((menu (tj-dir-menu curdir get-hidden))
        choice nextdir
        (default curdir))
    (setq choice
          (x-popup-menu (list '(0 0) (selected-window)) menu))
    (message (concat "choice: " choice))
;; ---------------------------------------------------------

If I quit x-popup-menu without making a selection, than the rest of
the code in the defun - beginning with 

  (message (concat "choice: " choice)

is not executed. 

What is the proper way to trap the call to x-popup-menu so that I
can have some sort of a default value for 'choice?

Thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com



reply via email to

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