<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -71,6 +71,9 @@
 ;; 
 ;;; History:
 ;;
+;; 2008/10/12 - Added some fixes that should make byte-compiling work
+;;   and make the menu switch on iswitchb-mode temporarily if needed.
+;;
 ;; Release 1.0 - 2008/10/04 - Set last-command-event when selecting
 ;;   menu items this means &quot;Paste from kill menu&quot; now works and
 ;;   possibly fixes some other issues.  As far as I can tell, the code
@@ -90,7 +93,8 @@
 
 ;;; Code:
 (eval-when-compile (require 'cl))
-
+(require 'cl)
+(require 'iswitchb)
 (require 'tmm)
 
 (defgroup iswitch-menu nil
@@ -135,13 +139,21 @@ this means all `text-mode' menus will use iswitch-menu&quot;
   &quot;Display a non-nested menu (using `iswitchb').
 PROMPT is a string and ITEMS is an alist of options ((TITLE
 . SOMETHING) ...).  Return the selected cons.&quot;
-  (setq iswitch-menu-last-single-prompt items)
-  (let ((iswitchb-make-buflist-hook
-	 (lambda ()
-	   (setq iswitchb-temp-buflist (mapcar #'car items)))))
-    (let ((r (assoc (iswitchb-read-buffer prompt) items)))
-      (setq last-command-event (car r)) ; this is used by &quot;edit &gt; paste from kill menu&quot; &amp; others
-      r)))
+  (let ((mode-on iswitchb-mode))
+    (unless mode-on
+      (iswitchb-mode 1))
+    (unwind-protect
+	(progn
+	  (setq iswitch-menu-last-single-prompt items)
+	  (let ((iswitchb-make-buflist-hook
+		 (lambda ()
+		   (setq iswitchb-temp-buflist (mapcar #'car items)))))
+	    (let ((r (assoc (iswitchb-read-buffer prompt) items)))
+	      (setq last-command-event (car r)) ; this is used by &quot;edit &gt; paste from kill menu&quot; &amp; others
+	      r)))
+      (unless mode-on
+	(iswitchb-mode -1)
+	nil))))
 
 (defun iswitch-menu-nested-prompt (prompt items)
   &quot;Display a possibly nested menu (using `iswitchb').
@@ -233,7 +245,7 @@ See also the elisp manual section on Extended Menu Items.&quot;
       (remove-if #'null (mapcar #'iswitch-menu-parse-menu-item keymap)))))
 
 
-(defun iswitch-menu-prompt (menu &amp;rest)
+(defun iswitch-menu-prompt (menu &amp;rest ignore)
   &quot;A drop-in replacement for `tmm-prompt' and `x-popup-menu' using `iswitchb'.
 Should make using MENUs from the console / keyboard faster and
 more comfortable.&quot;</diff>
      <filename>iswitch-menu.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7cbb84c772f2cd03920e457f8a9b1e6516241927</id>
    </parent>
    <parent>
      <id>af82a6f3230c6ff4c1949b0401e5313703430db8</id>
    </parent>
  </parents>
  <author>
    <name>Joost Diepenmaat</name>
    <email>joost@zeekat.nl</email>
  </author>
  <url>http://github.com/joodie/iswitch-menu/commit/a3087799e4cdb80203a92c2b63da10b85d60b8f6</url>
  <id>a3087799e4cdb80203a92c2b63da10b85d60b8f6</id>
  <committed-date>2008-10-14T04:30:43-07:00</committed-date>
  <authored-date>2008-10-14T04:30:43-07:00</authored-date>
  <message>merge</message>
  <tree>b1c54de0b7787577d3359a9d06058e01576a0a6f</tree>
  <committer>
    <name>Joost Diepenmaat</name>
    <email>joost@zeekat.nl</email>
  </committer>
</commit>
