From 222695de49d568da41f561c990b9455c31dbb010 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 27 Apr 1998 19:38:14 +0000 Subject: [PATCH] (select-menu-alist): New function. --- semi-def.el | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) 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 ;;; -- 1.7.10.4