Commit 24bb738d authored by Christophe Rhodes's avatar Christophe Rhodes
Browse files

fix bug #21

%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.
parent 14bc3a0d
......@@ -74,7 +74,7 @@
I'm not sure what else that does.
* RESOLVED #20 closing the connection causes infinite R errors :IMPORTANT:
reported by "Philipp Marek" <> 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" <> by private mail.
To reproduce, C-c I globalenv() RET, or hit RET on environment
......@@ -601,12 +601,19 @@ resetInspector <- function(slimeConnection) {
inspectObject <- function(slimeConnection, object) {
vectorify <- function(x) {
if(is.vector(x)) {
} else {
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)) {
Markdown is supported
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