1.0.0.17: ENOUGH-NAMESTRING relative to #p"/"
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 3 Dec 2006 19:53:51 +0000 (19:53 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 3 Dec 2006 19:53:51 +0000 (19:53 +0000)
 * bug report and patch by Marco Monteiro.
 * also change DESTRUCTURING-BIND to use &BODY instead of &REST for
   better autoindentation support. report and patch by Matt Pillsbury.
 * comment editing.

NEWS
src/code/destructuring-bind.lisp
src/code/unix-pathname.lisp
src/code/win32-pathname.lisp
src/compiler/parse-lambda-list.lisp
tests/pathnames.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 8d37f26..f3aed3c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ changes in sbcl-1.0.1 relative to sbcl-1.0:
   * bug fix: non ordinary lambda-list keyword in ordinary lambda lists
     signal a PROGRAM-ERROR, not a BUG.
   * bug fix: SB-POSIX:READDIR works when built with large file support.
+  * bug fix: ENOUGH-NAMESTRING works relative to #p"/" as well. (thanks
+    to Marco Monteiro)
+  * enhancement: DESTRUCTURING-BIND lambda-list uses &BODY instead of &REST
+    for better automatic indentation support. (thanks to Matt Pillsbury)
   * optimization: loading generic functions no longer takes O(n^2) time,
     proportional to the amount of methods in the generic function
     (reported by Todd Sabin and Jeremy Brown)        
index 4ea6b48..e2d699d 100644 (file)
@@ -9,7 +9,7 @@
 
 (in-package "SB!IMPL")
 
-(defmacro-mundanely destructuring-bind (lambda-list expression &rest body)
+(defmacro-mundanely destructuring-bind (lambda-list expression &body body)
   #!+sb-doc
   "Bind the variables in LAMBDA-LIST to the corresponding values in the
 tree structure resulting from the evaluation of EXPRESSION."
index b4c4d59..dc842b1 100644 (file)
               (cond ((null pathname-directory) '(:relative))
                     ((eq (car pathname-directory) :relative)
                      pathname-directory)
-                    ((and (> prefix-len 1)
+                    ((and (> prefix-len 0)
                           (>= (length pathname-directory) prefix-len)
                           (compare-component (subseq pathname-directory
                                                      0 prefix-len)
index ac29f7b..480877c 100644 (file)
               (cond ((null pathname-directory) '(:relative))
                     ((eq (car pathname-directory) :relative)
                      pathname-directory)
-                    ((and (> prefix-len 1)
+                    ((and (> prefix-len 0)
                           (>= (length pathname-directory) prefix-len)
                           (compare-component (subseq pathname-directory
                                                      0 prefix-len)
index 64e5838..7f60223 100644 (file)
                (setq auxp t
                      state :aux))
               (t
-               ;; It could be argued that &WHOLE and friends would be just ordinary
-               ;; variables in an ordinary lambda-list, but since (1) it seem exceedingly
-               ;; unlikely that that was that the programmer actually ment (2) the spec
-               ;; can be interpreted as giving as licence to signal an error[*] we do.
+               ;; It could be argued that &WHOLE and friends would be
+               ;; just ordinary variables in an ordinary lambda-list,
+               ;; but since (1) that seem exceedingly to have been the
+               ;; programmers intent and (2) the spec can be
+               ;; interpreted as giving as licence to signal an
+               ;; error[*] that is what we do.
                ;;
                ;; [* All lambda list keywords used in the
                ;; implementation appear in LAMBDA-LIST-KEYWORDS. Each
index 945d25f..c81cb5a 100644 (file)
               (make-pathname :name :wild :type :wild :version :wild)
               (make-pathname :name :wild :type :wild :version nil)))))
 
+;;; enough-namestring relative to root
+(assert (equal "foo" (enough-namestring "/foo" "/")))
+
 ;;;; success
index 3391f43..bd376c6 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.0.16"
+"1.0.0.17"