[slime-devel] hacking "modern mode" in Franz

Christopher C.Stacy cstacy at dtpq.com
Tue Mar 7 19:44:15 UTC 2006


I frobbed this in swank-loader.lisp:

;========================================================================
(defun lisp-case-mode ()
  #-allegro :case-insensitive
  #+allegro excl:*current-case-mode*)

(defun unique-directory-name ()
  "Return a name that can be used as a directory name that is
unique to a Lisp implementation, Lisp implementation version,
operating system, and hardware architecture."
  (flet ((first-of (features)
           (loop for f in features
                 when (find f *features*) return it))
         (maybe-warn (value fstring &rest args)
           (cond (value)
                 (t (apply #'warn fstring args)
                    "unknown"))))
    (let ((lisp (maybe-warn (first-of *implementation-features*)
                            "No implementation feature found in ~a." 
                            *implementation-features*))
          (os   (maybe-warn (first-of *os-features*)
                            "No os feature found in ~a." *os-features*))
          (arch (maybe-warn (first-of *architecture-features*)
                            "No architecture feature found in ~a."
                            *architecture-features*))
          (version (maybe-warn (lisp-version-string)
                               "Don't know how to get Lisp ~
                                implementation version."))
          (case (maybe-warn (lisp-case-mode)
                            "Don't know uppercase/lowercase mode.")))
      (format nil "~(~@{~a~^-~}~)" lisp version case os arch))))
;========================================================================





More information about the slime-devel mailing list