Skip to content

Commit 2a672a1

Browse files
committed
Use S7::method() for class_theme getter
1 parent 03157ef commit 2a672a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
S3method("$","ggplot2::theme")
43
S3method("$",ggproto)
54
S3method("$",ggproto_parent)
65
S3method("[",mapped_discrete)

R/theme.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,10 +1050,11 @@ combine_s3_elements <- function(e1, e2) {
10501050
return(e1)
10511051
}
10521052

1053-
#' @export
1054-
`$.ggplot2::theme` <- function(x, ...) {
1055-
.subset2(x, ...)
1056-
}
1053+
local({
1054+
S7::method(`$`, class_theme) <- function(x, ...) {
1055+
.subset2(x, ...)
1056+
}
1057+
})
10571058

10581059
#' @export
10591060
`print.ggplot2::theme` <- function(x, ...) utils::str(x)

0 commit comments

Comments
 (0)