File tree Expand file tree Collapse file tree 2 files changed +1
-33
lines changed Expand file tree Collapse file tree 2 files changed +1
-33
lines changed Original file line number Diff line number Diff line change @@ -97,35 +97,8 @@ get_rstudio_context <- function() {
97
97
rstudioapi :: getActiveDocumentContext()
98
98
}
99
99
100
-
101
- # Dedicated binding for package styling addin. Simple wrapper calling style_pkg
102
- # with the selected addins style.
103
- style_package <- function () {
104
- communicate_addins_style()
105
- style_pkg(style = get_addins_style_fun())
106
- }
107
-
108
-
109
- # `match.fun`-like utility covering "ns::name".
110
- exported_value_rx <- " ^([^:]+)::([^:]+)$"
111
- is_exported_value <- function (x ) {
112
- rlang :: is_scalar_character(x ) && grepl(exported_value_rx , x )
113
- }
114
- extract_exported_ns <- function (x ) {
115
- sub(exported_value_rx , " \\ 1" , x )
116
- }
117
- extract_exported_name <- function (x ) {
118
- sub(exported_value_rx , " \\ 2" , x )
119
- }
120
100
match_fun <- function (x ) {
121
- if (is_exported_value(x )) {
122
- x <-
123
- getExportedValue(
124
- extract_exported_ns(x ),
125
- extract_exported_name(x )
126
- )
127
- }
128
- match.fun(x )
101
+ eval(parse(text = x ))
129
102
}
130
103
131
104
# Binding for style-setting addin.
Original file line number Diff line number Diff line change @@ -3,11 +3,6 @@ Description: Prompt for and set the style used by all STYLER addins
3
3
Binding: prompt_style
4
4
Interactive: true
5
5
6
- Name: Style package
7
- Description: Pretty-print package source code
8
- Binding: style_package
9
- Interactive: true
10
-
11
6
Name: Style active file
12
7
Description: Pretty-print active file
13
8
Binding: style_active_file
You can’t perform that action at this time.
0 commit comments