From: morioka Date: Mon, 27 Apr 1998 19:38:14 +0000 (+0000) Subject: (select-menu-alist): New function. X-Git-Tag: semi-1_3_3~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=222695de49d568da41f561c990b9455c31dbb010;p=elisp%2Fsemi.git (select-menu-alist): New function. --- diff --git a/semi-def.el b/semi-def.el index 07ce1ff..1ee674a 100644 --- a/semi-def.el +++ b/semi-def.el @@ -26,6 +26,9 @@ (require 'emu) +(eval-when-compile (require 'cl)) + + (defconst mime-module-version '("SEMI" "Uramoto" 1 3 3) "Implementation name, version name and numbers of MIME-kernel package.") @@ -121,6 +124,43 @@ )))) +;;; @ menu +;;; + +(if window-system + (if (featurep 'xemacs) + (defun select-menu-alist (title menu-alist) + (let (ret) + (popup-menu + (list* title + "---" + (mapcar (function + (lambda (cell) + (vector (car cell) + `(progn + (setq ret ',(cdr cell)) + (throw 'exit nil) + ) + t) + )) + menu-alist) + )) + (recursive-edit) + ret)) + (defun select-menu-alist (title menu-alist) + (x-popup-menu + (list '(1 1) (selected-window)) + (list title (cons title menu-alist)) + )) + ) + (defun select-menu-alist (title menu-alist) + (cdr + (assoc (completing-read (concat title " : ") menu-alist) + menu-alist) + )) + ) + + ;;; @ PGP ;;;