%in% needs a `vector' first argument, so make it so, listifying
anything that isn't already a vector. (Note: there seem to be plenty
of non-vector first arguments that work, such as
as.Date("2012-01-01"), which returns FALSE to is.vector() -- but the new
code seems to get that right anyway, based on very limited testing.
I'm not sure what else that does.
* RESOLVED #20 closing the connection causes infinite R errors :IMPORTANT:
reported by "Philipp Marek" <philipp@marek.priv.at> by private mail.
-* OPEN #21 inspecting an environment causes error in match() :MINOR:
+* RESOLVED #21 inspecting an environment causes error in match() :MINOR:
reported by "Philipp Marek" <philipp@marek.priv.at> by private mail.
To reproduce, C-c I globalenv() RET, or hit RET on environment
}
inspectObject <- function(slimeConnection, object) {
+ vectorify <- function(x) {
+ if(is.vector(x)) {
+ x
+ } else {
+ list(x)
+ }
+ }
previous <- slimeConnection$istate
slimeConnection$istate <- new.env()
slimeConnection$istate$object <- object
slimeConnection$istate$previous <- previous
slimeConnection$istate$content <- emacsInspect(object)
- if(!(object %in% slimeConnection$inspectorHistory)) {
+ if(!(vectorify(object) %in% slimeConnection$inspectorHistory)) {
slimeConnection$inspectorHistory <- c(slimeConnection$inspectorHistory, object)
}
if(!is.null(slimeConnection$istate$previous)) {