Commit a27493d1 authored by Jan Moringen's avatar Jan Moringen
Browse files

Make fancy inspector more robust w.r.t. unexpected logical PATHNAME-HOST

While CLHS seems to guarantee PATHNAME-HOST to return a string, this is
not always the case in practice (e.g. SBCL returns a
SB-IMPL:LOGICAL-HOST instance).

* swank-fancy-inspector.lisp (emacs-inspect logical-pathname): wrap the
  return value of PATHNAME-HOST in a (:value ...) in case it is not a
  string
parent 5c6e36bd
Showing with 31 additions and 18 deletions
+31 -18
2014-07-02 Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
Make fancy inspector more robust w.r.t. unexpected logical PATHNAME-HOST
While CLHS seems to guarantee PATHNAME-HOST to return a string,
this is not always the case in practice (e.g. SBCL returns a
SB-IMPL:LOGICAL-HOST instance).
* swank-fancy-inspector.lisp (emacs-inspect logical-pathname):
wrap the return value of PATHNAME-HOST in a (:value ...) in case
it is not a string
2014-06-28 Helmut Eller <heller@common-lisp.net> 2014-06-28 Helmut Eller <heller@common-lisp.net>
Make swank-kawa.scm work with Kawa 1.14. Make swank-kawa.scm work with Kawa 1.14.
...@@ -247,7 +259,7 @@ ...@@ -247,7 +259,7 @@
Closes #9: New output respects existing REPL results or presentations. Closes #9: New output respects existing REPL results or presentations.
* slime-repl.el (slime-repl-emit-result): After emitting a result, * slime-repl.el (slime-repl-emit-result): After emitting a result,
update `slime-output-end' marker. update `slime-output-end' marker.
* slime-presentations.el (slime-presentation-write-result): Idem, * slime-presentations.el (slime-presentation-write-result): Idem,
but for presentation results. but for presentation results.
......
...@@ -853,23 +853,24 @@ SPECIAL-OPERATOR groups." ...@@ -853,23 +853,24 @@ SPECIAL-OPERATOR groups."
(label-value-line "Truename" (truename pathname))))) (label-value-line "Truename" (truename pathname)))))
(defmethod emacs-inspect ((pathname logical-pathname)) (defmethod emacs-inspect ((pathname logical-pathname))
(append (append
(label-value-line* (label-value-line*
("Namestring" (namestring pathname)) ("Namestring" (namestring pathname))
("Physical pathname: " (translate-logical-pathname pathname))) ("Physical pathname: " (translate-logical-pathname pathname)))
`("Host: " `("Host: "
,(pathname-host pathname) (:value ,(pathname-host pathname))
" (" (:value ,(logical-pathname-translations " ("
(pathname-host pathname))) (:value ,(logical-pathname-translations
"other translations)" (pathname-host pathname)))
(:newline)) " other translations)"
(label-value-line* (:newline))
("Directory" (pathname-directory pathname)) (label-value-line*
("Name" (pathname-name pathname)) ("Directory" (pathname-directory pathname))
("Type" (pathname-type pathname)) ("Name" (pathname-name pathname))
("Version" (pathname-version pathname)) ("Type" (pathname-type pathname))
("Truename" (if (not (wild-pathname-p pathname)) ("Version" (pathname-version pathname))
(probe-file pathname)))))) ("Truename" (if (not (wild-pathname-p pathname))
(probe-file pathname))))))
(defmethod emacs-inspect ((n number)) (defmethod emacs-inspect ((n number))
`("Value: " ,(princ-to-string n))) `("Value: " ,(princ-to-string n)))
......
Supports Markdown
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