chiark / gitweb /
base: New macro setf-default.
[lisp] / str.lisp
index 1cb0cc7d5e1636f20e61c2c4c99667e9638e93d2..104c85a30a726bfc2637d59d0e27ecf5441df1ec 100644 (file)
--- a/str.lisp
+++ b/str.lisp
@@ -47,8 +47,7 @@ (defun str-next-word (string &key quotedp start end)
    If QUOTEDP, then allow quoting and backslashifying; otherwise don't.  The
    START and END arguments limit the portion of the string to be processed;
    the default to 0 and nil (end of string), as usual."
-  (unless start (setf start 0))
-  (unless end (setf end (length string)))
+  (setf-default start 0 end (length string))
   (let ((i start)
        (q nil)
        (e nil)