1 #### This is a dump of the S library used by S-mode with Version 4 of S.
2 #### (from John Chambers ??)
4 #### S-mode session functions.
5 #### assign(..., where=0) makes them last only for the current session.
7 ### Martin Maechler: see also ./ess-sp3.S
8 ### which uses assign(.., wh=0) which seems better
10 ".SmodeDump" <- function(x, name)
12 ## dump function for S-mode
13 assign(".SmodeTmp", options(error = dump.calls), where = 0, i = T)
16 remove(".SmodeTmp", where = 0)
20 ".SmodeLoad" <- function(x)
22 ## skeleton of a dump.calls interface, enough to keep s-mode
23 ## informed that an error took place.
25 cat(get.message(), "Dumped\n", sep = "", file = "|stderr")
26 ## source function for S-mode
27 assign(".SmodeTmp", options(error = pseudo), where = 0, i = T)
30 remove(".SmodeTmp", where = 0)
35 ".SmodeObs" <- function(where, pattern)
37 if(pattern == "") objects(where) else objects(where, pattern)
40 ".SmodePaths" <- function()
42 ## the paths for the directories in the search list
44 value <- character(length(temp))
45 for(i in seq(along.with = temp)) {
46 obj <- database.object(i)
47 if(is.character(obj) && length(obj) == 1)
55 ".SmodeDump", ".SmodeLoad", ".SmodeObs", ".SmodePaths",