 (defvar- *context-menu*
   {:name "Context",
    :content [{:name "Load Context",
-	      :handler (fn [x] (load-context-and-go x read-context))},
+	      :handler #(load-context-and-go % read-context)},
              {:name "Random Context",
               :handler random-context-and-go},
              {:name "Second Operand Context",
               :handler second-op-context-and-go},
              {}
              {:name "Save Context",
-              :content (vec (map (fn [x] {:name (str 
-                                                  (replace-str ":" "" (str x)) 
-                                                  " format"),
-                                          :handler (fn [f]
-                                                     (save-context-and-go f
-                                                                          (fn [c p]
-                                                                            (write-context x c p))))})
+              :content (vec (map (fn [format]
+                                   {:name (str (replace-str ":" "" (str format))
+                                               " format"),
+                                    :handler (fn [frame]
+                                               (save-context-and-go frame
+                                                                    (fn [ctx path]
+                                                                      (write-context format ctx path))))})
                                  (list-context-formats)))},
              {}
              {:name "Show Concept Lattice",

;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.

(ns conexp.contrib.gui.editors.contexts
  (:use conexp.base

        [conexp.contrib.gui.editors.context-editor.util :only (get-current-second-operand-context)]
	conexp.contrib.gui.plugins.base)
  (:use clojure.contrib.swing-utils
	[clojure.contrib.io :exclude (spit)]
        [clojure.contrib.string :only (replace-str title-case)])
  (:import [java.io File]))

