[sawfish] squashed the last compiler warnings
- From: Christopher Bratusek <chrisb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sawfish] squashed the last compiler warnings
- Date: Tue, 8 Sep 2009 03:58:01 +0000 (UTC)
commit 0eb324d2d31c3e1f766f668375e8e82bff1e730a
Author: chrisb <zanghar freenet de>
Date: Tue Sep 8 05:56:52 2009 +0200
squashed the last compiler warnings
ChangeLog | 3 ++
lisp/sawfish/wm/util/prompt.jl | 49 +++++++++++++++++++--------------------
2 files changed, 27 insertions(+), 25 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d0de0a4..0adf86d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2009-09-08 Christopher Bratusek <zanghar freenet de>
+ * lisp/sawfish/wm/util/prompt.jl: squashed the last compiler warnings [Matthew Love]
+
2009-09-07 Christopher Bratusek <zanghar freenet de>
* lisp/sawfish/wm/user.jl
* lisp/sawfish/wm/misc.jl
diff --git a/lisp/sawfish/wm/util/prompt.jl b/lisp/sawfish/wm/util/prompt.jl
index 994a1a0..845a90b 100644
--- a/lisp/sawfish/wm/util/prompt.jl
+++ b/lisp/sawfish/wm/util/prompt.jl
@@ -62,12 +62,12 @@
(defgroup messages "Messages" :group misc)
-(defcustom prompt-font default-font
- "Font for prompt: \\w"
- :type font
- :group (misc messages))
+ (defcustom prompt-font default-font
+ "Font for prompt: \\w"
+ :type font
+ :group (misc messages))
-(defcustom prompt-color (cons (get-color "black") (get-color "white"))
+ (defcustom prompt-color (cons (get-color "black") (get-color "white"))
"Prompt message's colors."
:type (pair (labelled "Foreground:" color) (labelled "Background:" color))
:group (misc messages))
@@ -107,10 +107,10 @@ displayed. See the `display-message' function for more details.")
(defvar prompt-result nil)
(defvar prompt-prompt nil)
- (defvar prompt-completion-fun nil)
- (defvar prompt-validation-fun nil)
- (defvar prompt-abbrev-fun nil)
- (defvar prompt-display-fun nil)
+ (defvar prompt-completion-fun (lambda (#!rest) nil))
+ (defvar prompt-validation-fun (lambda (#!rest) nil))
+ (defvar prompt-abbrev-fun (lambda (#!rest) nil))
+ (defvar prompt-display-fun (lambda (#!rest) nil))
(defvar prompt-position 0)
(defvar prompt-completion-position nil)
(defvar prompt-completions nil)
@@ -119,7 +119,6 @@ displayed. See the `display-message' function for more details.")
(defvar prompt-saved nil)
(defvar prompt-attr nil)
-
;; From merlin
;; But maybe better if we'd include this util?
@@ -143,7 +142,7 @@ displayed. See the `display-message' function for more details.")
(defun prompt-accept ()
"End input and accept current string."
- (let ((result (if (not prompt-validation-fun)
+ (let ((result (if (not (prompt-validation-fun prompt-result))
prompt-result
(prompt-validation-fun prompt-result))))
(if result
@@ -260,7 +259,7 @@ displayed. See the `display-message' function for more details.")
(if (= new prompt-completion-position)
0
new)))
- (when prompt-completion-fun
+ (when (prompt-completion-fun prompt-result)
(let
(compl)
(setq prompt-completions (prompt-completion-fun prompt-result))
@@ -289,14 +288,14 @@ displayed. See the `display-message' function for more details.")
(concat (and (/= prompt-completion-position 0) "[...]\n")
(apply concat (mapcar (lambda (x)
(format nil "%s\n"
- (if prompt-abbrev-fun
+ (if (prompt-abbrev-fun x)
(prompt-abbrev-fun x)
x)))
compl))
continued))))
(defun prompt-update-display ()
- (let ((result (if prompt-display-fun
+ (let ((result (if (prompt-display-fun prompt-result)
(prompt-display-fun prompt-result)
prompt-result))
(completions (prompt-format-completions)))
@@ -356,17 +355,17 @@ displayed. See the `display-message' function for more details.")
(display-message nil)))))
(defun prompt-for-symbol (#!optional title predicate validator)
- (let ((prompt-completion-fun
- (lambda (x)
- (mapcar symbol-name
- (apropos (concat ?^ (quote-regexp x)) predicate))))
- (prompt-validation-fun
- (lambda (x)
- (let
- ((symbol (intern x)))
- (if validator
- (and (validator symbol) symbol)
- symbol)))))
+ (let ((prompt-completion-fun
+ (lambda (x)
+ (mapcar symbol-name
+ (apropos (concat ?^ (quote-regexp x)) predicate))))
+ (prompt-validation-fun
+ (lambda (x)
+ (let
+ ((symbol (intern x)))
+ (if validator
+ (and (validator symbol) symbol)
+ symbol)))))
(prompt title)))
(defun prompt-for-function (#!optional title)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]