all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trapping Quit from x-popup-menu
@ 2014-06-27 22:44 Tim Johnson
  2014-06-29 20:56 ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Johnson @ 2014-06-27 22:44 UTC (permalink / raw)
  To: Emacs

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-30 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-27 22:44 Trapping Quit from x-popup-menu Tim Johnson
2014-06-29 20:56 ` Michael Heerdegen
2014-06-30  0:07   ` Tim Johnson
2014-06-30  2:15     ` Drew Adams
2014-06-30 15:33       ` Michael Heerdegen
2014-06-30 15:43         ` Eli Zaretskii
2014-06-30 19:18     ` Tim Johnson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.