Re: sawfish 1.6.3 can't compile sawfish.wm.util.prompt



On 24/05/10 18:17, Jeremy Hankins wrote:
I haven't been able to come up with another solution, though. If I
include defvar statements in the eval-when-compile clause the original
compiler warnings show up again. If it's a choice between removing the
eval-when-compile clause entirely and including prompt from itself, I
lean toward the former since we know what's causing the warnings and
that they're spurious.
Including the defvar in eval-when-compile is a good idea, and that works. Naively trying what you suggested I see the problem you're seeing too, but that's easily fixed: just make sure they're in a progn: eval-when-compile only takes a single argument.

diff --git a/lisp/sawfish/wm/util/prompt.jl b/lisp/sawfish/wm/util/prompt.jl
index db436fd..ccbbe85 100644
--- a/lisp/sawfish/wm/util/prompt.jl
+++ b/lisp/sawfish/wm/util/prompt.jl
@@ -57,8 +57,7 @@
          sawfish.wm.events
          sawfish.wm.custom
          sawfish.wm.commands
-         sawfish.wm.fonts
-         sawfish.wm.util.prompt)
+         sawfish.wm.fonts)

   (defgroup messages "Messages" :group misc)

@@ -122,10 +121,15 @@ displayed. See the `display-message' function for more details.")
   ;; Compilation hack: ensure that the compiler doesn't complain when
   ;; these are treated like functions and passed values.
   (eval-when-compile
-    (setq prompt-completion-fun (lambda (#!rest) nil)
-          prompt-validation-fun (lambda (#!rest) nil)
-          prompt-abbrev-fun (lambda (#!rest) nil)
-          prompt-display-fun (lambda (#!rest) nil)))
+    (progn
+      (defvar prompt-completion-fun nil)
+      (defvar prompt-validation-fun nil)
+      (defvar prompt-abbrev-fun nil)
+      (defvar prompt-display-fun nil)
+      (setq prompt-completion-fun (lambda (#!rest) nil)
+            prompt-validation-fun (lambda (#!rest) nil)
+            prompt-abbrev-fun (lambda (#!rest) nil)
+            prompt-display-fun (lambda (#!rest) nil))))


   ;; From merlin

I don't get any warnings or errors with this. Do you?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]