From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Trapping Quit from x-popup-menu Date: Fri, 27 Jun 2014 14:44:03 -0800 Organization: AkWebsoft Message-ID: <20140627224403.GF3163@mail.akwebsoft.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1403909074 8292 80.91.229.3 (27 Jun 2014 22:44:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Jun 2014 22:44:34 +0000 (UTC) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 28 00:44:28 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X0esd-0004v0-Jx for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Jun 2014 00:44:27 +0200 Original-Received: from localhost ([::1]:52810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0esd-0001sG-1k for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Jun 2014 18:44:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0esO-0001sA-5o for Help-gnu-emacs@gnu.org; Fri, 27 Jun 2014 18:44:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0esJ-00046l-ID for Help-gnu-emacs@gnu.org; Fri, 27 Jun 2014 18:44:12 -0400 Original-Received: from 191-232-4-64.mtaonline.net ([64.4.232.191]:56322 helo=tj49.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0esJ-00046X-AI for Help-gnu-emacs@gnu.org; Fri, 27 Jun 2014 18:44:07 -0400 Original-Received: by tj49.com (Postfix, from userid 1000) id A47FB124712; Fri, 27 Jun 2014 14:44:03 -0800 (AKDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98438 Archived-At: 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