(select-menu-alist): New function.
authormorioka <morioka>
Mon, 27 Apr 1998 19:38:14 +0000 (19:38 +0000)
committermorioka <morioka>
Mon, 27 Apr 1998 19:38:14 +0000 (19:38 +0000)
semi-def.el

index 07ce1ff..1ee674a 100644 (file)
@@ -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.")
 
        ))))
 
 
+;;; @ 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
 ;;;