Commit bc648920 authored by Troels Henriksen's avatar Troels Henriksen

Reversed the meaning of list arguments to `as-offsets' for unification

with `let', `with-accessors', etc.
parent 6ff394dc
......@@ -37,14 +37,14 @@
"Bind the symbols in `marks' to the numeric offsets of the mark
objects that the symbols are bound to. If a symbol in `mark' is
already bound to an offset, just keep that binding. An element
of `marks' may also be a list - in this case, the first element
is used to get an offset, and the second element (which should
be a symbol) will be bound to this offset. Evaluate `body' with
these bindings."
of `marks' may also be a list - in this case, the second
element is used to get an offset, and the first element (which
should be a symbol) will be bound to this offset. Evaluate
`body' with these bindings."
`(let ,(mapcar #'(lambda (mark-sym)
(if (listp mark-sym)
`(,(second mark-sym)
(let ((value ,(first mark-sym)))
`(,(first mark-sym)
(let ((value ,(second mark-sym)))
(if (numberp value)
value
(offset value))))
......
......@@ -361,7 +361,7 @@ inserted from `provided-args'.
(defun find-operand-info (mark-or-offset syntax operator-form)
"Returns two values: The operand preceding `mark-or-offset' and
the path from `operator-form' to the operand."
(as-offsets ((mark-or-offset offset))
(as-offsets ((offset mark-or-offset))
(let* ((preceding-arg-token (form-before syntax offset))
(indexing-start-arg
(let* ((candidate-before preceding-arg-token)
......
......@@ -1349,7 +1349,7 @@ the (in-package) preceding `mark-or-offset'. If none can be
found, return the package specified in the attribute list. If no
package can be found at all, or the otherwise found packages are
invalid, return the CLIM-USER package."
(as-offsets ((mark-or-offset offset))
(as-offsets ((offset mark-or-offset))
(let* ((designator (rest (find offset (package-list syntax)
:key #'first
:test #'>=))))
......@@ -1370,7 +1370,7 @@ whatever (in-package) form precedes `mark-or-offset', even if the
package specified in that form does not exist. If no (in-package)
form can be found, return the package specified in the attribute
list. If no such package is specified, return \"CLIM-USER\"."
(as-offsets ((mark-or-offset offset))
(as-offsets ((offset mark-or-offset))
(flet ((normalise (designator)
(typecase designator
(symbol
......@@ -1595,7 +1595,7 @@ or inside, a top-level-form, or if there are no forms after
`mark-or-offset', the form preceding `mark-or-offset' is
returned. Otherwise, the form following `mark-or-offset' is
returned."
(as-offsets ((mark-or-offset offset))
(as-offsets ((offset mark-or-offset))
(or (form-around syntax offset)
(form-after syntax offset)
(form-before syntax offset))))
......@@ -1640,13 +1640,13 @@ the form that `token' quotes, peeling away all quote forms."
(defun this-form (mark-or-offset syntax)
"Return a form at `mark-or-offset'. This function defines which
forms the COM-FOO-this commands affect."
(as-offsets ((mark-or-offset offset))
(as-offsets ((offset mark-or-offset))
(or (form-around syntax offset)
(form-before syntax offset))))
(defun preceding-form (mark-or-offset syntax)
"Return a form at `mark-or-offset'."
(as-offsets ((mark-or-offset offset))
(as-offsets ((offset mark-or-offset))
(or (form-before syntax offset)
(form-around syntax offset))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment