[clim-desktop-cvs] CVS clim-desktop
thenriksen
thenriksen at common-lisp.net
Thu Jun 1 23:21:30 UTC 2006
Update of /project/clim-desktop/cvsroot/clim-desktop
In directory clnet:/tmp/cvs-serv10585
Modified Files:
swine.lisp swine-cmds.lisp
Log Message:
Changed the generic function `show-arglist-for-form' to a normal
function named `show-arglist-for-form-at-mark', added `preceding-form'
function and used it instead of `this-form' in the `with-code-insight'
macro.
--- /project/clim-desktop/cvsroot/clim-desktop/swine.lisp 2006/06/01 19:59:11 1.18
+++ /project/clim-desktop/cvsroot/clim-desktop/swine.lisp 2006/06/01 23:21:29 1.19
@@ -133,6 +133,11 @@
(or (form-around syntax (offset mark))
(form-before syntax (offset mark))))
+(defun preceding-form (mark syntax)
+ "Return a form at mark."
+ (or (form-before syntax (offset mark))
+ (form-around syntax (offset mark))))
+
(defun usable-package (package-designator)
"Return a usable package based on `package-designator'."
(or (find-package package-designator)
@@ -952,7 +957,7 @@
(,form-sym
;; Find a form with a valid (fboundp) operator.
(let ((immediate-form
- (this-form ,mark-value-sym ,syntax-value-sym)))
+ (preceding-form ,mark-value-sym ,syntax-value-sym)))
;; Recurse upwards until we find a form with a valid
;; operator. This could be improved a lot, as we could
;; inspect the lambda list of the found operator and
@@ -977,21 +982,16 @@
(when ,form-sym (find-operand-info ,mark-value-sym ,syntax-value-sym ,form-sym))
, at body))))
- ;; This is a generic function in order to facilitate different lambda
- ;; list types for different form types (I'm not yet sure when this
- ;; would be useful).
-(defgeneric show-arglist-for-form (mark syntax)
- (:documentation "Display the argument list for the operator of
- `form'. The list need not be complete. If an argument list cannot
- be retrieved for the operator, nothing will be displayed."))
-
-(defmethod show-arglist-for-form (mark syntax)
+(defun show-arglist-for-form-at-mark (mark syntax)
+ "Display the argument list for the operator of
+`form'. The list need not be complete. If an argument list cannot
+be retrieved for the operator, nothing will be displayed."
(with-code-insight mark syntax (:operator operator
:preceding-operand preceding-operand
:preceding-operand-indices preceding-operand-indices
:operands operands)
- (when (valid-operator-p operator)
- (show-arglist-silent operator preceding-operand-indices preceding-operand operands))))
+ (when (valid-operator-p operator)
+ (show-arglist-silent operator preceding-operand-indices preceding-operand operands))))
(defparameter *find-definition-stack* '())
--- /project/clim-desktop/cvsroot/clim-desktop/swine-cmds.lisp 2006/05/31 18:01:04 1.19
+++ /project/clim-desktop/cvsroot/clim-desktop/swine-cmds.lisp 2006/06/01 23:21:29 1.20
@@ -223,9 +223,7 @@
;; the parse tree our insertion of a space character may have
;; done.
(update-syntax (buffer syntax) syntax)
- ;; Try to find the argument before point, if that is not possible,
- ;; find the form that point is in.
- (show-arglist-for-form mark syntax)
+ (show-arglist-for-form-at-mark mark syntax)
(forward-object mark)
(clear-completions)))
More information about the Clim-desktop-cvs
mailing list