Fix typos in docstrings and function names.
[sbcl.git] / src / code / target-pathname.lisp
index 2d20434..f0123a9 100644 (file)
@@ -453,15 +453,21 @@ the operating system native pathname conventions."
              (diddle-case
               (and default-host pathname-host
                    (not (eq (host-customary-case default-host)
-                            (host-customary-case pathname-host))))))
+                            (host-customary-case pathname-host)))))
+             (directory (merge-directories (%pathname-directory pathname)
+                                           (%pathname-directory defaults)
+                                           diddle-case)))
         (%make-maybe-logical-pathname
          (or pathname-host default-host)
-         (or (%pathname-device pathname)
-             (maybe-diddle-case (%pathname-device defaults)
-                                diddle-case))
-         (merge-directories (%pathname-directory pathname)
-                            (%pathname-directory defaults)
-                            diddle-case)
+         (and ;; The device of ~/ shouldn't be merged,
+              ;; because the expansion may have a different device
+              (not (and (>= (length directory) 2)
+                        (eql (car directory) :absolute)
+                        (eql (cadr directory) :home)))
+              (or (%pathname-device pathname)
+                  (maybe-diddle-case (%pathname-device defaults)
+                                     diddle-case)))
+         directory
          (or (%pathname-name pathname)
              (maybe-diddle-case (%pathname-name defaults)
                                 diddle-case))
@@ -985,7 +991,7 @@ system's syntax for files."
                           &optional
                           (defaults *default-pathname-defaults*))
   #!+sb-doc
-  "Return an abbreviated pathname sufficent to identify the pathname relative
+  "Return an abbreviated pathname sufficient to identify the pathname relative
    to the defaults."
   (declare (type pathname-designator pathname))
   (with-pathname (pathname pathname)
@@ -1691,8 +1697,8 @@ is returned.
 The file should contain a single form, suitable for use with
 \(SETF LOGICAL-PATHNAME-TRANSLATIONS).
 
-Note: behaviour of this function is higly implementation dependent, and
-historically it used to be a no-op in SBcL -- the current approach is somewhat
+Note: behaviour of this function is highly implementation dependent, and
+historically it used to be a no-op in SBCL -- the current approach is somewhat
 experimental and subject to change."
   (declare (type string host)
            (values (member t nil)))